From: Nathan Bossart Date: Sun, 24 Mar 2024 20:23:55 +0000 (-0500) Subject: doc: Clarify requirements for SET ROLE. X-Git-Tag: REL_17_BETA1~540 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=3330a8d1b792375ae3f7dffb7eb0a45c907cbc72;p=postgresql.git 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 --- diff --git a/doc/src/sgml/ref/set_role.sgml b/doc/src/sgml/ref/set_role.sgml index 13bad1bf66e..083e6dc6ea9 100644 --- a/doc/src/sgml/ref/set_role.sgml +++ b/doc/src/sgml/ref/set_role.sgml @@ -41,8 +41,10 @@ RESET ROLE - The specified role_name - must be a role that the current session user is a member of. + The current session user must have the SET option for the + specified role_name, either + directly or indirectly via a chain of memberships with the + SET option. (If the session user is a superuser, any role can be selected.)