mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
Document has_type_privilege().
Evidently an oversight in commit 729205571. Back-patch to 9.2 where privileges for types were introduced. Report: <20160922173517.8214.88959@wrigleys.postgresql.org>
This commit is contained in:
parent
12788ae49e
commit
a4afb2b5c0
@ -15897,6 +15897,21 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
|
||||
<entry><type>boolean</type></entry>
|
||||
<entry>does current user have privilege for tablespace</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal><function>has_type_privilege</function>(<parameter>user</parameter>,
|
||||
<parameter>type</parameter>,
|
||||
<parameter>privilege</parameter>)</literal>
|
||||
</entry>
|
||||
<entry><type>boolean</type></entry>
|
||||
<entry>does user have privilege for type</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal><function>has_type_privilege</function>(<parameter>type</parameter>,
|
||||
<parameter>privilege</parameter>)</literal>
|
||||
</entry>
|
||||
<entry><type>boolean</type></entry>
|
||||
<entry>does current user have privilege for type</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal><function>pg_has_role</function>(<parameter>user</parameter>,
|
||||
<parameter>role</parameter>,
|
||||
@ -15955,6 +15970,9 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
|
||||
<indexterm>
|
||||
<primary>has_tablespace_privilege</primary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary>has_type_privilege</primary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary>pg_has_role</primary>
|
||||
</indexterm>
|
||||
@ -16109,6 +16127,18 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute');
|
||||
<literal>CREATE</literal>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<function>has_type_privilege</function> checks whether a user
|
||||
can access a type in a particular way.
|
||||
Its argument possibilities
|
||||
are analogous to <function>has_table_privilege</function>.
|
||||
When specifying a type by a text string rather than by OID,
|
||||
the allowed input is the same as for the <type>regtype</> data type
|
||||
(see <xref linkend="datatype-oid">).
|
||||
The desired access privilege type must evaluate to
|
||||
<literal>USAGE</literal>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<function>pg_has_role</function> checks whether a user
|
||||
can access a role in a particular way.
|
||||
|
Loading…
x
Reference in New Issue
Block a user