Received: from gs_server.gs_eng (gsengi.lnk.telstra.net [139.130.78.11]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f1N5Tvx74506 for ; Fri, 23 Feb 2001 00:29:57 -0500 (EST) (envelope-from jhatfield@g-s.com.au) Received: FROM hatfield-john BY gs_server.gs_eng ; Fri Feb 23 15:28:22 2001 +1000 Received: by localhost with Microsoft MAPI; Fri, 23 Feb 2001 15:30:30 +1000 Message-ID: <01C09DAD.8E258320.jhatfield@g-s.com.au> From: John Hatfield Reply-To: "jhatfield@g-s.com.au" To: "'Tom Lane'" Cc: "'PostgreSQL Admin News'" Subject: RE: select * from pgadmin_users; causes error Date: Fri, 23 Feb 2001 15:30:27 +1000 Organization: G&S Engineering X-Mailer: Microsoft Internet E-mail/MAPI - 8.0.0.4211 Encoding: 30 TEXT X-Archive-Number: 200102/173 X-Sequence-Number: 775 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 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