mirror of
https://github.com/postgres/postgres.git
synced 2025-09-05 02:22:28 +03:00
Remove excess parens in ereport() calls
Cosmetic cleanup, not worth backpatching. Discussion: https://postgr.es/m/20200129200401.GA6303@alvherre.pgsql Reviewed-by: Tom Lane, Michael Paquier
This commit is contained in:
@@ -3046,14 +3046,14 @@ 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("must be a superuser to terminate superuser process")));
|
||||
|
||||
/* Users can signal backends they have role membership in. */
|
||||
if (!has_privs_of_role(GetUserId(), proc->roleId) &&
|
||||
!has_privs_of_role(GetUserId(), DEFAULT_ROLE_SIGNAL_BACKENDID))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
(errmsg("must be a member of the role whose process is being terminated or member of pg_signal_backend"))));
|
||||
errmsg("must be a member of the role whose process is being terminated or member of pg_signal_backend")));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -115,12 +115,12 @@ pg_cancel_backend(PG_FUNCTION_ARGS)
|
||||
if (r == SIGNAL_BACKEND_NOSUPERUSER)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
(errmsg("must be a superuser to cancel superuser query"))));
|
||||
errmsg("must be a superuser to cancel superuser query")));
|
||||
|
||||
if (r == SIGNAL_BACKEND_NOPERMISSION)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
(errmsg("must be a member of the role whose query is being canceled or member of pg_signal_backend"))));
|
||||
errmsg("must be a member of the role whose query is being canceled or member of pg_signal_backend")));
|
||||
|
||||
PG_RETURN_BOOL(r == SIGNAL_BACKEND_SUCCESS);
|
||||
}
|
||||
@@ -139,12 +139,12 @@ pg_terminate_backend(PG_FUNCTION_ARGS)
|
||||
if (r == SIGNAL_BACKEND_NOSUPERUSER)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
(errmsg("must be a superuser to terminate superuser process"))));
|
||||
errmsg("must be a superuser to terminate superuser process")));
|
||||
|
||||
if (r == SIGNAL_BACKEND_NOPERMISSION)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
(errmsg("must be a member of the role whose process is being terminated or member of pg_signal_backend"))));
|
||||
errmsg("must be a member of the role whose process is being terminated or member of pg_signal_backend")));
|
||||
|
||||
PG_RETURN_BOOL(r == SIGNAL_BACKEND_SUCCESS);
|
||||
}
|
||||
@@ -180,10 +180,10 @@ pg_rotate_logfile(PG_FUNCTION_ARGS)
|
||||
if (!superuser())
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
(errmsg("must be superuser to rotate log files with adminpack 1.0"),
|
||||
errmsg("must be superuser to rotate log files with adminpack 1.0"),
|
||||
/* translator: %s is a SQL function name */
|
||||
errhint("Consider using %s, which is part of core, instead.",
|
||||
"pg_logfile_rotate()"))));
|
||||
errhint("Consider using %s, which is part of core, instead.",
|
||||
"pg_logfile_rotate()")));
|
||||
|
||||
if (!Logging_collector)
|
||||
{
|
||||
|
Reference in New Issue
Block a user