aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2020-01-30 13:32:04 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2020-01-30 13:32:04 -0300
commit4e89c79a52f8a898edd648b56a00f0f4f840cfe7 (patch)
treeba259edb0559281eaf0953d6995781b264a1aec7 /src/backend/commands
parent2520cf8c2a0a1d679094dffbd99871884e620ed5 (diff)
downloadpostgresql-4e89c79a52f8a898edd648b56a00f0f4f840cfe7.tar.gz
postgresql-4e89c79a52f8a898edd648b56a00f0f4f840cfe7.zip
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
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/alter.c8
-rw-r--r--src/backend/commands/collationcmds.c2
-rw-r--r--src/backend/commands/createas.c2
-rw-r--r--src/backend/commands/functioncmds.c4
-rw-r--r--src/backend/commands/publicationcmds.c2
-rw-r--r--src/backend/commands/subscriptioncmds.c2
-rw-r--r--src/backend/commands/user.c4
7 files changed, 12 insertions, 12 deletions
diff --git a/src/backend/commands/alter.c b/src/backend/commands/alter.c
index 4dda38fa304..fca85ba2c17 100644
--- a/src/backend/commands/alter.c
+++ b/src/backend/commands/alter.c
@@ -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);
diff --git a/src/backend/commands/collationcmds.c b/src/backend/commands/collationcmds.c
index 34c75e8b56f..85f726ae062 100644
--- a/src/backend/commands/collationcmds.c
+++ b/src/backend/commands/collationcmds.c
@@ -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
diff --git a/src/backend/commands/createas.c b/src/backend/commands/createas.c
index 9f387b5f5f1..cc02cf824ed 100644
--- a/src/backend/commands/createas.c
+++ b/src/backend/commands/createas.c
@@ -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
diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c
index 0f40c9ee27b..540044b2d68 100644
--- a/src/backend/commands/functioncmds.c
+++ b/src/backend/commands/functioncmds.c
@@ -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 */
diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c
index f96cb42adcd..eb4d22cc2a8 100644
--- a/src/backend/commands/publicationcmds.c
+++ b/src/backend/commands/publicationcmds.c
@@ -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);
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index 9bfe142adaa..119a9ce76ff 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -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
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
index f3706598423..c47fdfc9e55 100644
--- a/src/backend/commands/user.c
+++ b/src/backend/commands/user.c
@@ -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