From: | Dave Page <dpage(at)vale-housing(dot)co(dot)uk> |
---|---|
To: | "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, jhatfield(at)g-s(dot)com(dot)au |
Cc: | "'PostgreSQL Admin News'" <pgsql-admin(at)postgresql(dot)org> |
Subject: | RE: select * from pgadmin_users; causes error |
Date: | 2001-02-23 21:00:07 |
Message-ID: | 8568FC767B4AD311AC33006097BCD3D61A29C8@woody.vale-housing.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-sql |
> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: 23 February 2001 15:23
> To: jhatfield(at)g-s(dot)com(dot)au
> Cc: 'PostgreSQL Admin News'; Dave Page
> Subject: Re: [ADMIN] select * from pgadmin_users; causes error
>
>
> John Hatfield <jhatfield(at)g-s(dot)com(dot)au> writes:
> > 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!!
>
> Indeed. I wonder whether pgadmin actually needs to see the password
> column. If not, perhaps it could make a view of pg_user instead of
> pg_shadow to avoid this problem. If it does, selecting directly from
> pg_shadow with no view seems like the most reliable way...
>
> regards, tom lane
pgAdmin uses the view for a couple of reasons:
1) It is one of a set of views that are created and upgraded as required by
pgAdmin to simplify updating pgAdmin if the PostgreSQL system tables change
from version to version (there are loads of queries in pgAdmin, so upgrading
for a new release is far easier if I just have to update one set of views).
2) pgadmin_users includes the OID of the user tuple in pg_users which is not
in pg_shadow.
The problem in question has been fixed in the current dev code of pgAdmin
(as it has been noted as an issue by a couple of other users), soon to be
released as v7.1.0. 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'.
It may help to know that all pgAdmin created SSOs (we dubbed them Server
Side Objects 'cos it sounded good!) can be dropped and recreated using the
options on the Advanced Menu. This may be useful when preparing a finished
database for release to a customer for example.
Regards, Dave.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-02-23 21:07:23 | Re: select * from pgadmin_users; causes error |
Previous Message | RShepard | 2001-02-23 18:17:27 | relation does not exist |
From | Date | Subject | |
---|---|---|---|
Next Message | Jie Liang | 2001-02-23 21:05:44 | Re: Need your help |
Previous Message | Stephan Szabo | 2001-02-23 18:44:03 | Re: How can i escape a '+' or a '+' in a regexp ? |