Skip to content

Commit 17fb603

Browse files
committed
Improve error messages around REPLICATION and BYPASSRLS properties.
Clarify wording as per suggestion from Wolfgang Walther. No back-patch; this doesn't seem worth thrashing translatable strings in the back branches. Tom Lane and Stephen Frost Discussion: https://postgr.es/m/a5548a9f-89ee-3167-129d-162b5985fcf8@technowledgy.de
1 parent d907bd0 commit 17fb603

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/commands/user.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ CreateRole(ParseState *pstate, CreateRoleStmt *stmt)
305305
if (!superuser())
306306
ereport(ERROR,
307307
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
308-
errmsg("must be superuser to change bypassrls attribute")));
308+
errmsg("must be superuser to create bypassrls users")));
309309
}
310310
else
311311
{
@@ -719,14 +719,14 @@ AlterRole(AlterRoleStmt *stmt)
719719
if (!superuser())
720720
ereport(ERROR,
721721
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
722-
errmsg("must be superuser to alter superusers")));
722+
errmsg("must be superuser to alter superuser roles or change superuser attribute")));
723723
}
724724
else if (authform->rolreplication || isreplication >= 0)
725725
{
726726
if (!superuser())
727727
ereport(ERROR,
728728
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
729-
errmsg("must be superuser to alter replication users")));
729+
errmsg("must be superuser to alter replication roles or change replication attribute")));
730730
}
731731
else if (bypassrls >= 0)
732732
{

0 commit comments

Comments
 (0)