1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Message wording improvements

This commit is contained in:
Peter Eisentraut
2023-07-10 10:46:54 +02:00
parent 9b286858e3
commit e53a611523
20 changed files with 53 additions and 48 deletions

View File

@@ -3825,7 +3825,9 @@ TerminateOtherDBBackends(Oid databaseId)
if (superuser_arg(proc->roleId) && !superuser())
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("must be a superuser to terminate superuser process")));
errmsg("permission denied to terminate process"),
errdetail("Only roles with the %s attribute may terminate processes of roles with the %s attribute.",
"SUPERUSER", "SUPERUSER")));
/* Users can signal backends they have role membership in. */
if (!has_privs_of_role(GetUserId(), proc->roleId) &&