>> (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.
This is not my understanding of ISO/IEC 9075-11:2003(E), page 57 :
"5.39 ROLE_TABLE_GRANTS view
Identifies the privileges on tables defined in this catalog that are
available or granted by the currently applicable roles."
From the definition above, ISTM that a privilege granted to PUBLIC should
also appear, both because it is granted by me and available to me.
Moreover, if I execute the SELECT of the view definition provided in the
standard (a little bit simplified, and executed on the information schema
instead of the "definition schema"), the PUBLIC stuff is displayed :
psql> SELECT grantor, grantee, table_name
WHERE grantee IN (SELECT role_name FROM information_schema.enabled_roles)
OR grantor IN (SELECT role_name FROM information_schema.enabled_roles);
fabien | calvin | foo
fabien | PUBLIC | foo
I think that the view definition in postgresql could simply reuse the view
defined in the standard.
In response to
pgsql-hackers by date
|Next:||From: Kevin Grittner||Date: 2010-01-15 15:07:18|
|Subject: Re: Testing with concurrent sessions|
|Previous:||From: Heikki Linnakangas||Date: 2010-01-15 13:59:54|
|Subject: Re: Streaming replication, loose ends|