Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1308f76

Browse files
committed
Document has_type_privilege().
Evidently an oversight in commit7292055. Back-patch to 9.2 whereprivileges for types were introduced.Report: <20160922173517.8214.88959@wrigleys.postgresql.org>
1 parent4441839 commit1308f76

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
@@ -13917,6 +13917,21 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
1391713917
<entry><type>boolean</type></entry>
1391813918
<entry>does current user have privilege for tablespace</entry>
1391913919
</row>
13920+
<row>
13921+
<entry><literal><function>has_type_privilege</function>(<parameter>user</parameter>,
13922+
<parameter>type</parameter>,
13923+
<parameter>privilege</parameter>)</literal>
13924+
</entry>
13925+
<entry><type>boolean</type></entry>
13926+
<entry>does user have privilege for type</entry>
13927+
</row>
13928+
<row>
13929+
<entry><literal><function>has_type_privilege</function>(<parameter>type</parameter>,
13930+
<parameter>privilege</parameter>)</literal>
13931+
</entry>
13932+
<entry><type>boolean</type></entry>
13933+
<entry>does current user have privilege for type</entry>
13934+
</row>
1392013935
<row>
1392113936
<entry><literal><function>pg_has_role</function>(<parameter>user</parameter>,
1392213937
<parameter>role</parameter>,
@@ -13969,6 +13984,9 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
1396913984
<indexterm>
1397013985
<primary>has_tablespace_privilege</primary>
1397113986
</indexterm>
13987+
<indexterm>
13988+
<primary>has_type_privilege</primary>
13989+
</indexterm>
1397213990
<indexterm>
1397313991
<primary>pg_has_role</primary>
1397413992
</indexterm>
@@ -14120,6 +14138,18 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute');
1412014138
<literal>CREATE</literal>.
1412114139
</para>
1412214140

14141+
<para>
14142+
<function>has_type_privilege</function> checks whether a user
14143+
can access a type in a particular way.
14144+
Its argument possibilities
14145+
are analogous to <function>has_table_privilege</function>.
14146+
When specifying a type by a text string rather than by OID,
14147+
the allowed input is the same as for the <type>regtype</> data type
14148+
(see <xref linkend="datatype-oid">).
14149+
The desired access privilege type must evaluate to
14150+
<literal>USAGE</literal>.
14151+
</para>
14152+
1412314153
<para>
1412414154
<function>pg_has_role</function> checks whether a user
1412514155
can access a role in a particular way.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp