@@ -15293,6 +15293,21 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
15293
15293
<entry><type>boolean</type></entry>
15294
15294
<entry>does current user have privilege for tablespace</entry>
15295
15295
</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>
15296
15311
<row>
15297
15312
<entry><literal><function>pg_has_role</function>(<parameter>user</parameter>,
15298
15313
<parameter>role</parameter>,
@@ -15351,6 +15366,9 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
15351
15366
<indexterm>
15352
15367
<primary>has_tablespace_privilege</primary>
15353
15368
</indexterm>
15369
+ <indexterm>
15370
+ <primary>has_type_privilege</primary>
15371
+ </indexterm>
15354
15372
<indexterm>
15355
15373
<primary>pg_has_role</primary>
15356
15374
</indexterm>
@@ -15505,6 +15523,18 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute');
15505
15523
<literal>CREATE</literal>.
15506
15524
</para>
15507
15525
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
+
15508
15538
<para>
15509
15539
<function>pg_has_role</function> checks whether a user
15510
15540
can access a role in a particular way.