mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Improve several permission-related error messages.
Mainly move some detail from errmsg to errdetail, remove explicit mention of superuser where appropriate, since that is implied in most permission checks, and make messages more uniform. Author: Nathan Bossart <nathandbossart@gmail.com> Discussion: https://www.postgresql.org/message-id/20230316234701.GA903298@nathanxps13
This commit is contained in:
@@ -1143,7 +1143,9 @@ CheckSlotPermissions(void)
|
||||
if (!has_rolreplication(GetUserId()))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
errmsg("must be superuser or replication role to use replication slots")));
|
||||
errmsg("permission denied to use replication slots"),
|
||||
errdetail("Only roles with the %s attribute may use replication slots.",
|
||||
"REPLICATION")));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user