From: Robert Haas on 10 Jun 2010 20:46 On Thu, Jun 10, 2010 at 5:54 PM, Jim Nasby <jim(a)nasby.net> wrote: > test_us(a)workbook=# select has_table_privilege( 'public', 'test', 'SELECT' ); > ERROR: �role "public" does not exist > test_us(a)workbook=# > > So there's no way to see if a particular privilege has been granted to public. ISTM 'public' should be accepted, since you can't use it as a role name anyway... > > test_us(a)workbook=# create role public; > ERROR: �role name "public" is reserved > test_us(a)workbook=# create role "public"; > ERROR: �role name "public" is reserved It's a bit sticky - you could make that work for has_table_privilege(name, oid, text) or has_table_privilege(name, text, text), but what would you do about the versions whose first argument is an oid? It would seem a bit awkward to have the behavior by asymmetrical, although I guess we could... -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Tom Lane on 10 Jun 2010 23:18 Robert Haas <robertmhaas(a)gmail.com> writes: > On Thu, Jun 10, 2010 at 5:54 PM, Jim Nasby <jim(a)nasby.net> wrote: >> So there's no way to see if a particular privilege has been granted to public. ISTM 'public' should be accepted, since you can't use it as a role name anyway... > It's a bit sticky - you could make that work for > has_table_privilege(name, oid, text) or has_table_privilege(name, > text, text), but what would you do about the versions whose first > argument is an oid? Nothing. The only reason to use those forms is in a join against pg_authid, and the "public" group doesn't have an entry there. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
|
Pages: 1 Prev: ps display "waiting for max_standby_delay" Next: [HACKERS] vacuum_defer_cleanup_age |