diff options
author | Itagaki Takahiro <itagaki.takahiro@gmail.com> | 2010-10-13 14:37:23 +0900 |
---|---|---|
committer | Itagaki Takahiro <itagaki.takahiro@gmail.com> | 2010-10-13 14:37:23 +0900 |
commit | d0f876ca8ccb7dc8820302543b114014b7bac090 (patch) | |
tree | 497012e47bfa8be94a081ac5f65f4021333794b2 /doc/src | |
parent | f4d242ef94730c447d87b9840a40b0ec3371fe0f (diff) | |
download | postgresql-d0f876ca8ccb7dc8820302543b114014b7bac090.tar.gz postgresql-d0f876ca8ccb7dc8820302543b114014b7bac090.zip |
Accept 'public' as a pseudo-role name in has_table_privilege() and friends
to see if a particular privilege has been granted to PUBLIC.
The issue was reported by Jim Nasby.
Patch by Alvaro Herrera, and reviewed by KaiGai Kohei.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/func.sgml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 3ed0e3553a2..5d422afef26 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -12348,8 +12348,8 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, .. <para> <function>has_table_privilege</function> checks whether a user can access a table in a particular way. The user can be - specified by name or by OID - (<literal>pg_authid.oid</literal>), or if the argument is + specified by name, by OID (<literal>pg_authid.oid</literal>), + <literal>public</> to indicate the PUBLIC pseudo-role, or if the argument is omitted <function>current_user</function> is assumed. The table can be specified by name or by OID. (Thus, there are actually six variants of @@ -12496,7 +12496,8 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute'); <function>pg_has_role</function> checks whether a user can access a role in a particular way. Its argument possibilities - are analogous to <function>has_table_privilege</function>. + are analogous to <function>has_table_privilege</function>, + except that <literal>public</> is not allowed as a user name. The desired access privilege type must evaluate to some combination of <literal>MEMBER</literal> or <literal>USAGE</literal>. |