@@ -15897,6 +15897,21 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
1589715897 <entry><type>boolean</type></entry>
1589815898 <entry>does current user have privilege for tablespace</entry>
1589915899 </row>
15900+ <row>
15901+ <entry><literal><function>has_type_privilege</function>(<parameter>user</parameter>,
15902+ <parameter>type</parameter>,
15903+ <parameter>privilege</parameter>)</literal>
15904+ </entry>
15905+ <entry><type>boolean</type></entry>
15906+ <entry>does user have privilege for type</entry>
15907+ </row>
15908+ <row>
15909+ <entry><literal><function>has_type_privilege</function>(<parameter>type</parameter>,
15910+ <parameter>privilege</parameter>)</literal>
15911+ </entry>
15912+ <entry><type>boolean</type></entry>
15913+ <entry>does current user have privilege for type</entry>
15914+ </row>
1590015915 <row>
1590115916 <entry><literal><function>pg_has_role</function>(<parameter>user</parameter>,
1590215917 <parameter>role</parameter>,
@@ -15955,6 +15970,9 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
1595515970 <indexterm>
1595615971 <primary>has_tablespace_privilege</primary>
1595715972 </indexterm>
15973+ <indexterm>
15974+ <primary>has_type_privilege</primary>
15975+ </indexterm>
1595815976 <indexterm>
1595915977 <primary>pg_has_role</primary>
1596015978 </indexterm>
@@ -16109,6 +16127,18 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute');
1610916127 <literal>CREATE</literal>.
1611016128 </para>
1611116129
16130+ <para>
16131+ <function>has_type_privilege</function> checks whether a user
16132+ can access a type in a particular way.
16133+ Its argument possibilities
16134+ are analogous to <function>has_table_privilege</function>.
16135+ When specifying a type by a text string rather than by OID,
16136+ the allowed input is the same as for the <type>regtype</> data type
16137+ (see <xref linkend="datatype-oid">).
16138+ The desired access privilege type must evaluate to
16139+ <literal>USAGE</literal>.
16140+ </para>
16141+
1611216142 <para>
1611316143 <function>pg_has_role</function> checks whether a user
1611416144 can access a role in a particular way.
0 commit comments