summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Bossart2024-03-24 20:23:55 +0000
committerNathan Bossart2024-03-24 20:23:55 +0000
commit3330a8d1b792375ae3f7dffb7eb0a45c907cbc72 (patch)
tree9bbeca133d5c9a923e8055c41e964964bf0831e6
parentaf1d3958432c9438c4ec168bd16bdf9a91066a9f (diff)
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
-rw-r--r--doc/src/sgml/ref/set_role.sgml6
1 files changed, 4 insertions, 2 deletions
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
</para>
<para>
- The specified <replaceable class="parameter">role_name</replaceable>
- must be a role that the current session user is a member of.
+ The current session user must have the <literal>SET</literal> option for the
+ 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.)
</para>