doc: Clarify requirements for SET ROLE.

Since commit 3d14e171e9, 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
This commit is contained in:
Nathan Bossart 2024-03-24 15:23:55 -05:00
parent af1d395843
commit 3330a8d1b7

View File

@ -41,8 +41,10 @@ RESET ROLE
</para> </para>
<para> <para>
The specified <replaceable class="parameter">role_name</replaceable> The current session user must have the <literal>SET</literal> option for the
must be a role that the current session user is a member of. specified <replaceable class="parameter">role_name</replaceable>, either
directly or indirectly via a chain of memberships with the
<literal>SET</literal> option.
(If the session user is a superuser, any role can be selected.) (If the session user is a superuser, any role can be selected.)
</para> </para>