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

Commit77930c5

Browse files
committed
Doc: explain how to test ADMIN privilege with pg_has_role().
This has always been possible, but the syntax is a bit obscure,and our user-facing docs were not very helpful. Spell it outmore clearly.Per complaint from Dominique Devienne. Back-patch toall supported branches.Discussion:https://postgr.es/m/CAFCRh-8JNEy+dV4SXFOrWca50u+d=--TO4cq=+ac1oBtfJy4AA@mail.gmail.com
1 parent92a6cc5 commit77930c5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21762,6 +21762,10 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute');
2176221762
the role (that is, the right to do <command>SET ROLE</command>), while
2176321763
<literal>USAGE</literal> denotes whether the privileges of the role
2176421764
are immediately available without doing <command>SET ROLE</command>.
21765+
<literal>WITH ADMIN OPTION</literal> or <literal>WITH GRANT
21766+
OPTION</literal> can be added to either of these privilege types to
21767+
test whether the <literal>ADMIN</literal> privilege is held (all
21768+
four spellings test the same thing).
2176521769
This function does not allow the special case of
2176621770
setting <parameter>user</parameter> to <literal>public</literal>,
2176721771
because the PUBLIC pseudo-role can never be a member of real roles.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp