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

Commita4afb2b

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 parent12788ae commita4afb2b

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
@@ -15897,6 +15897,21 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
1589715897
<entry><type>boolean</type></entry>
1589815898
<entry>does current user have privilege for tablespace</entry>
1589915899
</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>
1590015915
<row>
1590115916
<entry><literal><function>pg_has_role</function>(<parameter>user</parameter>,
1590215917
<parameter>role</parameter>,
@@ -15955,6 +15970,9 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
1595515970
<indexterm>
1595615971
<primary>has_tablespace_privilege</primary>
1595715972
</indexterm>
15973+
<indexterm>
15974+
<primary>has_type_privilege</primary>
15975+
</indexterm>
1595815976
<indexterm>
1595915977
<primary>pg_has_role</primary>
1596015978
</indexterm>
@@ -16109,6 +16127,18 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute');
1610916127
<literal>CREATE</literal>.
1611016128
</para>
1611116129

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp