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. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers