From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dave Page <dpage@vale-housing.co.uk>
Cc: jhatfield@g-s.com.au, "'PostgreSQL Admin News'" <pgsql-admin@postgresql.org>
Subject: Re: select * from pgadmin_users; causes error
Date: Fri, 23 Feb 2001 17:28:34 -0500
Message-ID: <954.982967314@sss.pgh.pa.us> (raw)
In-Reply-To: <8568FC767B4AD311AC33006097BCD3D61A29C9@woody.vale-housing.co.uk>
References: <8568FC767B4AD311AC33006097BCD3D61A29C9@woody.vale-housing.co.uk>
Dave Page <dpage@vale-housing.co.uk> writes:
> Basically it isn't so much as the user ID that created
> the views that is an issue, it's that fact that pgAdmin
>> then didn't issue a
>> 'GRANT ALL ON pgadmin_users TO PUBLIC'.
>>
>> The particular case being complained of here would not be
>> fixed by that.
>>
> What exactly was the problem?
The problem was that pgadmin was first started in a particular database
by a non-privileged user. So it created the pgadmin_users view as owned
by that non-privileged user. Then the view does not work, even for the
superuser, because its attempt to access pg_shadow is checked under the
permissions of its owner not of the invoker.
Deleting and recreating the view (to make it owned by the superuser)
will fix this problem, and I'm glad to hear that pgadmin provides a
reasonably painless way to do that. But the average Joe isn't going to
realize what the problem is or what he has to do to fix it. It'd be
better if the problem couldn't occur in the first place. If you really
need a view on pg_shadow, can you postpone creating it until you are run
as superuser?
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, dpage@vale-housing.co.uk
Subject: Re: select * from pgadmin_users; causes error
In-Reply-To: <954.982967314@sss.pgh.pa.us>
References: <8568FC767B4AD311AC33006097BCD3D61A29C9@woody.vale-housing.co.uk> <954.982967314@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox