RE: select * from pgadmin_users; causes error - Mailing list pgsql-admin

From John Hatfield
Subject RE: select * from pgadmin_users; causes error
Date
Msg-id 01C09DAD.8E258320.jhatfield@g-s.com.au
Whole thread Raw
In response to select * from pgadmin_users; causes error  (John Hatfield <jhatfield@g-s.com.au>)
Responses Re: select * from pgadmin_users; causes error  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
Yes your right.  Thanks.

It looks as though the views are created the first time you login to
pgAdmin.  So when I logged first as an ordinary user not as the postgres
(database superuser), the views were created with this user as the owner.

A trap for beginners!!

regards

John

-----Original Message-----
From:    Tom Lane
Sent:    Friday, 23 February 2001 3:01 PM
To:    jhatfield@g-s.com.au
Cc:    'PostgreSQL Admin News'
Subject:    Re: [ADMIN] select * from pgadmin_users; causes error

John Hatfield <jhatfield@g-s.com.au> writes:
> When logged in as postgres (using psql)the following query returns an
error
> gsmain_test=# select * from pgadmin_users;
> ERROR:  pg_shadow: Permission denied.

pgadmin_users is a view, no?  Which user was it created by?  Views
execute with the permissions of the creating user, for reasons that
should be apparent after some thought.

            regards, tom lane


pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: select * from pgadmin_users; causes error
Next
From: Jaume Teixi
Date:
Subject: ...