@@ -15293,6 +15293,21 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
1529315293 <entry><type>boolean</type></entry>
1529415294 <entry>does current user have privilege for tablespace</entry>
1529515295 </row>
15296+ <row>
15297+ <entry><literal><function>has_type_privilege</function>(<parameter>user</parameter>,
15298+ <parameter>type</parameter>,
15299+ <parameter>privilege</parameter>)</literal>
15300+ </entry>
15301+ <entry><type>boolean</type></entry>
15302+ <entry>does user have privilege for type</entry>
15303+ </row>
15304+ <row>
15305+ <entry><literal><function>has_type_privilege</function>(<parameter>type</parameter>,
15306+ <parameter>privilege</parameter>)</literal>
15307+ </entry>
15308+ <entry><type>boolean</type></entry>
15309+ <entry>does current user have privilege for type</entry>
15310+ </row>
1529615311 <row>
1529715312 <entry><literal><function>pg_has_role</function>(<parameter>user</parameter>,
1529815313 <parameter>role</parameter>,
@@ -15351,6 +15366,9 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
1535115366 <indexterm>
1535215367 <primary>has_tablespace_privilege</primary>
1535315368 </indexterm>
15369+ <indexterm>
15370+ <primary>has_type_privilege</primary>
15371+ </indexterm>
1535415372 <indexterm>
1535515373 <primary>pg_has_role</primary>
1535615374 </indexterm>
@@ -15505,6 +15523,18 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute');
1550515523 <literal>CREATE</literal>.
1550615524 </para>
1550715525
15526+ <para>
15527+ <function>has_type_privilege</function> checks whether a user
15528+ can access a type in a particular way.
15529+ Its argument possibilities
15530+ are analogous to <function>has_table_privilege</function>.
15531+ When specifying a type by a text string rather than by OID,
15532+ the allowed input is the same as for the <type>regtype</> data type
15533+ (see <xref linkend="datatype-oid">).
15534+ The desired access privilege type must evaluate to
15535+ <literal>USAGE</literal>.
15536+ </para>
15537+
1550815538 <para>
1550915539 <function>pg_has_role</function> checks whether a user
1551015540 can access a role in a particular way.
0 commit comments