From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: missing data in information_schema grant_* tables? |
Date: | 2010-01-15 12:18:13 |
Message-ID: | 1263557893.30974.1.camel@fsopti579.F-Secure.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On fre, 2010-01-15 at 12:00 +0100, Fabien COELHO wrote:
> INSERT to PUBLIC is shown on the last line of the access privileges
> column. However, when looking at the information_schema:
>
> psql> SELECT grantor, grantee, privilege_type
> FROM information_schema.role_table_grants
> WHERE table_name = 'foo';
> grantor | grantee | privilege_type
> ---------+---------+----------------
> fabien | fabien | SELECT
> fabien | fabien | INSERT
> fabien | fabien | UPDATE
> fabien | fabien | DELETE
> fabien | fabien | TRUNCATE
> fabien | fabien | REFERENCES
> fabien | fabien | TRIGGER
> fabien | calvin | SELECT
> (8 rows)
>
> My point is that the grant to "PUBLIC" does not show in the
> information
> schema. However, it appears in the table_privileges view:
>
> psql> SELECT grantor, grantee, privilege_type FROM
> information_schema.table_privileges WHERE table_name='foo';
> grantor | grantee | privilege_type
> ---------+---------+----------------
> ... same as previous query ...
> fabien | PUBLIC | INSERT
>
> (1) Would you agree that it is a "bug"? That is, if the grantee is
> PUBLIC,
> it is an enabled role for the current user, so it should appear in
> the
> role_table_grants view...
The whole point of role_table_grants is that it shows everything that
table_privileges shows except privileges granted to public. So the
behavior you observe is correct.
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2010-01-15 12:27:38 | Re: Streaming replication, loose ends |
Previous Message | Boszormenyi Zoltan | 2010-01-15 12:16:18 | Re: ECPG DESCRIBE [OUTPUT] support |