@@ -15897,6 +15897,21 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
15897
15897
<entry><type>boolean</type></entry>
15898
15898
<entry>does current user have privilege for tablespace</entry>
15899
15899
</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>
15900
15915
<row>
15901
15916
<entry><literal><function>pg_has_role</function>(<parameter>user</parameter>,
15902
15917
<parameter>role</parameter>,
@@ -15955,6 +15970,9 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
15955
15970
<indexterm>
15956
15971
<primary>has_tablespace_privilege</primary>
15957
15972
</indexterm>
15973
+ <indexterm>
15974
+ <primary>has_type_privilege</primary>
15975
+ </indexterm>
15958
15976
<indexterm>
15959
15977
<primary>pg_has_role</primary>
15960
15978
</indexterm>
@@ -16109,6 +16127,18 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute');
16109
16127
<literal>CREATE</literal>.
16110
16128
</para>
16111
16129
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
+
16112
16142
<para>
16113
16143
<function>pg_has_role</function> checks whether a user
16114
16144
can access a role in a particular way.
0 commit comments