Skip to content

Commit 1d473b5

Browse files
committed
Document has_type_privilege().
Evidently an oversight in commit 7292055. Back-patch to 9.2 where privileges for types were introduced. Report: <20160922173517.8214.88959@wrigleys.postgresql.org>
1 parent fc37e2a commit 1d473b5

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

doc/src/sgml/func.sgml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15834,6 +15834,21 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
1583415834
<entry><type>boolean</type></entry>
1583515835
<entry>does current user have privilege for tablespace</entry>
1583615836
</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>
1583715852
<row>
1583815853
<entry><literal><function>pg_has_role</function>(<parameter>user</parameter>,
1583915854
<parameter>role</parameter>,
@@ -15892,6 +15907,9 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
1589215907
<indexterm>
1589315908
<primary>has_tablespace_privilege</primary>
1589415909
</indexterm>
15910+
<indexterm>
15911+
<primary>has_type_privilege</primary>
15912+
</indexterm>
1589515913
<indexterm>
1589615914
<primary>pg_has_role</primary>
1589715915
</indexterm>
@@ -16046,6 +16064,18 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute');
1604616064
<literal>CREATE</literal>.
1604716065
</para>
1604816066

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+
1604916079
<para>
1605016080
<function>pg_has_role</function> checks whether a user
1605116081
can access a role in a particular way.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy