Skip to content

Commit 3330a8d

Browse files
doc: Clarify requirements for SET ROLE.
Since commit 3d14e17, SET ROLE has required the current session user to have membership with the SET option in the target role, but the SET ROLE documentation only mentions the membership requirement. This commit adds this important detail to the SET ROLE page. Reviewed-by: Robert Haas Discussion: https://postgr.es/m/CA%2BRLCQysHtME0znk2KUMJN343ksboSRQSU-hCnOjesX6VK300Q%40mail.gmail.com Backpatch-through: 16
1 parent af1d395 commit 3330a8d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/src/sgml/ref/set_role.sgml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ RESET ROLE
4141
</para>
4242

4343
<para>
44-
The specified <replaceable class="parameter">role_name</replaceable>
45-
must be a role that the current session user is a member of.
44+
The current session user must have the <literal>SET</literal> option for the
45+
specified <replaceable class="parameter">role_name</replaceable>, either
46+
directly or indirectly via a chain of memberships with the
47+
<literal>SET</literal> option.
4648
(If the session user is a superuser, any role can be selected.)
4749
</para>
4850

0 commit comments

Comments
 (0)