@@ -15834,6 +15834,21 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
15834
15834
<entry><type>boolean</type></entry>
15835
15835
<entry>does current user have privilege for tablespace</entry>
15836
15836
</row>
15837
+ <row>
15838
+ <entry><literal><function>has_type_privilege</function>(<parameter>user</parameter>,
15839
+ <parameter>type</parameter>,
15840
+ <parameter>privilege</parameter>)</literal>
15841
+ </entry>
15842
+ <entry><type>boolean</type></entry>
15843
+ <entry>does user have privilege for type</entry>
15844
+ </row>
15845
+ <row>
15846
+ <entry><literal><function>has_type_privilege</function>(<parameter>type</parameter>,
15847
+ <parameter>privilege</parameter>)</literal>
15848
+ </entry>
15849
+ <entry><type>boolean</type></entry>
15850
+ <entry>does current user have privilege for type</entry>
15851
+ </row>
15837
15852
<row>
15838
15853
<entry><literal><function>pg_has_role</function>(<parameter>user</parameter>,
15839
15854
<parameter>role</parameter>,
@@ -15892,6 +15907,9 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
15892
15907
<indexterm>
15893
15908
<primary>has_tablespace_privilege</primary>
15894
15909
</indexterm>
15910
+ <indexterm>
15911
+ <primary>has_type_privilege</primary>
15912
+ </indexterm>
15895
15913
<indexterm>
15896
15914
<primary>pg_has_role</primary>
15897
15915
</indexterm>
@@ -16046,6 +16064,18 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute');
16046
16064
<literal>CREATE</literal>.
16047
16065
</para>
16048
16066
16067
+ <para>
16068
+ <function>has_type_privilege</function> checks whether a user
16069
+ can access a type in a particular way.
16070
+ Its argument possibilities
16071
+ are analogous to <function>has_table_privilege</function>.
16072
+ When specifying a type by a text string rather than by OID,
16073
+ the allowed input is the same as for the <type>regtype</> data type
16074
+ (see <xref linkend="datatype-oid">).
16075
+ The desired access privilege type must evaluate to
16076
+ <literal>USAGE</literal>.
16077
+ </para>
16078
+
16049
16079
<para>
16050
16080
<function>pg_has_role</function> checks whether a user
16051
16081
can access a role in a particular way.
0 commit comments