mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
Allow makeaclitem() to accept multiple privilege names.
Interpret its privileges argument as a comma-separated list of privilege names, as in has_table_privilege and other functions. This is actually net less code, since the support routine to parse that already exists, and we can drop convert_priv_string() which had no other use-case. Robins Tharakan Discussion: https://postgr.es/m/e5a05dc54ba64408b3dd260171c1abaf@EX13D05UWC001.ant.amazon.com
This commit is contained in:
@ -24236,7 +24236,8 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute');
|
||||
If the grantee is the pseudo-role PUBLIC, it is represented by zero in
|
||||
the <parameter>grantee</parameter> column. Each granted privilege is
|
||||
represented as <literal>SELECT</literal>, <literal>INSERT</literal>,
|
||||
etc. Note that each privilege is broken out as a separate row, so
|
||||
etc (see <xref linkend="privilege-abbrevs-table"/> for a full list).
|
||||
Note that each privilege is broken out as a separate row, so
|
||||
only one keyword appears in the <parameter>privilege_type</parameter>
|
||||
column.
|
||||
</para></entry>
|
||||
@ -24256,6 +24257,12 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute');
|
||||
</para>
|
||||
<para>
|
||||
Constructs an <type>aclitem</type> with the given properties.
|
||||
<parameter>privileges</parameter> is a comma-separated list of
|
||||
privilege names such as <literal>SELECT</literal>,
|
||||
<literal>INSERT</literal>, etc, all of which are set in the
|
||||
result. (Case of the privilege string is not significant, and
|
||||
extra whitespace is allowed between but not within privilege
|
||||
names.)
|
||||
</para></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
|
Reference in New Issue
Block a user