mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +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:
@ -212,8 +212,8 @@ AlterObjectRename_internal(Relation rel, Oid objectId, const char *new_name)
|
||||
if (Anum_owner <= 0)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
(errmsg("must be superuser to rename %s",
|
||||
getObjectDescriptionOids(classId, objectId)))));
|
||||
errmsg("must be superuser to rename %s",
|
||||
getObjectDescriptionOids(classId, objectId))));
|
||||
|
||||
/* Otherwise, must be owner of the existing object */
|
||||
datum = heap_getattr(oldtup, Anum_owner,
|
||||
@ -715,8 +715,8 @@ AlterObjectNamespace_internal(Relation rel, Oid objid, Oid nspOid)
|
||||
if (Anum_owner <= 0)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
(errmsg("must be superuser to set schema of %s",
|
||||
getObjectDescriptionOids(classId, objid)))));
|
||||
errmsg("must be superuser to set schema of %s",
|
||||
getObjectDescriptionOids(classId, objid))));
|
||||
|
||||
/* Otherwise, must be owner of the existing object */
|
||||
owner = heap_getattr(tup, Anum_owner, RelationGetDescr(rel), &isnull);
|
||||
|
@ -527,7 +527,7 @@ pg_import_system_collations(PG_FUNCTION_ARGS)
|
||||
if (!superuser())
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
(errmsg("must be superuser to import system collations"))));
|
||||
errmsg("must be superuser to import system collations")));
|
||||
|
||||
/* Load collations known to libc, using "locale -a" to enumerate them */
|
||||
#ifdef READ_LOCALE_A_OUTPUT
|
||||
|
@ -537,7 +537,7 @@ intorel_startup(DestReceiver *self, int operation, TupleDesc typeinfo)
|
||||
if (check_enable_rls(intoRelationAddr.objectId, InvalidOid, false) == RLS_ENABLED)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
(errmsg("policies not yet implemented for this command"))));
|
||||
errmsg("policies not yet implemented for this command")));
|
||||
|
||||
/*
|
||||
* Tentatively mark the target as populated, if it's a matview and we're
|
||||
|
@ -286,8 +286,8 @@ interpret_function_parameter_list(ParseState *pstate,
|
||||
if (fp->mode == FUNC_PARAM_OUT)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
(errmsg("procedures cannot have OUT arguments"),
|
||||
errhint("INOUT arguments are permitted."))));
|
||||
errmsg("procedures cannot have OUT arguments"),
|
||||
errhint("INOUT arguments are permitted.")));
|
||||
}
|
||||
|
||||
/* handle input parameters */
|
||||
|
@ -158,7 +158,7 @@ CreatePublication(CreatePublicationStmt *stmt)
|
||||
if (stmt->for_all_tables && !superuser())
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
(errmsg("must be superuser to create FOR ALL TABLES publication"))));
|
||||
errmsg("must be superuser to create FOR ALL TABLES publication")));
|
||||
|
||||
rel = table_open(PublicationRelationId, RowExclusiveLock);
|
||||
|
||||
|
@ -347,7 +347,7 @@ CreateSubscription(CreateSubscriptionStmt *stmt, bool isTopLevel)
|
||||
if (!superuser())
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
(errmsg("must be superuser to create subscriptions"))));
|
||||
errmsg("must be superuser to create subscriptions")));
|
||||
|
||||
/*
|
||||
* If built with appropriate switch, whine when regression-testing
|
||||
|
@ -1523,8 +1523,8 @@ AddRoleMems(const char *rolename, Oid roleid,
|
||||
if (is_member_of_role_nosuper(roleid, memberid))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_GRANT_OPERATION),
|
||||
(errmsg("role \"%s\" is a member of role \"%s\"",
|
||||
rolename, get_rolespec_name(memberRole)))));
|
||||
errmsg("role \"%s\" is a member of role \"%s\"",
|
||||
rolename, get_rolespec_name(memberRole))));
|
||||
|
||||
/*
|
||||
* Check if entry for this role/member already exists; if so, give
|
||||
|
Reference in New Issue
Block a user