Commit 17fb6038 authored by Tom Lane's avatar Tom Lane

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
parent d907bd05
...@@ -305,7 +305,7 @@ CreateRole(ParseState *pstate, CreateRoleStmt *stmt) ...@@ -305,7 +305,7 @@ CreateRole(ParseState *pstate, CreateRoleStmt *stmt)
if (!superuser()) if (!superuser())
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("must be superuser to change bypassrls attribute"))); errmsg("must be superuser to create bypassrls users")));
} }
else else
{ {
...@@ -719,14 +719,14 @@ AlterRole(AlterRoleStmt *stmt) ...@@ -719,14 +719,14 @@ AlterRole(AlterRoleStmt *stmt)
if (!superuser()) if (!superuser())
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("must be superuser to alter superusers"))); errmsg("must be superuser to alter superuser roles or change superuser attribute")));
} }
else if (authform->rolreplication || isreplication >= 0) else if (authform->rolreplication || isreplication >= 0)
{ {
if (!superuser()) if (!superuser())
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("must be superuser to alter replication users"))); errmsg("must be superuser to alter replication roles or change replication attribute")));
} }
else if (bypassrls >= 0) else if (bypassrls >= 0)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment