RE: select * from pgadmin_users; causes error

From: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: jhatfield(at)g-s(dot)com(dot)au, "'PostgreSQL Admin News'" <pgsql-admin(at)postgresql(dot)org>
Subject: RE: select * from pgadmin_users; causes error
Date: 2001-02-23 22:48:31
Message-ID: 8568FC767B4AD311AC33006097BCD3D61A29CA@woody.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: 23 February 2001 22:29
> To: Dave Page
> Cc: jhatfield(at)g-s(dot)com(dot)au; 'PostgreSQL Admin News'
> Subject: Re: [ADMIN] select * from pgadmin_users; causes error
>
>
> Dave Page <dpage(at)vale-housing(dot)co(dot)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.

Hmm yes. I've just been playing with it and that is exactly the case.

> 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?

That shouldn't be a major problem, I'll look into it for the next release.

Regards,

Dave.

Browse pgsql-admin by date

  From Date Subject
Next Message Tatsuo Ishii 2001-02-24 02:38:13 Re: [HACKERS] Re: v7.1b4 bad performance
Previous Message Tom Lane 2001-02-23 22:28:34 Re: select * from pgadmin_users; causes error