From a5f809d0dcd9ae0103ba89f6527d79ae30ac8a49 Mon Sep 17 00:00:00 2001 From: Yurii Rashkovskii Date: Fri, 15 Sep 2023 11:41:46 -0700 Subject: [PATCH] Improve ALTER ROLE documentation to document current behavior. Previously, this was possible (assuming current_user is a bootstrap user): ``` ALTER ROLE current_user NOSUPERUSER ``` However, as of 16.0 this is no longer allowed: ``` ERROR: permission denied to alter role DETAIL: The bootstrap user must have the SUPERUSER attribute. ``` --- doc/src/sgml/ref/alter_role.sgml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/ref/alter_role.sgml b/doc/src/sgml/ref/alter_role.sgml index ab1ee45d54..fb11c79039 100644 --- a/doc/src/sgml/ref/alter_role.sgml +++ b/doc/src/sgml/ref/alter_role.sgml @@ -69,7 +69,9 @@ ALTER ROLE { role_specification | A GRANT and REVOKE for that.) Attributes not mentioned in the command retain their previous settings. - Database superusers can change any of these settings for any role. + Database superusers can change any of these settings for any role, except for + changing SUPERUSER to NOSUPERUSER + for a bootstrap user. Non-superuser roles having CREATEROLE privilege can change most of these properties, but only for non-superuser and non-replication roles for which they have been granted -- 2.33.0