0001-Improve-ALTER-ROLE-documentation-to-document-current.patch
application/octet-stream
Filename: 0001-Improve-ALTER-ROLE-documentation-to-document-current.patch
Type: application/octet-stream
Part: 0
Message:
ALTER ROLE documentation improvement
Patch
Format: format-patch
Series: patch 0001
Subject: Improve ALTER ROLE documentation to document current behavior.
| File | + | − |
|---|---|---|
| doc/src/sgml/ref/alter_role.sgml | 3 | 1 |
From a5f809d0dcd9ae0103ba89f6527d79ae30ac8a49 Mon Sep 17 00:00:00 2001
From: Yurii Rashkovskii <yrashk@gmail.com>
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 { <replaceable class="parameter">role_specification</replaceable> | A
<link linkend="sql-grant"><command>GRANT</command></link> and
<link linkend="sql-revoke"><command>REVOKE</command></link> 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 <literal>SUPERUSER</literal> to <literal>NOSUPERUSER</literal>
+ for a bootstrap user.
Non-superuser roles having <literal>CREATEROLE</literal> 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