diff options
Diffstat (limited to 'src/backend/commands')
38 files changed, 535 insertions, 535 deletions
diff --git a/src/backend/commands/aggregatecmds.c b/src/backend/commands/aggregatecmds.c index b204b19c72..a63539ab21 100644 --- a/src/backend/commands/aggregatecmds.c +++ b/src/backend/commands/aggregatecmds.c @@ -216,7 +216,7 @@ DefineAggregate(ParseState *pstate, List *name, List *args, bool oldstyle, List if (mtransfuncName != NIL) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("aggregate msfunc must not be specified without mstype"))); + errmsg("aggregate msfunc must not be specified without mstype"))); if (minvtransfuncName != NIL) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), diff --git a/src/backend/commands/alter.c b/src/backend/commands/alter.c index e5f0b75a86..4f8147907c 100644 --- a/src/backend/commands/alter.c +++ b/src/backend/commands/alter.c @@ -468,7 +468,7 @@ ExecAlterObjectSchemaStmt(AlterObjectSchemaStmt *stmt, { case OBJECT_EXTENSION: address = AlterExtensionNamespace(strVal((Value *) stmt->object), stmt->newschema, - oldSchemaAddr ? &oldNspOid : NULL); + oldSchemaAddr ? &oldNspOid : NULL); break; case OBJECT_FOREIGN_TABLE: diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index a19c6c25e6..2b638271b3 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -148,8 +148,8 @@ analyze_rel(Oid relid, RangeVar *relation, int options, if (IsAutoVacuumWorkerProcess() && params->log_min_duration >= 0) ereport(LOG, (errcode(ERRCODE_LOCK_NOT_AVAILABLE), - errmsg("skipping analyze of \"%s\" --- lock not available", - relation->relname))); + errmsg("skipping analyze of \"%s\" --- lock not available", + relation->relname))); } if (!onerel) return; @@ -165,8 +165,8 @@ analyze_rel(Oid relid, RangeVar *relation, int options, { if (onerel->rd_rel->relisshared) ereport(WARNING, - (errmsg("skipping \"%s\" --- only superuser can analyze it", - RelationGetRelationName(onerel)))); + (errmsg("skipping \"%s\" --- only superuser can analyze it", + RelationGetRelationName(onerel)))); else if (onerel->rd_rel->relnamespace == PG_CATALOG_NAMESPACE) ereport(WARNING, (errmsg("skipping \"%s\" --- only superuser or database owner can analyze it", @@ -233,8 +233,8 @@ analyze_rel(Oid relid, RangeVar *relation, int options, if (!ok) { ereport(WARNING, - (errmsg("skipping \"%s\" --- cannot analyze this foreign table", - RelationGetRelationName(onerel)))); + (errmsg("skipping \"%s\" --- cannot analyze this foreign table", + RelationGetRelationName(onerel)))); relation_close(onerel, ShareUpdateExclusiveLock); return; } @@ -387,8 +387,8 @@ do_analyze_rel(Relation onerel, int options, VacuumParams *params, if (i == InvalidAttrNumber) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("column \"%s\" of relation \"%s\" does not exist", - col, RelationGetRelationName(onerel)))); + errmsg("column \"%s\" of relation \"%s\" does not exist", + col, RelationGetRelationName(onerel)))); vacattrstats[tcnt] = examine_attribute(onerel, i, NULL); if (vacattrstats[tcnt] != NULL) tcnt++; @@ -1443,7 +1443,7 @@ acquire_inherited_sample_rows(Relation onerel, int elevel, map = convert_tuples_by_name(RelationGetDescr(childrel), RelationGetDescr(onerel), - gettext_noop("could not convert row type")); + gettext_noop("could not convert row type")); if (map != NULL) { int j; diff --git a/src/backend/commands/async.c b/src/backend/commands/async.c index 9befe0492a..bacc08eb84 100644 --- a/src/backend/commands/async.c +++ b/src/backend/commands/async.c @@ -853,7 +853,7 @@ PreCommit_Notify(void) if (asyncQueueIsFull()) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("too many notifications in the NOTIFY queue"))); + errmsg("too many notifications in the NOTIFY queue"))); nextNotify = asyncQueueAddEntries(nextNotify); LWLockRelease(AsyncQueueLock); } diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c index 1cc5309426..f51f8b9492 100644 --- a/src/backend/commands/cluster.c +++ b/src/backend/commands/cluster.c @@ -126,7 +126,7 @@ cluster(ClusterStmt *stmt, bool isTopLevel) if (RELATION_IS_OTHER_TEMP(rel)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot cluster temporary tables of other sessions"))); + errmsg("cannot cluster temporary tables of other sessions"))); if (stmt->indexname == NULL) { @@ -170,8 +170,8 @@ cluster(ClusterStmt *stmt, bool isTopLevel) if (!OidIsValid(indexOid)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("index \"%s\" for table \"%s\" does not exist", - stmt->indexname, stmt->relation->relname))); + errmsg("index \"%s\" for table \"%s\" does not exist", + stmt->indexname, stmt->relation->relname))); } /* close relation, keep lock till commit */ @@ -361,11 +361,11 @@ cluster_rel(Oid tableOid, Oid indexOid, bool recheck, bool verbose) if (OidIsValid(indexOid)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot cluster temporary tables of other sessions"))); + errmsg("cannot cluster temporary tables of other sessions"))); else ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot vacuum temporary tables of other sessions"))); + errmsg("cannot vacuum temporary tables of other sessions"))); } /* diff --git a/src/backend/commands/collationcmds.c b/src/backend/commands/collationcmds.c index e805b7cfc4..bdfd73906b 100644 --- a/src/backend/commands/collationcmds.c +++ b/src/backend/commands/collationcmds.c @@ -391,8 +391,8 @@ get_icu_language_tag(const char *localename) uloc_toLanguageTag(localename, buf, sizeof(buf), TRUE, &status); if (U_FAILURE(status)) ereport(ERROR, - (errmsg("could not convert locale name \"%s\" to language tag: %s", - localename, u_errorName(status)))); + (errmsg("could not convert locale name \"%s\" to language tag: %s", + localename, u_errorName(status)))); return pstrdup(buf); } @@ -511,7 +511,7 @@ pg_import_system_collations(PG_FUNCTION_ARGS) CollationCreate(localebuf, nspid, GetUserId(), COLLPROVIDER_LIBC, enc, localebuf, localebuf, - get_collation_actual_version(COLLPROVIDER_LIBC, localebuf), + get_collation_actual_version(COLLPROVIDER_LIBC, localebuf), if_not_exists); CommandCounterIncrement(); @@ -544,7 +544,7 @@ pg_import_system_collations(PG_FUNCTION_ARGS) CollationCreate(alias, nspid, GetUserId(), COLLPROVIDER_LIBC, enc, locale, locale, - get_collation_actual_version(COLLPROVIDER_LIBC, locale), + get_collation_actual_version(COLLPROVIDER_LIBC, locale), true); CommandCounterIncrement(); } @@ -590,7 +590,7 @@ pg_import_system_collations(PG_FUNCTION_ARGS) collid = CollationCreate(psprintf("%s-x-icu", langtag), nspid, GetUserId(), COLLPROVIDER_ICU, -1, collcollate, collcollate, - get_collation_actual_version(COLLPROVIDER_ICU, collcollate), + get_collation_actual_version(COLLPROVIDER_ICU, collcollate), if_not_exists); CreateComments(collid, CollationRelationId, 0, @@ -603,8 +603,8 @@ pg_import_system_collations(PG_FUNCTION_ARGS) en = ucol_getKeywordValuesForLocale("collation", name, TRUE, &status); if (U_FAILURE(status)) ereport(ERROR, - (errmsg("could not get keyword values for locale \"%s\": %s", - name, u_errorName(status)))); + (errmsg("could not get keyword values for locale \"%s\": %s", + name, u_errorName(status)))); status = U_ZERO_ERROR; uenum_reset(en, &status); @@ -615,17 +615,17 @@ pg_import_system_collations(PG_FUNCTION_ARGS) langtag = get_icu_language_tag(localeid); collcollate = U_ICU_VERSION_MAJOR_NUM >= 54 ? langtag : localeid; collid = CollationCreate(psprintf("%s-x-icu", langtag), - nspid, GetUserId(), COLLPROVIDER_ICU, -1, + nspid, GetUserId(), COLLPROVIDER_ICU, -1, collcollate, collcollate, - get_collation_actual_version(COLLPROVIDER_ICU, collcollate), + get_collation_actual_version(COLLPROVIDER_ICU, collcollate), if_not_exists); CreateComments(collid, CollationRelationId, 0, get_icu_locale_comment(localeid)); } if (U_FAILURE(status)) ereport(ERROR, - (errmsg("could not get keyword values for locale \"%s\": %s", - name, u_errorName(status)))); + (errmsg("could not get keyword values for locale \"%s\": %s", + name, u_errorName(status)))); uenum_close(en); } } diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index ec6011cdb8..3c399e29db 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -368,7 +368,7 @@ SendCopyBegin(CopyState cstate) if (cstate->binary) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("COPY BINARY is not supported to stdout or from stdin"))); + errmsg("COPY BINARY is not supported to stdout or from stdin"))); pq_putemptymessage('H'); /* grottiness needed for old COPY OUT protocol */ pq_startcopyout(); @@ -402,7 +402,7 @@ ReceiveCopyBegin(CopyState cstate) if (cstate->binary) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("COPY BINARY is not supported to stdout or from stdin"))); + errmsg("COPY BINARY is not supported to stdout or from stdin"))); pq_putemptymessage('G'); /* any error in old protocol will make us lose sync */ pq_startmsgread(); @@ -619,7 +619,7 @@ CopyGetData(CopyState cstate, void *databuf, int minread, int maxread) ereport(ERROR, (errcode(ERRCODE_QUERY_CANCELED), errmsg("COPY from stdin failed: %s", - pq_getmsgstring(cstate->fe_msgbuf)))); + pq_getmsgstring(cstate->fe_msgbuf)))); break; case 'H': /* Flush */ case 'S': /* Sync */ @@ -797,13 +797,13 @@ DoCopy(ParseState *pstate, const CopyStmt *stmt, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), errmsg("must be superuser to COPY to or from an external program"), errhint("Anyone can COPY to stdout or from stdin. " - "psql's \\copy command also works for anyone."))); + "psql's \\copy command also works for anyone."))); else ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), errmsg("must be superuser to COPY to or from a file"), errhint("Anyone can COPY to stdout or from stdin. " - "psql's \\copy command also works for anyone."))); + "psql's \\copy command also works for anyone."))); } if (stmt->relation) @@ -863,7 +863,7 @@ DoCopy(ParseState *pstate, const CopyStmt *stmt, if (is_from) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("COPY FROM not supported with row-level security"), + errmsg("COPY FROM not supported with row-level security"), errhint("Use INSERT statements instead."))); /* @@ -1243,14 +1243,14 @@ ProcessCopyOptions(ParseState *pstate, if (strlen(cstate->delim) != 1) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("COPY delimiter must be a single one-byte character"))); + errmsg("COPY delimiter must be a single one-byte character"))); /* Disallow end-of-line characters */ if (strchr(cstate->delim, '\r') != NULL || strchr(cstate->delim, '\n') != NULL) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("COPY delimiter cannot be newline or carriage return"))); + errmsg("COPY delimiter cannot be newline or carriage return"))); if (strchr(cstate->null_print, '\r') != NULL || strchr(cstate->null_print, '\n') != NULL) @@ -1326,7 +1326,7 @@ ProcessCopyOptions(ParseState *pstate, if (cstate->force_notnull != NIL && !is_from) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("COPY force not null only available using COPY FROM"))); + errmsg("COPY force not null only available using COPY FROM"))); /* Check force_null */ if (!cstate->csv_mode && cstate->force_null != NIL) @@ -1343,7 +1343,7 @@ ProcessCopyOptions(ParseState *pstate, if (strchr(cstate->null_print, cstate->delim[0]) != NULL) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("COPY delimiter must not appear in the NULL specification"))); + errmsg("COPY delimiter must not appear in the NULL specification"))); /* Don't allow the CSV quote char to appear in the null string. */ if (cstate->csv_mode && @@ -1473,7 +1473,7 @@ BeginCopy(ParseState *pstate, { ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("DO INSTEAD NOTHING rules are not supported for COPY"))); + errmsg("DO INSTEAD NOTHING rules are not supported for COPY"))); } else if (list_length(rewritten) > 1) { @@ -1491,7 +1491,7 @@ BeginCopy(ParseState *pstate, if (q->querySource == QSRC_NON_INSTEAD_RULE) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("DO ALSO rules are not supported for the COPY"))); + errmsg("DO ALSO rules are not supported for the COPY"))); } ereport(ERROR, @@ -1551,7 +1551,7 @@ BeginCopy(ParseState *pstate, if (!list_member_oid(plan->relationOids, queryRelId)) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("relation referenced by COPY statement has changed"))); + errmsg("relation referenced by COPY statement has changed"))); } /* @@ -1609,8 +1609,8 @@ BeginCopy(ParseState *pstate, if (!list_member_int(cstate->attnumlist, attnum)) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("FORCE_QUOTE column \"%s\" not referenced by COPY", - NameStr(tupDesc->attrs[attnum - 1]->attname)))); + errmsg("FORCE_QUOTE column \"%s\" not referenced by COPY", + NameStr(tupDesc->attrs[attnum - 1]->attname)))); cstate->force_quote_flags[attnum - 1] = true; } } @@ -1631,8 +1631,8 @@ BeginCopy(ParseState *pstate, if (!list_member_int(cstate->attnumlist, attnum)) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("FORCE_NOT_NULL column \"%s\" not referenced by COPY", - NameStr(tupDesc->attrs[attnum - 1]->attname)))); + errmsg("FORCE_NOT_NULL column \"%s\" not referenced by COPY", + NameStr(tupDesc->attrs[attnum - 1]->attname)))); cstate->force_notnull_flags[attnum - 1] = true; } } @@ -1653,8 +1653,8 @@ BeginCopy(ParseState *pstate, if (!list_member_int(cstate->attnumlist, attnum)) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("FORCE_NULL column \"%s\" not referenced by COPY", - NameStr(tupDesc->attrs[attnum - 1]->attname)))); + errmsg("FORCE_NULL column \"%s\" not referenced by COPY", + NameStr(tupDesc->attrs[attnum - 1]->attname)))); cstate->force_null_flags[attnum - 1] = true; } } @@ -1677,7 +1677,7 @@ BeginCopy(ParseState *pstate, ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), errmsg_internal("selected column \"%s\" not referenced by COPY", - NameStr(tupDesc->attrs[attnum - 1]->attname)))); + NameStr(tupDesc->attrs[attnum - 1]->attname)))); cstate->convert_select_flags[attnum - 1] = true; } } @@ -1841,7 +1841,7 @@ BeginCopyTo(ParseState *pstate, if (!is_absolute_path(filename)) ereport(ERROR, (errcode(ERRCODE_INVALID_NAME), - errmsg("relative path not allowed for COPY to file"))); + errmsg("relative path not allowed for COPY to file"))); oumask = umask(S_IWGRP | S_IWOTH); cstate->copy_file = AllocateFile(cstate->filename, PG_BINARY_W); @@ -2009,8 +2009,8 @@ CopyTo(CopyState cstate) */ if (cstate->need_transcoding) cstate->null_print_client = pg_server_to_any(cstate->null_print, - cstate->null_print_len, - cstate->file_encoding); + cstate->null_print_len, + cstate->file_encoding); /* if a header has been requested send the line */ if (cstate->header_line) @@ -2120,7 +2120,7 @@ CopyOneRowTo(CopyState cstate, Oid tupleOid, Datum *values, bool *nulls) if (cstate->oids) { string = DatumGetCString(DirectFunctionCall1(oidout, - ObjectIdGetDatum(tupleOid))); + ObjectIdGetDatum(tupleOid))); CopySendString(cstate, string); need_delim = true; } @@ -2418,7 +2418,7 @@ CopyFrom(CopyState cstate) errmsg("cannot perform FREEZE because of prior transaction activity"))); if (cstate->rel->rd_createSubid != GetCurrentSubTransactionId() && - cstate->rel->rd_newRelfilenodeSubid != GetCurrentSubTransactionId()) + cstate->rel->rd_newRelfilenodeSubid != GetCurrentSubTransactionId()) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("cannot perform FREEZE because the table was not created or truncated in the current subtransaction"))); @@ -2556,7 +2556,7 @@ CopyFrom(CopyState cstate) * partition, respectively. */ leaf_part_index = ExecFindPartition(resultRelInfo, - cstate->partition_dispatch_info, + cstate->partition_dispatch_info, slot, estate); Assert(leaf_part_index >= 0 && @@ -2584,7 +2584,7 @@ CopyFrom(CopyState cstate) if (resultRelInfo->ri_FdwRoutine) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot route inserted tuples to a foreign table"))); + errmsg("cannot route inserted tuples to a foreign table"))); /* * For ExecInsertIndexTuples() to work on the partition's indexes @@ -2695,7 +2695,7 @@ CopyFrom(CopyState cstate) if (resultRelInfo->ri_NumIndices > 0) recheckIndexes = ExecInsertIndexTuples(slot, - &(tuple->t_self), + &(tuple->t_self), estate, false, NULL, @@ -3100,7 +3100,7 @@ BeginCopyFrom(ParseState *pstate, if ((tmp >> 16) != 0) ereport(ERROR, (errcode(ERRCODE_BAD_COPY_FILE_FORMAT), - errmsg("unrecognized critical flags in COPY file header"))); + errmsg("unrecognized critical flags in COPY file header"))); /* Header extension length */ if (!CopyGetInt32(cstate, &tmp) || tmp < 0) @@ -3268,7 +3268,7 @@ NextCopyFrom(CopyState cstate, ExprContext *econtext, cstate->cur_attname = "oid"; cstate->cur_attval = string; *tupleOid = DatumGetObjectId(DirectFunctionCall1(oidin, - CStringGetDatum(string))); + CStringGetDatum(string))); if (*tupleOid == InvalidOid) ereport(ERROR, (errcode(ERRCODE_BAD_COPY_FILE_FORMAT), @@ -3388,8 +3388,8 @@ NextCopyFrom(CopyState cstate, ExprContext *econtext, loaded_oid = DatumGetObjectId(CopyReadBinaryAttribute(cstate, 0, - &cstate->oid_in_function, - cstate->oid_typioparam, + &cstate->oid_in_function, + cstate->oid_typioparam, -1, &isnull)); if (isnull || loaded_oid == InvalidOid) @@ -3717,10 +3717,10 @@ CopyReadLineText(CopyState cstate) ereport(ERROR, (errcode(ERRCODE_BAD_COPY_FILE_FORMAT), !cstate->csv_mode ? - errmsg("literal carriage return found in data") : - errmsg("unquoted carriage return found in data"), + errmsg("literal carriage return found in data") : + errmsg("unquoted carriage return found in data"), !cstate->csv_mode ? - errhint("Use \"\\r\" to represent carriage return.") : + errhint("Use \"\\r\" to represent carriage return.") : errhint("Use quoted CSV field to represent carriage return."))); /* @@ -3737,7 +3737,7 @@ CopyReadLineText(CopyState cstate) errmsg("literal carriage return found in data") : errmsg("unquoted carriage return found in data"), !cstate->csv_mode ? - errhint("Use \"\\r\" to represent carriage return.") : + errhint("Use \"\\r\" to represent carriage return.") : errhint("Use quoted CSV field to represent carriage return."))); /* If reach here, we have found the line terminator */ break; @@ -3754,7 +3754,7 @@ CopyReadLineText(CopyState cstate) errmsg("unquoted newline found in data"), !cstate->csv_mode ? errhint("Use \"\\n\" to represent newline.") : - errhint("Use quoted CSV field to represent newline."))); + errhint("Use quoted CSV field to represent newline."))); cstate->eol_type = EOL_NL; /* in case not set yet */ /* If reach here, we have found the line terminator */ break; @@ -3845,8 +3845,8 @@ CopyReadLineText(CopyState cstate) */ if (prev_raw_ptr > cstate->raw_buf_index) appendBinaryStringInfo(&cstate->line_buf, - cstate->raw_buf + cstate->raw_buf_index, - prev_raw_ptr - cstate->raw_buf_index); + cstate->raw_buf + cstate->raw_buf_index, + prev_raw_ptr - cstate->raw_buf_index); cstate->raw_buf_index = raw_buf_ptr; result = true; /* report EOF */ break; @@ -4682,8 +4682,8 @@ CopyGetAttnums(TupleDesc tupDesc, Relation rel, List *attnamelist) if (rel != NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("column \"%s\" of relation \"%s\" does not exist", - name, RelationGetRelationName(rel)))); + errmsg("column \"%s\" of relation \"%s\" does not exist", + name, RelationGetRelationName(rel)))); else ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), diff --git a/src/backend/commands/createas.c b/src/backend/commands/createas.c index 06425cc0eb..97f9c55d6e 100644 --- a/src/backend/commands/createas.c +++ b/src/backend/commands/createas.c @@ -288,7 +288,7 @@ ExecCreateTableAs(CreateTableAsStmt *stmt, const char *queryString, { GetUserIdAndSecContext(&save_userid, &save_sec_context); SetUserIdAndSecContext(save_userid, - save_sec_context | SECURITY_RESTRICTED_OPERATION); + save_sec_context | SECURITY_RESTRICTED_OPERATION); save_nestlevel = NewGUCNestLevel(); } @@ -532,7 +532,7 @@ intorel_startup(DestReceiver *self, int operation, TupleDesc typeinfo) for (attnum = 1; attnum <= intoRelationDesc->rd_att->natts; attnum++) rte->insertedCols = bms_add_member(rte->insertedCols, - attnum - FirstLowInvalidHeapAttributeNumber); + attnum - FirstLowInvalidHeapAttributeNumber); ExecCheckRTPerms(list_make1(rte), true); diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index 96ab6f23cd..e138539035 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -429,7 +429,7 @@ createdb(ParseState *pstate, const CreatedbStmt *stmt) if (dst_deftablespace == GLOBALTABLESPACE_OID) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("pg_global cannot be used as default tablespace"))); + errmsg("pg_global cannot be used as default tablespace"))); /* * If we are trying to change the default tablespace of the template, @@ -491,8 +491,8 @@ createdb(ParseState *pstate, const CreatedbStmt *stmt) if (CountOtherDBBackends(src_dboid, ¬herbackends, &npreparedxacts)) ereport(ERROR, (errcode(ERRCODE_OBJECT_IN_USE), - errmsg("source database \"%s\" is being accessed by other users", - dbtemplate), + errmsg("source database \"%s\" is being accessed by other users", + dbtemplate), errdetail_busy_db(notherbackends, npreparedxacts))); /* @@ -736,8 +736,8 @@ check_encoding_locale_matches(int encoding, const char *collate, const char *cty errmsg("encoding \"%s\" does not match locale \"%s\"", pg_encoding_to_char(encoding), ctype), - errdetail("The chosen LC_CTYPE setting requires encoding \"%s\".", - pg_encoding_to_char(ctype_encoding)))); + errdetail("The chosen LC_CTYPE setting requires encoding \"%s\".", + pg_encoding_to_char(ctype_encoding)))); if (!(collate_encoding == encoding || collate_encoding == PG_SQL_ASCII || @@ -751,8 +751,8 @@ check_encoding_locale_matches(int encoding, const char *collate, const char *cty errmsg("encoding \"%s\" does not match locale \"%s\"", pg_encoding_to_char(encoding), collate), - errdetail("The chosen LC_COLLATE setting requires encoding \"%s\".", - pg_encoding_to_char(collate_encoding)))); + errdetail("The chosen LC_COLLATE setting requires encoding \"%s\".", + pg_encoding_to_char(collate_encoding)))); } /* Error cleanup callback for createdb */ @@ -799,7 +799,7 @@ dropdb(const char *dbname, bool missing_ok) pgdbrel = heap_open(DatabaseRelationId, RowExclusiveLock); if (!get_db_info(dbname, AccessExclusiveLock, &db_id, NULL, NULL, - &db_istemplate, NULL, NULL, NULL, NULL, NULL, NULL, NULL)) + &db_istemplate, NULL, NULL, NULL, NULL, NULL, NULL, NULL)) { if (!missing_ok) { @@ -1094,7 +1094,7 @@ movedb(const char *dbname, const char *tblspcname) pgdbrel = heap_open(DatabaseRelationId, RowExclusiveLock); if (!get_db_info(dbname, AccessExclusiveLock, &db_id, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, &src_tblspcoid, NULL, NULL)) + NULL, NULL, NULL, NULL, NULL, &src_tblspcoid, NULL, NULL)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_DATABASE), errmsg("database \"%s\" does not exist", dbname))); @@ -1472,8 +1472,8 @@ AlterDatabase(ParseState *pstate, AlterDatabaseStmt *stmt, bool isTopLevel) if (list_length(stmt->options) != 1) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("option \"%s\" cannot be specified with other options", - dtablespace->defname), + errmsg("option \"%s\" cannot be specified with other options", + dtablespace->defname), parser_errposition(pstate, dtablespace->location))); /* this case isn't allowed within a transaction block */ PreventTransactionChain(isTopLevel, "ALTER DATABASE SET TABLESPACE"); @@ -1664,7 +1664,7 @@ AlterDatabaseOwner(const char *dbname, Oid newOwnerId) if (!have_createdb_privilege()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("permission denied to change owner of database"))); + errmsg("permission denied to change owner of database"))); memset(repl_null, false, sizeof(repl_null)); memset(repl_repl, false, sizeof(repl_repl)); @@ -1993,7 +1993,7 @@ errdetail_busy_db(int notherbackends, int npreparedxacts) notherbackends); else errdetail_plural("There is %d prepared transaction using the database.", - "There are %d prepared transactions using the database.", + "There are %d prepared transactions using the database.", npreparedxacts, npreparedxacts); return 0; /* just to keep ereport macro happy */ diff --git a/src/backend/commands/define.c b/src/backend/commands/define.c index 3ad4eea59e..8eff0ad17b 100644 --- a/src/backend/commands/define.c +++ b/src/backend/commands/define.c @@ -206,7 +206,7 @@ defGetInt64(DefElem *def) * strings. */ return DatumGetInt64(DirectFunctionCall1(int8in, - CStringGetDatum(strVal(def->arg)))); + CStringGetDatum(strVal(def->arg)))); default: ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), diff --git a/src/backend/commands/dropcmds.c b/src/backend/commands/dropcmds.c index 9e307eb8af..2b30677d6f 100644 --- a/src/backend/commands/dropcmds.c +++ b/src/backend/commands/dropcmds.c @@ -102,8 +102,8 @@ RemoveObjects(DropStmt *stmt) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg("\"%s\" is an aggregate function", - NameListToString(castNode(ObjectWithArgs, object)->objname)), - errhint("Use DROP AGGREGATE to drop aggregate functions."))); + NameListToString(castNode(ObjectWithArgs, object)->objname)), + errhint("Use DROP AGGREGATE to drop aggregate functions."))); ReleaseSysCache(tup); } @@ -393,7 +393,7 @@ does_not_exist_skipping(ObjectType objtype, Node *object) msg = gettext_noop("trigger \"%s\" for relation \"%s\" does not exist, skipping"); name = strVal(llast(castNode(List, object))); args = NameListToString(list_truncate(list_copy(castNode(List, object)), - list_length(castNode(List, object)) - 1)); + list_length(castNode(List, object)) - 1)); } break; case OBJECT_POLICY: @@ -402,7 +402,7 @@ does_not_exist_skipping(ObjectType objtype, Node *object) msg = gettext_noop("policy \"%s\" for relation \"%s\" does not exist, skipping"); name = strVal(llast(castNode(List, object))); args = NameListToString(list_truncate(list_copy(castNode(List, object)), - list_length(castNode(List, object)) - 1)); + list_length(castNode(List, object)) - 1)); } break; case OBJECT_EVENT_TRIGGER: @@ -415,7 +415,7 @@ does_not_exist_skipping(ObjectType objtype, Node *object) msg = gettext_noop("rule \"%s\" for relation \"%s\" does not exist, skipping"); name = strVal(llast(castNode(List, object))); args = NameListToString(list_truncate(list_copy(castNode(List, object)), - list_length(castNode(List, object)) - 1)); + list_length(castNode(List, object)) - 1)); } break; case OBJECT_FDW: diff --git a/src/backend/commands/event_trigger.c b/src/backend/commands/event_trigger.c index 48a6375559..938133bbe4 100644 --- a/src/backend/commands/event_trigger.c +++ b/src/backend/commands/event_trigger.c @@ -210,7 +210,7 @@ CreateEventTrigger(CreateEventTrigStmt *stmt) else ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("unrecognized filter variable \"%s\"", def->defname))); + errmsg("unrecognized filter variable \"%s\"", def->defname))); } /* Validate tag list, if any. */ @@ -585,7 +585,7 @@ AlterEventTriggerOwner_oid(Oid trigOid, Oid newOwnerId) if (!HeapTupleIsValid(tup)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("event trigger with OID %u does not exist", trigOid))); + errmsg("event trigger with OID %u does not exist", trigOid))); AlterEventTriggerOwner_internal(rel, tup, newOwnerId); @@ -615,9 +615,9 @@ AlterEventTriggerOwner_internal(Relation rel, HeapTuple tup, Oid newOwnerId) if (!superuser_arg(newOwnerId)) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("permission denied to change owner of event trigger \"%s\"", - NameStr(form->evtname)), - errhint("The owner of an event trigger must be a superuser."))); + errmsg("permission denied to change owner of event trigger \"%s\"", + NameStr(form->evtname)), + errhint("The owner of an event trigger must be a superuser."))); form->evtowner = newOwnerId; CatalogTupleUpdate(rel, &tup->t_self, tup); @@ -1461,8 +1461,8 @@ pg_event_trigger_dropped_objects(PG_FUNCTION_ARGS) !currentEventTriggerState->in_sql_drop) ereport(ERROR, (errcode(ERRCODE_E_R_I_E_EVENT_TRIGGER_PROTOCOL_VIOLATED), - errmsg("%s can only be called in a sql_drop event trigger function", - "pg_event_trigger_dropped_objects()"))); + errmsg("%s can only be called in a sql_drop event trigger function", + "pg_event_trigger_dropped_objects()"))); /* check to see if caller supports us returning a tuplestore */ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo)) @@ -2118,10 +2118,10 @@ pg_event_trigger_ddl_commands(PG_FUNCTION_ARGS) addr.classId, addr.objectId); schema_oid = heap_getattr(objtup, nspAttnum, - RelationGetDescr(catalog), &isnull); + RelationGetDescr(catalog), &isnull); if (isnull) elog(ERROR, - "invalid null namespace in object %u/%u/%d", + "invalid null namespace in object %u/%u/%d", addr.classId, addr.objectId, addr.objectSubId); /* XXX not quite get_namespace_name_or_temp */ if (isAnyTempNamespace(schema_oid)) @@ -2168,7 +2168,7 @@ pg_event_trigger_ddl_commands(PG_FUNCTION_ARGS) values[i++] = CStringGetTextDatum(CreateCommandTag(cmd->parsetree)); /* object_type */ values[i++] = CStringGetTextDatum(stringify_adefprivs_objtype( - cmd->d.defprivs.objtype)); + cmd->d.defprivs.objtype)); /* schema */ nulls[i++] = true; /* identity */ @@ -2191,7 +2191,7 @@ pg_event_trigger_ddl_commands(PG_FUNCTION_ARGS) "GRANT" : "REVOKE"); /* object_type */ values[i++] = CStringGetTextDatum(stringify_grantobjtype( - cmd->d.grant.istmt->objtype)); + cmd->d.grant.istmt->objtype)); /* schema */ nulls[i++] = true; /* identity */ diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c index 9359d0a83a..7648201218 100644 --- a/src/backend/commands/explain.c +++ b/src/backend/commands/explain.c @@ -191,8 +191,8 @@ ExplainQuery(ParseState *pstate, ExplainStmt *stmt, const char *queryString, else ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("unrecognized value for EXPLAIN option \"%s\": \"%s\"", - opt->defname, p), + errmsg("unrecognized value for EXPLAIN option \"%s\": \"%s\"", + opt->defname, p), parser_errposition(pstate, opt->location))); } else @@ -445,7 +445,7 @@ ExplainOneUtility(Node *utilityStmt, IntoClause *into, ExplainState *es, { if (es->format == EXPLAIN_FORMAT_TEXT) appendStringInfoString(es->str, - "Utility statements have no plan structure\n"); + "Utility statements have no plan structure\n"); else ExplainDummyGroup("Utility Statement", NULL, es); } @@ -813,14 +813,14 @@ ExplainPreScanNode(PlanState *planstate, Bitmapset **rels_used) break; case T_CustomScan: *rels_used = bms_add_members(*rels_used, - ((CustomScan *) plan)->custom_relids); + ((CustomScan *) plan)->custom_relids); break; case T_ModifyTable: *rels_used = bms_add_member(*rels_used, - ((ModifyTable *) plan)->nominalRelation); + ((ModifyTable *) plan)->nominalRelation); if (((ModifyTable *) plan)->exclRelRTI) *rels_used = bms_add_member(*rels_used, - ((ModifyTable *) plan)->exclRelRTI); + ((ModifyTable *) plan)->exclRelRTI); break; default: break; @@ -1301,7 +1301,7 @@ ExplainNode(PlanState *planstate, List *ancestors, { if (es->timing) appendStringInfo(es->str, - " (actual time=%.3f..%.3f rows=%.0f loops=%.0f)", + " (actual time=%.3f..%.3f rows=%.0f loops=%.0f)", startup_sec, total_sec, rows, nloops); else appendStringInfo(es->str, @@ -1390,7 +1390,7 @@ ExplainNode(PlanState *planstate, List *ancestors, planstate, es); if (es->analyze) ExplainPropertyLong("Heap Fetches", - ((IndexOnlyScanState *) planstate)->ioss_HeapFetches, es); + ((IndexOnlyScanState *) planstate)->ioss_HeapFetches, es); break; case T_BitmapIndexScan: show_scan_qual(((BitmapIndexScan *) plan)->indexqualorig, @@ -1647,7 +1647,7 @@ ExplainNode(PlanState *planstate, List *ancestors, appendStringInfo(es->str, "Worker %d: ", n); if (es->timing) appendStringInfo(es->str, - "actual time=%.3f..%.3f rows=%.0f loops=%.0f\n", + "actual time=%.3f..%.3f rows=%.0f loops=%.0f\n", startup_sec, total_sec, rows, nloops); else appendStringInfo(es->str, @@ -2344,7 +2344,7 @@ show_hash_info(HashState *hashstate, ExplainState *es) { appendStringInfoSpaces(es->str, es->indent * 2); appendStringInfo(es->str, - "Buckets: %d Batches: %d Memory Usage: %ldkB\n", + "Buckets: %d Batches: %d Memory Usage: %ldkB\n", hashtable->nbuckets, hashtable->nbatch, spacePeakKb); } @@ -2538,10 +2538,10 @@ show_buffer_usage(ExplainState *es, const BufferUsage *usage) appendStringInfoString(es->str, "I/O Timings:"); if (!INSTR_TIME_IS_ZERO(usage->blk_read_time)) appendStringInfo(es->str, " read=%0.3f", - INSTR_TIME_GET_MILLISEC(usage->blk_read_time)); + INSTR_TIME_GET_MILLISEC(usage->blk_read_time)); if (!INSTR_TIME_IS_ZERO(usage->blk_write_time)) appendStringInfo(es->str, " write=%0.3f", - INSTR_TIME_GET_MILLISEC(usage->blk_write_time)); + INSTR_TIME_GET_MILLISEC(usage->blk_write_time)); appendStringInfoChar(es->str, '\n'); } } @@ -2787,7 +2787,7 @@ show_modifytable_info(ModifyTableState *mtstate, List *ancestors, /* Should we explicitly label target relations? */ labeltargets = (mtstate->mt_nplans > 1 || (mtstate->mt_nplans == 1 && - mtstate->resultRelInfo->ri_RangeTableIndex != node->nominalRelation)); + mtstate->resultRelInfo->ri_RangeTableIndex != node->nominalRelation)); if (labeltargets) ExplainOpenGroup("Target Tables", "Target Tables", false, es); @@ -3369,7 +3369,7 @@ ExplainBeginOutput(ExplainState *es) case EXPLAIN_FORMAT_XML: appendStringInfoString(es->str, - "<explain xmlns=\"http://www.postgresql.org/2009/explain\">\n"); + "<explain xmlns=\"http://www.postgresql.org/2009/explain\">\n"); es->indent++; break; diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c index a40b5ec4de..e4340eed8c 100644 --- a/src/backend/commands/extension.c +++ b/src/backend/commands/extension.c @@ -286,7 +286,7 @@ check_valid_extension_name(const char *extensionname) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("invalid extension name: \"%s\"", extensionname), - errdetail("Extension names must not begin or end with \"-\"."))); + errdetail("Extension names must not begin or end with \"-\"."))); /* * No directory separators either (this is sufficient to prevent ".." @@ -311,7 +311,7 @@ check_valid_version_name(const char *versionname) if (namelen == 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid extension version name: \"%s\"", versionname), + errmsg("invalid extension version name: \"%s\"", versionname), errdetail("Version names must not be empty."))); /* @@ -320,7 +320,7 @@ check_valid_version_name(const char *versionname) if (strstr(versionname, "--")) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid extension version name: \"%s\"", versionname), + errmsg("invalid extension version name: \"%s\"", versionname), errdetail("Version names must not contain \"--\"."))); /* @@ -329,8 +329,8 @@ check_valid_version_name(const char *versionname) if (versionname[0] == '-' || versionname[namelen - 1] == '-') ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid extension version name: \"%s\"", versionname), - errdetail("Version names must not begin or end with \"-\"."))); + errmsg("invalid extension version name: \"%s\"", versionname), + errdetail("Version names must not begin or end with \"-\"."))); /* * No directory separators either (this is sufficient to prevent ".." @@ -339,7 +339,7 @@ check_valid_version_name(const char *versionname) if (first_dir_separator(versionname) != NULL) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid extension version name: \"%s\"", versionname), + errmsg("invalid extension version name: \"%s\"", versionname), errdetail("Version names must not contain directory separator characters."))); } @@ -575,8 +575,8 @@ parse_extension_control_file(ExtensionControlFile *control, /* syntax error in name list */ ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("parameter \"%s\" must be a list of extension names", - item->name))); + errmsg("parameter \"%s\" must be a list of extension names", + item->name))); } } else @@ -914,8 +914,8 @@ execute_extension_script(Oid extensionOid, ExtensionControlFile *control, { t_sql = DirectFunctionCall3(replace_text, t_sql, - CStringGetTextDatum("MODULE_PATHNAME"), - CStringGetTextDatum(control->module_pathname)); + CStringGetTextDatum("MODULE_PATHNAME"), + CStringGetTextDatum(control->module_pathname)); } /* And now back to C string */ @@ -1423,9 +1423,9 @@ CreateExtensionInternal(char *extensionName, !cascade) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("extension \"%s\" must be installed in schema \"%s\"", - control->name, - control->schema))); + errmsg("extension \"%s\" must be installed in schema \"%s\"", + control->name, + control->schema))); /* Always use the schema from control file for current extension. */ schemaName = control->schema; @@ -1844,8 +1844,8 @@ RemoveExtensionById(Oid extId) if (extId == CurrentExtensionObject) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("cannot drop extension \"%s\" because it is being modified", - get_extension_name(extId)))); + errmsg("cannot drop extension \"%s\" because it is being modified", + get_extension_name(extId)))); rel = heap_open(ExtensionRelationId, RowExclusiveLock); @@ -2363,8 +2363,8 @@ pg_extension_config_dump(PG_FUNCTION_ARGS) CurrentExtensionObject) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("table \"%s\" is not a member of the extension being created", - tablename))); + errmsg("table \"%s\" is not a member of the extension being created", + tablename))); /* * Add the table OID and WHERE condition to the extension's extconfig and @@ -2976,8 +2976,8 @@ ExecAlterExtensionStmt(ParseState *pstate, AlterExtensionStmt *stmt) if (strcmp(oldVersionName, versionName) == 0) { ereport(NOTICE, - (errmsg("version \"%s\" of extension \"%s\" is already installed", - versionName, stmt->extname))); + (errmsg("version \"%s\" of extension \"%s\" is already installed", + versionName, stmt->extname))); return InvalidObjectAddress; } diff --git a/src/backend/commands/foreigncmds.c b/src/backend/commands/foreigncmds.c index ba85952baa..9ad991507f 100644 --- a/src/backend/commands/foreigncmds.c +++ b/src/backend/commands/foreigncmds.c @@ -230,7 +230,7 @@ AlterForeignDataWrapperOwner_internal(Relation rel, HeapTuple tup, Oid newOwnerI (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), errmsg("permission denied to change owner of foreign-data wrapper \"%s\"", NameStr(form->fdwname)), - errhint("The owner of a foreign-data wrapper must be a superuser."))); + errhint("The owner of a foreign-data wrapper must be a superuser."))); if (form->fdwowner != newOwnerId) { @@ -321,7 +321,7 @@ AlterForeignDataWrapperOwner_oid(Oid fwdId, Oid newOwnerId) if (!HeapTupleIsValid(tup)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("foreign-data wrapper with OID %u does not exist", fwdId))); + errmsg("foreign-data wrapper with OID %u does not exist", fwdId))); AlterForeignDataWrapperOwner_internal(rel, tup, newOwnerId); @@ -485,7 +485,7 @@ lookup_fdw_handler_func(DefElem *handler) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg("function %s must return type %s", - NameListToString((List *) handler->arg), "fdw_handler"))); + NameListToString((List *) handler->arg), "fdw_handler"))); return handlerOid; } @@ -579,9 +579,9 @@ CreateForeignDataWrapper(CreateFdwStmt *stmt) if (!superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("permission denied to create foreign-data wrapper \"%s\"", - stmt->fdwname), - errhint("Must be superuser to create a foreign-data wrapper."))); + errmsg("permission denied to create foreign-data wrapper \"%s\"", + stmt->fdwname), + errhint("Must be superuser to create a foreign-data wrapper."))); /* For now the owner cannot be specified on create. Use effective user ID. */ ownerId = GetUserId(); @@ -693,9 +693,9 @@ AlterForeignDataWrapper(AlterFdwStmt *stmt) if (!superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("permission denied to alter foreign-data wrapper \"%s\"", - stmt->fdwname), - errhint("Must be superuser to alter a foreign-data wrapper."))); + errmsg("permission denied to alter foreign-data wrapper \"%s\"", + stmt->fdwname), + errhint("Must be superuser to alter a foreign-data wrapper."))); tp = SearchSysCacheCopy1(FOREIGNDATAWRAPPERNAME, CStringGetDatum(stmt->fdwname)); @@ -703,7 +703,7 @@ AlterForeignDataWrapper(AlterFdwStmt *stmt) if (!HeapTupleIsValid(tp)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("foreign-data wrapper \"%s\" does not exist", stmt->fdwname))); + errmsg("foreign-data wrapper \"%s\" does not exist", stmt->fdwname))); fdwForm = (Form_pg_foreign_data_wrapper) GETSTRUCT(tp); fdwId = HeapTupleGetOid(tp); @@ -741,8 +741,8 @@ AlterForeignDataWrapper(AlterFdwStmt *stmt) */ if (OidIsValid(fdwvalidator)) ereport(WARNING, - (errmsg("changing the foreign-data wrapper validator can cause " - "the options for dependent objects to become invalid"))); + (errmsg("changing the foreign-data wrapper validator can cause " + "the options for dependent objects to become invalid"))); } else { @@ -1182,9 +1182,9 @@ CreateUserMapping(CreateUserMappingStmt *stmt) else ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("user mapping for \"%s\" already exists for server %s", - MappingUserName(useId), - stmt->servername))); + errmsg("user mapping for \"%s\" already exists for server %s", + MappingUserName(useId), + stmt->servername))); } fdw = GetForeignDataWrapper(srv->fdwid); @@ -1275,8 +1275,8 @@ AlterUserMapping(AlterUserMappingStmt *stmt) if (!OidIsValid(umId)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("user mapping for \"%s\" does not exist for the server", - MappingUserName(useId)))); + errmsg("user mapping for \"%s\" does not exist for the server", + MappingUserName(useId)))); user_mapping_ddl_aclcheck(useId, srv->serverid, stmt->servername); @@ -1390,8 +1390,8 @@ RemoveUserMapping(DropUserMappingStmt *stmt) if (!stmt->missing_ok) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("user mapping for \"%s\" does not exist for the server", - MappingUserName(useId)))); + errmsg("user mapping for \"%s\" does not exist for the server", + MappingUserName(useId)))); /* IF EXISTS specified, just note it */ ereport(NOTICE, diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c index 1a165d5b0c..7de844b2ca 100644 --- a/src/backend/commands/functioncmds.c +++ b/src/backend/commands/functioncmds.c @@ -131,8 +131,8 @@ compute_return_type(TypeName *returnType, Oid languageOid, if (returnType->typmods != NIL) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("type modifier cannot be specified for shell type \"%s\"", - typnam))); + errmsg("type modifier cannot be specified for shell type \"%s\"", + typnam))); /* Otherwise, go ahead and make a shell type */ ereport(NOTICE, @@ -230,8 +230,8 @@ interpret_function_parameter_list(ParseState *pstate, if (languageOid == SQLlanguageId) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("SQL function cannot accept shell type %s", - TypeNameToString(t)))); + errmsg("SQL function cannot accept shell type %s", + TypeNameToString(t)))); /* We don't allow creating aggregates on shell types either */ else if (is_aggregate) ereport(ERROR, @@ -307,7 +307,7 @@ interpret_function_parameter_list(ParseState *pstate, if (!OidIsValid(get_element_type(toid))) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("VARIADIC parameter must be an array"))); + errmsg("VARIADIC parameter must be an array"))); break; } } @@ -347,8 +347,8 @@ interpret_function_parameter_list(ParseState *pstate, strcmp(prevfp->name, fp->name) == 0) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("parameter name \"%s\" used more than once", - fp->name))); + errmsg("parameter name \"%s\" used more than once", + fp->name))); } paramNames[i] = CStringGetTextDatum(fp->name); @@ -362,7 +362,7 @@ interpret_function_parameter_list(ParseState *pstate, if (!isinput) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("only input parameters can have default values"))); + errmsg("only input parameters can have default values"))); def = transformExpr(pstate, fp->defexpr, EXPR_KIND_FUNCTION_DEFAULT); @@ -1231,7 +1231,7 @@ AlterFunction(ParseState *pstate, AlterFunctionStmt *stmt) if (procForm->proleakproof && !superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("only superuser can define a leakproof function"))); + errmsg("only superuser can define a leakproof function"))); } if (cost_item) { @@ -1483,7 +1483,7 @@ CreateCast(CreateCastStmt *stmt) if (nargs < 1 || nargs > 3) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("cast function must take one to three arguments"))); + errmsg("cast function must take one to three arguments"))); if (!IsBinaryCoercible(sourcetypeid, procstruct->proargtypes.values[0])) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), @@ -1491,8 +1491,8 @@ CreateCast(CreateCastStmt *stmt) if (nargs > 1 && procstruct->proargtypes.values[1] != INT4OID) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("second argument of cast function must be type %s", - "integer"))); + errmsg("second argument of cast function must be type %s", + "integer"))); if (nargs > 2 && procstruct->proargtypes.values[2] != BOOLOID) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), @@ -1517,7 +1517,7 @@ CreateCast(CreateCastStmt *stmt) if (procstruct->proisagg) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("cast function must not be an aggregate function"))); + errmsg("cast function must not be an aggregate function"))); if (procstruct->proiswindow) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), @@ -1551,7 +1551,7 @@ CreateCast(CreateCastStmt *stmt) if (!superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("must be superuser to create a cast WITHOUT FUNCTION"))); + errmsg("must be superuser to create a cast WITHOUT FUNCTION"))); /* * Also, insist that the types match as to size, alignment, and @@ -1581,7 +1581,7 @@ CreateCast(CreateCastStmt *stmt) targettyptype == TYPTYPE_COMPOSITE) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("composite data types are not binary-compatible"))); + errmsg("composite data types are not binary-compatible"))); if (sourcetyptype == TYPTYPE_ENUM || targettyptype == TYPTYPE_ENUM) @@ -1620,7 +1620,7 @@ CreateCast(CreateCastStmt *stmt) if (sourcetypeid == targettypeid && nargs < 2) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("source data type and target data type are the same"))); + errmsg("source data type and target data type are the same"))); /* convert CoercionContext enum to char value for castcontext */ switch (stmt->context) @@ -1769,7 +1769,7 @@ check_transform_function(Form_pg_proc procstruct) if (procstruct->proisagg) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("transform function must not be an aggregate function"))); + errmsg("transform function must not be an aggregate function"))); if (procstruct->proiswindow) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), @@ -1785,8 +1785,8 @@ check_transform_function(Form_pg_proc procstruct) if (procstruct->proargtypes.values[0] != INTERNALOID) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("first argument of transform function must be type %s", - "internal"))); + errmsg("first argument of transform function must be type %s", + "internal"))); } @@ -1869,8 +1869,8 @@ CreateTransform(CreateTransformStmt *stmt) if (procstruct->prorettype != INTERNALOID) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("return data type of FROM SQL function must be %s", - "internal"))); + errmsg("return data type of FROM SQL function must be %s", + "internal"))); check_transform_function(procstruct); ReleaseSysCache(tuple); } @@ -1922,9 +1922,9 @@ CreateTransform(CreateTransformStmt *stmt) if (!stmt->replace) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("transform for type %s language \"%s\" already exists", - format_type_be(typeid), - stmt->lang))); + errmsg("transform for type %s language \"%s\" already exists", + format_type_be(typeid), + stmt->lang))); MemSet(replaces, false, sizeof(replaces)); replaces[Anum_pg_transform_trffromsql - 1] = true; @@ -2011,9 +2011,9 @@ get_transform_oid(Oid type_id, Oid lang_id, bool missing_ok) if (!OidIsValid(oid) && !missing_ok) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("transform for type %s language \"%s\" does not exist", - format_type_be(type_id), - get_language_name(lang_id, false)))); + errmsg("transform for type %s language \"%s\" does not exist", + format_type_be(type_id), + get_language_name(lang_id, false)))); return oid; } @@ -2160,8 +2160,8 @@ ExecuteDoStmt(DoStmt *stmt) if (!OidIsValid(laninline)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("language \"%s\" does not support inline code execution", - NameStr(languageStruct->lanname)))); + errmsg("language \"%s\" does not support inline code execution", + NameStr(languageStruct->lanname)))); ReleaseSysCache(languageTuple); diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index e3f2dcfa8c..620704ec49 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -522,18 +522,18 @@ DefineIndex(Oid relationId, if (stmt->unique && !amRoutine->amcanunique) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("access method \"%s\" does not support unique indexes", - accessMethodName))); + errmsg("access method \"%s\" does not support unique indexes", + accessMethodName))); if (numberOfAttributes > 1 && !amRoutine->amcanmulticol) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("access method \"%s\" does not support multicolumn indexes", - accessMethodName))); + errmsg("access method \"%s\" does not support multicolumn indexes", + accessMethodName))); if (stmt->excludeOpNames && amRoutine->amgettuple == NULL) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("access method \"%s\" does not support exclusion constraints", - accessMethodName))); + errmsg("access method \"%s\" does not support exclusion constraints", + accessMethodName))); amcanorder = amRoutine->amcanorder; amoptions = amRoutine->amoptions; @@ -604,7 +604,7 @@ DefineIndex(Oid relationId, if (attno < 0 && attno != ObjectIdAttributeNumber) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("index creation on system columns is not supported"))); + errmsg("index creation on system columns is not supported"))); } /* @@ -624,7 +624,7 @@ DefineIndex(Oid relationId, indexattrs)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("index creation on system columns is not supported"))); + errmsg("index creation on system columns is not supported"))); } } @@ -649,10 +649,10 @@ DefineIndex(Oid relationId, } ereport(DEBUG1, - (errmsg("%s %s will create implicit index \"%s\" for table \"%s\"", - is_alter_table ? "ALTER TABLE / ADD" : "CREATE TABLE /", - constraint_type, - indexRelationName, RelationGetRelationName(rel)))); + (errmsg("%s %s will create implicit index \"%s\" for table \"%s\"", + is_alter_table ? "ALTER TABLE / ADD" : "CREATE TABLE /", + constraint_type, + indexRelationName, RelationGetRelationName(rel)))); } /* @@ -897,7 +897,7 @@ DefineIndex(Oid relationId, newer_snapshots = GetCurrentVirtualXIDs(limitXmin, true, false, - PROC_IS_AUTOVACUUM | PROC_IN_VACUUM, + PROC_IS_AUTOVACUUM | PROC_IN_VACUUM, &n_newer_snapshots); for (j = i; j < n_old_snapshots; j++) { @@ -996,7 +996,7 @@ CheckPredicate(Expr *predicate) if (CheckMutability(predicate)) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("functions in index predicate must be marked IMMUTABLE"))); + errmsg("functions in index predicate must be marked IMMUTABLE"))); } /* @@ -1062,8 +1062,8 @@ ComputeIndexAttrs(IndexInfo *indexInfo, if (isconstraint) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("column \"%s\" named in key does not exist", - attribute->name))); + errmsg("column \"%s\" named in key does not exist", + attribute->name))); else ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), @@ -1374,7 +1374,7 @@ ResolveOpClass(List *opclass, Oid attrType, ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), errmsg("operator class \"%s\" does not accept data type %s", - NameListToString(opclass), format_type_be(attrType)))); + NameListToString(opclass), format_type_be(attrType)))); ReleaseSysCache(tuple); @@ -1463,8 +1463,8 @@ GetDefaultOpClass(Oid type_id, Oid am_id) if (nexact > 1) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("there are multiple default operator classes for data type %s", - format_type_be(type_id)))); + errmsg("there are multiple default operator classes for data type %s", + format_type_be(type_id)))); if (nexact == 1 || ncompatiblepreferred == 1 || diff --git a/src/backend/commands/matview.c b/src/backend/commands/matview.c index 9ffd91ea0e..7d57f97442 100644 --- a/src/backend/commands/matview.c +++ b/src/backend/commands/matview.c @@ -254,9 +254,9 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString, if (!hasUniqueIndex) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("cannot refresh materialized view \"%s\" concurrently", - quote_qualified_identifier(get_namespace_name(RelationGetNamespace(matviewRel)), - RelationGetRelationName(matviewRel))), + errmsg("cannot refresh materialized view \"%s\" concurrently", + quote_qualified_identifier(get_namespace_name(RelationGetNamespace(matviewRel)), + RelationGetRelationName(matviewRel))), errhint("Create a unique index with no WHERE clause on one or more columns of the materialized view."))); } @@ -570,7 +570,7 @@ mv_GenerateOper(StringInfo buf, Oid opoid) Assert(operform->oprkind == 'b'); appendStringInfo(buf, "OPERATOR(%s.%s)", - quote_identifier(get_namespace_name(operform->oprnamespace)), + quote_identifier(get_namespace_name(operform->oprnamespace)), NameStr(operform->oprname)); ReleaseSysCache(opertup); @@ -628,7 +628,7 @@ refresh_by_match_merge(Oid matviewOid, Oid tempOid, Oid relowner, initStringInfo(&querybuf); matviewRel = heap_open(matviewOid, NoLock); matviewname = quote_qualified_identifier(get_namespace_name(RelationGetNamespace(matviewRel)), - RelationGetRelationName(matviewRel)); + RelationGetRelationName(matviewRel)); tempRel = heap_open(tempOid, NoLock); tempname = quote_qualified_identifier(get_namespace_name(RelationGetNamespace(tempRel)), RelationGetRelationName(tempRel)); @@ -678,7 +678,7 @@ refresh_by_match_merge(Oid matviewOid, Oid tempOid, Oid relowner, errmsg("new data for materialized view \"%s\" contains duplicate rows without any null columns", RelationGetRelationName(matviewRel)), errdetail("Row: %s", - SPI_getvalue(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1)))); + SPI_getvalue(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1)))); } SetUserIdAndSecContext(relowner, @@ -799,7 +799,7 @@ refresh_by_match_merge(Oid matviewOid, Oid tempOid, Oid relowner, /* Deletes must come before inserts; do them first. */ resetStringInfo(&querybuf); appendStringInfo(&querybuf, - "DELETE FROM %s mv WHERE ctid OPERATOR(pg_catalog.=) ANY " + "DELETE FROM %s mv WHERE ctid OPERATOR(pg_catalog.=) ANY " "(SELECT diff.tid FROM %s diff " "WHERE diff.tid IS NOT NULL " "AND diff.newdata IS NULL)", diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c index 512014438b..a31b1acb9c 100644 --- a/src/backend/commands/opclasscmds.c +++ b/src/backend/commands/opclasscmds.c @@ -545,7 +545,7 @@ DefineOpClass(CreateOpClassStmt *stmt) if (OidIsValid(storageoid)) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("storage type specified more than once"))); + errmsg("storage type specified more than once"))); storageoid = typenameTypeId(NULL, item->storedtype); #ifdef NOT_USED @@ -619,8 +619,8 @@ DefineOpClass(CreateOpClassStmt *stmt) errmsg("could not make operator class \"%s\" be default for type %s", opcname, TypeNameToString(stmt->datatype)), - errdetail("Operator class \"%s\" already is the default.", - NameStr(opclass->opcname)))); + errdetail("Operator class \"%s\" already is the default.", + NameStr(opclass->opcname)))); } systable_endscan(scan); @@ -1085,8 +1085,8 @@ assignOperTypes(OpFamilyMember *member, Oid amoid, Oid typeoid) if (!amroutine->amcanorderbyop) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("access method \"%s\" does not support ordering operators", - get_am_name(amoid)))); + errmsg("access method \"%s\" does not support ordering operators", + get_am_name(amoid)))); } else { @@ -1142,7 +1142,7 @@ assignProcTypes(OpFamilyMember *member, Oid amoid, Oid typeoid) if (procform->prorettype != INT4OID) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("btree comparison procedures must return integer"))); + errmsg("btree comparison procedures must return integer"))); /* * If lefttype/righttype isn't specified, use the proc's input @@ -1163,7 +1163,7 @@ assignProcTypes(OpFamilyMember *member, Oid amoid, Oid typeoid) if (procform->prorettype != VOIDOID) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("btree sort support procedures must return void"))); + errmsg("btree sort support procedures must return void"))); /* * Can't infer lefttype/righttype from proc, so use default rule diff --git a/src/backend/commands/operatorcmds.c b/src/backend/commands/operatorcmds.c index c7e7676611..6674b41eec 100644 --- a/src/backend/commands/operatorcmds.c +++ b/src/backend/commands/operatorcmds.c @@ -111,7 +111,7 @@ DefineOperator(List *names, List *parameters) if (typeName1->setof) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("SETOF type not allowed for operator argument"))); + errmsg("SETOF type not allowed for operator argument"))); } else if (pg_strcasecmp(defel->defname, "rightarg") == 0) { @@ -119,7 +119,7 @@ DefineOperator(List *names, List *parameters) if (typeName2->setof) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("SETOF type not allowed for operator argument"))); + errmsg("SETOF type not allowed for operator argument"))); } else if (pg_strcasecmp(defel->defname, "procedure") == 0) functionName = defGetQualifiedName(defel); @@ -171,7 +171,7 @@ DefineOperator(List *names, List *parameters) if (!OidIsValid(typeId1) && !OidIsValid(typeId2)) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("at least one of leftarg or rightarg must be specified"))); + errmsg("at least one of leftarg or rightarg must be specified"))); if (typeName1) { @@ -275,8 +275,8 @@ ValidateRestrictionEstimator(List *restrictionName) if (get_func_rettype(restrictionOid) != FLOAT8OID) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("restriction estimator function %s must return type %s", - NameListToString(restrictionName), "float8"))); + errmsg("restriction estimator function %s must return type %s", + NameListToString(restrictionName), "float8"))); /* Require EXECUTE rights for the estimator */ aclresult = pg_proc_aclcheck(restrictionOid, GetUserId(), ACL_EXECUTE); @@ -479,7 +479,7 @@ AlterOperator(AlterOperatorStmt *stmt) if (OidIsValid(joinOid)) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("only binary operators can have join selectivity"))); + errmsg("only binary operators can have join selectivity"))); } if (oprForm->oprresult != BOOLOID) @@ -491,7 +491,7 @@ AlterOperator(AlterOperatorStmt *stmt) if (OidIsValid(joinOid)) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("only boolean operators can have join selectivity"))); + errmsg("only boolean operators can have join selectivity"))); } /* Update the tuple */ diff --git a/src/backend/commands/policy.c b/src/backend/commands/policy.c index dad31df517..9ced4ee34c 100644 --- a/src/backend/commands/policy.c +++ b/src/backend/commands/policy.c @@ -168,7 +168,7 @@ policy_role_list_to_array(List *roles, int *num_roles) ereport(WARNING, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("ignoring specified roles other than PUBLIC"), - errhint("All roles are members of the PUBLIC role."))); + errhint("All roles are members of the PUBLIC role."))); *num_roles = 1; } role_oids[0] = ObjectIdGetDatum(ACL_ID_PUBLIC); @@ -552,7 +552,7 @@ RemoveRoleFromObjectPolicy(Oid roleid, Oid classid, Oid policy_id) /* Get policy qual, to update dependencies */ value_datum = heap_getattr(tuple, Anum_pg_policy_polqual, - RelationGetDescr(pg_policy_rel), &attr_isnull); + RelationGetDescr(pg_policy_rel), &attr_isnull); if (!attr_isnull) { ParseState *qual_pstate; @@ -574,7 +574,7 @@ RemoveRoleFromObjectPolicy(Oid roleid, Oid classid, Oid policy_id) /* Get WITH CHECK qual, to update dependencies */ value_datum = heap_getattr(tuple, Anum_pg_policy_polwithcheck, - RelationGetDescr(pg_policy_rel), &attr_isnull); + RelationGetDescr(pg_policy_rel), &attr_isnull); if (!attr_isnull) { ParseState *with_check_pstate; @@ -797,11 +797,11 @@ CreatePolicy(CreatePolicyStmt *stmt) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), errmsg("policy \"%s\" for table \"%s\" already exists", - stmt->policy_name, RelationGetRelationName(target_table)))); + stmt->policy_name, RelationGetRelationName(target_table)))); values[Anum_pg_policy_polrelid - 1] = ObjectIdGetDatum(table_id); values[Anum_pg_policy_polname - 1] = DirectFunctionCall1(namein, - CStringGetDatum(stmt->policy_name)); + CStringGetDatum(stmt->policy_name)); values[Anum_pg_policy_polcmd - 1] = CharGetDatum(polcmd); values[Anum_pg_policy_polpermissive - 1] = BoolGetDatum(stmt->permissive); values[Anum_pg_policy_polroles - 1] = PointerGetDatum(role_ids); @@ -1242,7 +1242,7 @@ rename_policy(RenameStmt *stmt) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), errmsg("policy \"%s\" for table \"%s\" already exists", - stmt->newname, RelationGetRelationName(target_table)))); + stmt->newname, RelationGetRelationName(target_table)))); systable_endscan(sscan); @@ -1270,7 +1270,7 @@ rename_policy(RenameStmt *stmt) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), errmsg("policy \"%s\" for table \"%s\" does not exist", - stmt->subname, RelationGetRelationName(target_table)))); + stmt->subname, RelationGetRelationName(target_table)))); opoloid = HeapTupleGetOid(policy_tuple); diff --git a/src/backend/commands/prepare.c b/src/backend/commands/prepare.c index d265c77826..be7222f003 100644 --- a/src/backend/commands/prepare.c +++ b/src/backend/commands/prepare.c @@ -339,8 +339,8 @@ EvaluateParams(PreparedStatement *pstmt, List *params, if (nparams != num_params) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("wrong number of parameters for prepared statement \"%s\"", - pstmt->stmt_name), + errmsg("wrong number of parameters for prepared statement \"%s\"", + pstmt->stmt_name), errdetail("Expected %d parameters but got %d.", num_params, nparams))); @@ -381,7 +381,7 @@ EvaluateParams(PreparedStatement *pstmt, List *params, i + 1, format_type_be(given_type_id), format_type_be(expected_type_id)), - errhint("You will need to rewrite or cast the expression."))); + errhint("You will need to rewrite or cast the expression."))); /* Take care of collations in the finished expression. */ assign_expr_collations(pstate, expr); @@ -774,7 +774,7 @@ pg_prepared_statement(PG_FUNCTION_ARGS) values[1] = CStringGetTextDatum(prep_stmt->plansource->query_string); values[2] = TimestampTzGetDatum(prep_stmt->prepare_time); values[3] = build_regtype_array(prep_stmt->plansource->param_types, - prep_stmt->plansource->num_params); + prep_stmt->plansource->num_params); values[4] = BoolGetDatum(prep_stmt->from_sql); tuplestore_putvalues(tupstore, tupdesc, values, nulls); diff --git a/src/backend/commands/proclang.c b/src/backend/commands/proclang.c index 4d555f1f5c..9d2d43fe6b 100644 --- a/src/backend/commands/proclang.c +++ b/src/backend/commands/proclang.c @@ -115,7 +115,7 @@ CreateProceduralLanguage(CreatePLangStmt *stmt) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg("function %s must return type %s", - NameListToString(funcname), "language_handler"))); + NameListToString(funcname), "language_handler"))); } else { @@ -278,16 +278,16 @@ CreateProceduralLanguage(CreatePLangStmt *stmt) { ereport(WARNING, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("changing return type of function %s from %s to %s", - NameListToString(stmt->plhandler), - "opaque", "language_handler"))); + errmsg("changing return type of function %s from %s to %s", + NameListToString(stmt->plhandler), + "opaque", "language_handler"))); SetFunctionReturnType(handlerOid, LANGUAGE_HANDLEROID); } else ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg("function %s must return type %s", - NameListToString(stmt->plhandler), "language_handler"))); + NameListToString(stmt->plhandler), "language_handler"))); } /* validate the inline function */ diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c index 9cfac4a6f9..610cb499d2 100644 --- a/src/backend/commands/publicationcmds.c +++ b/src/backend/commands/publicationcmds.c @@ -157,7 +157,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 = heap_open(PublicationRelationId, RowExclusiveLock); @@ -664,8 +664,8 @@ AlterPublicationOwner_internal(Relation rel, HeapTuple tup, Oid newOwnerId) if (form->puballtables && !superuser_arg(newOwnerId)) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("permission denied to change owner of publication \"%s\"", - NameStr(form->pubname)), + errmsg("permission denied to change owner of publication \"%s\"", + NameStr(form->pubname)), errhint("The owner of a FOR ALL TABLES publication must be a superuser."))); } diff --git a/src/backend/commands/schemacmds.c b/src/backend/commands/schemacmds.c index 93425babbe..f9ea73f923 100644 --- a/src/backend/commands/schemacmds.c +++ b/src/backend/commands/schemacmds.c @@ -104,7 +104,7 @@ CreateSchemaCommand(CreateSchemaStmt *stmt, const char *queryString, ereport(ERROR, (errcode(ERRCODE_RESERVED_NAME), errmsg("unacceptable schema name \"%s\"", schemaName), - errdetail("The prefix \"pg_\" is reserved for system schemas."))); + errdetail("The prefix \"pg_\" is reserved for system schemas."))); /* * If if_not_exists was given and the schema already exists, bail out. @@ -133,7 +133,7 @@ CreateSchemaCommand(CreateSchemaStmt *stmt, const char *queryString, */ if (saved_uid != owner_uid) SetUserIdAndSecContext(owner_uid, - save_sec_context | SECURITY_LOCAL_USERID_CHANGE); + save_sec_context | SECURITY_LOCAL_USERID_CHANGE); /* Create the schema's namespace */ namespaceId = NamespaceCreate(schemaName, owner_uid, false); @@ -278,7 +278,7 @@ RenameSchema(const char *oldname, const char *newname) ereport(ERROR, (errcode(ERRCODE_RESERVED_NAME), errmsg("unacceptable schema name \"%s\"", newname), - errdetail("The prefix \"pg_\" is reserved for system schemas."))); + errdetail("The prefix \"pg_\" is reserved for system schemas."))); /* rename */ namestrcpy(&(((Form_pg_namespace) GETSTRUCT(tup))->nspname), newname); diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c index 58bda55837..bb611086ed 100644 --- a/src/backend/commands/sequence.c +++ b/src/backend/commands/sequence.c @@ -695,9 +695,9 @@ nextval_internal(Oid relid, bool check_permissions) snprintf(buf, sizeof(buf), INT64_FORMAT, maxv); ereport(ERROR, - (errcode(ERRCODE_SEQUENCE_GENERATOR_LIMIT_EXCEEDED), - errmsg("nextval: reached maximum value of sequence \"%s\" (%s)", - RelationGetRelationName(seqrel), buf))); + (errcode(ERRCODE_SEQUENCE_GENERATOR_LIMIT_EXCEEDED), + errmsg("nextval: reached maximum value of sequence \"%s\" (%s)", + RelationGetRelationName(seqrel), buf))); } next = minv; } @@ -718,9 +718,9 @@ nextval_internal(Oid relid, bool check_permissions) snprintf(buf, sizeof(buf), INT64_FORMAT, minv); ereport(ERROR, - (errcode(ERRCODE_SEQUENCE_GENERATOR_LIMIT_EXCEEDED), - errmsg("nextval: reached minimum value of sequence \"%s\" (%s)", - RelationGetRelationName(seqrel), buf))); + (errcode(ERRCODE_SEQUENCE_GENERATOR_LIMIT_EXCEEDED), + errmsg("nextval: reached minimum value of sequence \"%s\" (%s)", + RelationGetRelationName(seqrel), buf))); } next = maxv; } @@ -1382,7 +1382,7 @@ init_params(ParseState *pstate, List *options, bool for_identity, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), for_identity ? errmsg("identity column type must be smallint, integer, or bigint") - : errmsg("sequence type must be smallint, integer, or bigint"))); + : errmsg("sequence type must be smallint, integer, or bigint"))); if (!isInit) { @@ -1394,11 +1394,11 @@ init_params(ParseState *pstate, List *options, bool for_identity, */ if ((seqform->seqtypid == INT2OID && seqform->seqmax == PG_INT16_MAX) || (seqform->seqtypid == INT4OID && seqform->seqmax == PG_INT32_MAX) || - (seqform->seqtypid == INT8OID && seqform->seqmax == PG_INT64_MAX)) + (seqform->seqtypid == INT8OID && seqform->seqmax == PG_INT64_MAX)) reset_max_value = true; if ((seqform->seqtypid == INT2OID && seqform->seqmin == PG_INT16_MIN) || (seqform->seqtypid == INT4OID && seqform->seqmin == PG_INT32_MIN) || - (seqform->seqtypid == INT8OID && seqform->seqmin == PG_INT64_MIN)) + (seqform->seqtypid == INT8OID && seqform->seqmin == PG_INT64_MIN)) reset_min_value = true; } @@ -1469,8 +1469,8 @@ init_params(ParseState *pstate, List *options, bool for_identity, ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("MAXVALUE (%s) is out of range for sequence data type %s", - bufx, format_type_be(seqform->seqtypid)))); + errmsg("MAXVALUE (%s) is out of range for sequence data type %s", + bufx, format_type_be(seqform->seqtypid)))); } /* MINVALUE (null arg means NO MINVALUE) */ @@ -1506,8 +1506,8 @@ init_params(ParseState *pstate, List *options, bool for_identity, ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("MINVALUE (%s) is out of range for sequence data type %s", - bufm, format_type_be(seqform->seqtypid)))); + errmsg("MINVALUE (%s) is out of range for sequence data type %s", + bufm, format_type_be(seqform->seqtypid)))); } /* crosscheck min/max */ @@ -1559,8 +1559,8 @@ init_params(ParseState *pstate, List *options, bool for_identity, snprintf(bufm, sizeof(bufm), INT64_FORMAT, seqform->seqmax); ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("START value (%s) cannot be greater than MAXVALUE (%s)", - bufs, bufm))); + errmsg("START value (%s) cannot be greater than MAXVALUE (%s)", + bufs, bufm))); } /* RESTART [WITH] */ @@ -1589,8 +1589,8 @@ init_params(ParseState *pstate, List *options, bool for_identity, snprintf(bufm, sizeof(bufm), INT64_FORMAT, seqform->seqmin); ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("RESTART value (%s) cannot be less than MINVALUE (%s)", - bufs, bufm))); + errmsg("RESTART value (%s) cannot be less than MINVALUE (%s)", + bufs, bufm))); } if (seqdataform->last_value > seqform->seqmax) { @@ -1601,8 +1601,8 @@ init_params(ParseState *pstate, List *options, bool for_identity, snprintf(bufm, sizeof(bufm), INT64_FORMAT, seqform->seqmax); ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("RESTART value (%s) cannot be greater than MAXVALUE (%s)", - bufs, bufm))); + errmsg("RESTART value (%s) cannot be greater than MAXVALUE (%s)", + bufs, bufm))); } /* CACHE */ @@ -1654,7 +1654,7 @@ process_owned_by(Relation seqrel, List *owned_by, bool for_identity) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("invalid OWNED BY option"), - errhint("Specify OWNED BY table.column or OWNED BY NONE."))); + errhint("Specify OWNED BY table.column or OWNED BY NONE."))); tablerel = NULL; attnum = 0; } diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c index ea0a561401..476505512b 100644 --- a/src/backend/commands/statscmds.c +++ b/src/backend/commands/statscmds.c @@ -90,8 +90,8 @@ CreateStatistics(CreateStatsStmt *stmt) { ereport(NOTICE, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("statistics object \"%s\" already exists, skipping", - namestr))); + errmsg("statistics object \"%s\" already exists, skipping", + namestr))); return InvalidObjectAddress; } @@ -109,7 +109,7 @@ CreateStatistics(CreateStatsStmt *stmt) if (list_length(stmt->relations) != 1) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("only a single relation is allowed in CREATE STATISTICS"))); + errmsg("only a single relation is allowed in CREATE STATISTICS"))); foreach(cell, stmt->relations) { @@ -180,8 +180,8 @@ CreateStatistics(CreateStatsStmt *stmt) if (!HeapTupleIsValid(atttuple)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("column \"%s\" referenced in statistics does not exist", - attname))); + errmsg("column \"%s\" referenced in statistics does not exist", + attname))); attForm = (Form_pg_attribute) GETSTRUCT(atttuple); /* Disallow use of system attributes in extended stats */ @@ -235,7 +235,7 @@ CreateStatistics(CreateStatsStmt *stmt) if (attnums[i] == attnums[i - 1]) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_COLUMN), - errmsg("duplicate column name in statistics definition"))); + errmsg("duplicate column name in statistics definition"))); } /* Form an int2vector representation of the sorted column list */ diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c index 5aae7b6f91..9cbd36f646 100644 --- a/src/backend/commands/subscriptioncmds.c +++ b/src/backend/commands/subscriptioncmds.c @@ -466,8 +466,8 @@ CreateSubscription(CreateSubscriptionStmt *stmt, bool isTopLevel) walrcv_create_slot(wrconn, slotname, false, CRS_NOEXPORT_SNAPSHOT, &lsn); ereport(NOTICE, - (errmsg("created replication slot \"%s\" on publisher", - slotname))); + (errmsg("created replication slot \"%s\" on publisher", + slotname))); } } PG_CATCH(); @@ -570,7 +570,7 @@ AlterSubscription_refresh(Subscription *sub, bool copy_data) list_length(subrel_states), sizeof(Oid), oid_cmp)) { SetSubscriptionRelState(sub->oid, relid, - copy_data ? SUBREL_STATE_INIT : SUBREL_STATE_READY, + copy_data ? SUBREL_STATE_INIT : SUBREL_STATE_READY, InvalidXLogRecPtr, false); ereport(NOTICE, (errmsg("added subscription for table %s.%s", @@ -957,9 +957,9 @@ DropSubscription(DropSubscriptionStmt *stmt, bool isTopLevel) if (res->status != WALRCV_OK_COMMAND) ereport(ERROR, - (errmsg("could not drop the replication slot \"%s\" on publisher", - slotname), - errdetail("The error was: %s", res->err))); + (errmsg("could not drop the replication slot \"%s\" on publisher", + slotname), + errdetail("The error was: %s", res->err))); else ereport(NOTICE, (errmsg("dropped replication slot \"%s\" on publisher", @@ -1003,9 +1003,9 @@ AlterSubscriptionOwner_internal(Relation rel, HeapTuple tup, Oid newOwnerId) if (!superuser_arg(newOwnerId)) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("permission denied to change owner of subscription \"%s\"", - NameStr(form->subname)), - errhint("The owner of a subscription must be a superuser."))); + errmsg("permission denied to change owner of subscription \"%s\"", + NameStr(form->subname)), + errhint("The owner of a subscription must be a superuser."))); form->subowner = newOwnerId; CatalogTupleUpdate(rel, &tup->t_self, tup); diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 207241cb92..7d9c769b06 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -305,7 +305,7 @@ static void StoreCatalogInheritance1(Oid relationId, Oid parentOid, bool child_is_partition); static int findAttrByName(const char *attributeName, List *schema); static void AlterIndexNamespaces(Relation classRel, Relation rel, - Oid oldNspOid, Oid newNspOid, ObjectAddresses *objsMoved); + Oid oldNspOid, Oid newNspOid, ObjectAddresses *objsMoved); static void AlterSeqNamespaces(Relation classRel, Relation rel, Oid oldNspOid, Oid newNspOid, ObjectAddresses *objsMoved, LOCKMODE lockmode); @@ -441,7 +441,7 @@ static void ATExecSetRelOptions(Relation rel, List *defList, AlterTableType operation, LOCKMODE lockmode); static void ATExecEnableDisableTrigger(Relation rel, char *trigname, - char fires_when, bool skip_system, LOCKMODE lockmode); + char fires_when, bool skip_system, LOCKMODE lockmode); static void ATExecEnableDisableRule(Relation rel, char *rulename, char fires_when, LOCKMODE lockmode); static void ATPrepAddInherit(Relation child_rel); @@ -649,7 +649,7 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId, */ localHasOids = interpretOidsOption(stmt->options, (relkind == RELKIND_RELATION || - relkind == RELKIND_PARTITIONED_TABLE)); + relkind == RELKIND_PARTITIONED_TABLE)); descriptor->tdhasoid = (localHasOids || parentOidCount > 0); /* @@ -888,7 +888,7 @@ DropErrorMsgNonExistent(RangeVar *rel, char rightkind, bool missing_ok) { ereport(ERROR, (errcode(ERRCODE_UNDEFINED_SCHEMA), - errmsg("schema \"%s\" does not exist", rel->schemaname))); + errmsg("schema \"%s\" does not exist", rel->schemaname))); } else { @@ -943,7 +943,7 @@ DropErrorMsgWrongType(const char *relname, char wrongkind, char rightkind) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg(rentry->nota_msg, relname), - (wentry->kind != '\0') ? errhint("%s", _(wentry->drophint_msg)) : 0)); + (wentry->kind != '\0') ? errhint("%s", _(wentry->drophint_msg)) : 0)); } /* @@ -973,7 +973,7 @@ RemoveRelations(DropStmt *drop) if (drop->behavior == DROP_CASCADE) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("DROP INDEX CONCURRENTLY does not support CASCADE"))); + errmsg("DROP INDEX CONCURRENTLY does not support CASCADE"))); } /* @@ -1527,7 +1527,7 @@ truncate_check_rel(Relation rel) if (RELATION_IS_OTHER_TEMP(rel)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot truncate temporary tables of other sessions"))); + errmsg("cannot truncate temporary tables of other sessions"))); /* * Also check for active uses of the relation in the current transaction, @@ -1789,7 +1789,7 @@ MergeAttributes(List *schema, List *supers, char relpersistence, ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg(!is_partition - ? "cannot inherit from temporary relation of another session" + ? "cannot inherit from temporary relation of another session" : "cannot create as partition of temporary relation of another session"))); /* @@ -1806,8 +1806,8 @@ MergeAttributes(List *schema, List *supers, char relpersistence, if (list_member_oid(parentOids, RelationGetRelid(relation))) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_TABLE), - errmsg("relation \"%s\" would be inherited from more than once", - parent->relname))); + errmsg("relation \"%s\" would be inherited from more than once", + parent->relname))); parentOids = lappend_oid(parentOids, RelationGetRelid(relation)); @@ -1862,22 +1862,22 @@ MergeAttributes(List *schema, List *supers, char relpersistence, deftypmod != attribute->atttypmod) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("inherited column \"%s\" has a type conflict", - attributeName), + errmsg("inherited column \"%s\" has a type conflict", + attributeName), errdetail("%s versus %s", format_type_with_typemod(defTypeId, deftypmod), - format_type_with_typemod(attribute->atttypid, - attribute->atttypmod)))); + format_type_with_typemod(attribute->atttypid, + attribute->atttypmod)))); defCollId = GetColumnDefCollation(NULL, def, defTypeId); if (defCollId != attribute->attcollation) ereport(ERROR, (errcode(ERRCODE_COLLATION_MISMATCH), - errmsg("inherited column \"%s\" has a collation conflict", - attributeName), + errmsg("inherited column \"%s\" has a collation conflict", + attributeName), errdetail("\"%s\" versus \"%s\"", get_collation_name(defCollId), - get_collation_name(attribute->attcollation)))); + get_collation_name(attribute->attcollation)))); /* Copy storage parameter */ if (def->storage == 0) @@ -1999,7 +1999,7 @@ MergeAttributes(List *schema, List *supers, char relpersistence, if (found_whole_row) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot convert whole-row table reference"), + errmsg("cannot convert whole-row table reference"), errdetail("Constraint \"%s\" contains a whole-row reference to table \"%s\".", name, RelationGetRelationName(relation)))); @@ -2079,8 +2079,8 @@ MergeAttributes(List *schema, List *supers, char relpersistence, */ if (exist_attno == schema_attno) ereport(NOTICE, - (errmsg("merging column \"%s\" with inherited definition", - attributeName))); + (errmsg("merging column \"%s\" with inherited definition", + attributeName))); else ereport(NOTICE, (errmsg("moving and merging column \"%s\" with inherited definition", attributeName), @@ -2121,8 +2121,8 @@ MergeAttributes(List *schema, List *supers, char relpersistence, else if (newdef->storage != 0 && def->storage != newdef->storage) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("column \"%s\" has a storage parameter conflict", - attributeName), + errmsg("column \"%s\" has a storage parameter conflict", + attributeName), errdetail("%s versus %s", storage_name(def->storage), storage_name(newdef->storage)))); @@ -2210,8 +2210,8 @@ MergeAttributes(List *schema, List *supers, char relpersistence, else ereport(ERROR, (errcode(ERRCODE_DUPLICATE_COLUMN), - errmsg("column \"%s\" specified more than once", - coldef->colname))); + errmsg("column \"%s\" specified more than once", + coldef->colname))); } prev = rest; rest = next; @@ -2232,8 +2232,8 @@ MergeAttributes(List *schema, List *supers, char relpersistence, if (def->cooked_default == &bogus_marker) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_DEFINITION), - errmsg("column \"%s\" inherits conflicting default values", - def->colname), + errmsg("column \"%s\" inherits conflicting default values", + def->colname), errhint("To resolve the conflict, specify a default explicitly."))); } } @@ -2597,7 +2597,7 @@ renameatt_internal(Oid myrelid, ListCell *lo; child_oids = find_typed_table_dependencies(targetrelation->rd_rel->reltype, - RelationGetRelationName(targetrelation), + RelationGetRelationName(targetrelation), behavior); foreach(lo, child_oids) @@ -3462,7 +3462,7 @@ ATPrepCmd(List **wqueue, Relation rel, AlterTableCmd *cmd, { case AT_AddColumn: /* ADD COLUMN */ ATSimplePermissions(rel, - ATT_TABLE | ATT_COMPOSITE_TYPE | ATT_FOREIGN_TABLE); + ATT_TABLE | ATT_COMPOSITE_TYPE | ATT_FOREIGN_TABLE); ATPrepAddColumn(wqueue, rel, recurse, recursing, false, cmd, lockmode); /* Recursion occurs during execution phase */ @@ -3534,7 +3534,7 @@ ATPrepCmd(List **wqueue, Relation rel, AlterTableCmd *cmd, break; case AT_DropColumn: /* DROP COLUMN */ ATSimplePermissions(rel, - ATT_TABLE | ATT_COMPOSITE_TYPE | ATT_FOREIGN_TABLE); + ATT_TABLE | ATT_COMPOSITE_TYPE | ATT_FOREIGN_TABLE); ATPrepDropColumn(wqueue, rel, recurse, recursing, cmd, lockmode); /* Recursion occurs during execution phase */ pass = AT_PASS_DROP; @@ -3569,7 +3569,7 @@ ATPrepCmd(List **wqueue, Relation rel, AlterTableCmd *cmd, break; case AT_AlterColumnType: /* ALTER COLUMN TYPE */ ATSimplePermissions(rel, - ATT_TABLE | ATT_COMPOSITE_TYPE | ATT_FOREIGN_TABLE); + ATT_TABLE | ATT_COMPOSITE_TYPE | ATT_FOREIGN_TABLE); /* Performs own recursion */ ATPrepAlterColumnType(wqueue, tab, rel, recurse, recursing, cmd, lockmode); pass = AT_PASS_ALTER_TYPE; @@ -3971,7 +3971,7 @@ ATExecCmd(List **wqueue, AlteredTableInfo *tab, Relation rel, break; case AT_EnableTrig: /* ENABLE TRIGGER name */ ATExecEnableDisableTrigger(rel, cmd->name, - TRIGGER_FIRES_ON_ORIGIN, false, lockmode); + TRIGGER_FIRES_ON_ORIGIN, false, lockmode); break; case AT_EnableAlwaysTrig: /* ENABLE ALWAYS TRIGGER name */ ATExecEnableDisableTrigger(rel, cmd->name, @@ -3979,7 +3979,7 @@ ATExecCmd(List **wqueue, AlteredTableInfo *tab, Relation rel, break; case AT_EnableReplicaTrig: /* ENABLE REPLICA TRIGGER name */ ATExecEnableDisableTrigger(rel, cmd->name, - TRIGGER_FIRES_ON_REPLICA, false, lockmode); + TRIGGER_FIRES_ON_REPLICA, false, lockmode); break; case AT_DisableTrig: /* DISABLE TRIGGER name */ ATExecEnableDisableTrigger(rel, cmd->name, @@ -3987,7 +3987,7 @@ ATExecCmd(List **wqueue, AlteredTableInfo *tab, Relation rel, break; case AT_EnableTrigAll: /* ENABLE TRIGGER ALL */ ATExecEnableDisableTrigger(rel, NULL, - TRIGGER_FIRES_ON_ORIGIN, false, lockmode); + TRIGGER_FIRES_ON_ORIGIN, false, lockmode); break; case AT_DisableTrigAll: /* DISABLE TRIGGER ALL */ ATExecEnableDisableTrigger(rel, NULL, @@ -3995,7 +3995,7 @@ ATExecCmd(List **wqueue, AlteredTableInfo *tab, Relation rel, break; case AT_EnableTrigUser: /* ENABLE TRIGGER USER */ ATExecEnableDisableTrigger(rel, NULL, - TRIGGER_FIRES_ON_ORIGIN, true, lockmode); + TRIGGER_FIRES_ON_ORIGIN, true, lockmode); break; case AT_DisableTrigUser: /* DISABLE TRIGGER USER */ ATExecEnableDisableTrigger(rel, NULL, @@ -4150,8 +4150,8 @@ ATRewriteTables(AlterTableStmt *parsetree, List **wqueue, LOCKMODE lockmode) if (RelationIsUsedAsCatalogTable(OldHeap)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot rewrite table \"%s\" used as a catalog table", - RelationGetRelationName(OldHeap)))); + errmsg("cannot rewrite table \"%s\" used as a catalog table", + RelationGetRelationName(OldHeap)))); /* * Don't allow rewrite on temp tables of other backends ... their @@ -4160,7 +4160,7 @@ ATRewriteTables(AlterTableStmt *parsetree, List **wqueue, LOCKMODE lockmode) if (RELATION_IS_OTHER_TEMP(OldHeap)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot rewrite temporary tables of other sessions"))); + errmsg("cannot rewrite temporary tables of other sessions"))); /* * Select destination tablespace (same as original unless user @@ -4522,7 +4522,7 @@ ATRewriteTable(AlteredTableInfo *tab, Oid OIDNewHeap, LOCKMODE lockmode) values[ex->attnum - 1] = ExecEvalExpr(ex->exprstate, econtext, - &isnull[ex->attnum - 1]); + &isnull[ex->attnum - 1]); } /* @@ -4554,7 +4554,7 @@ ATRewriteTable(AlteredTableInfo *tab, Oid OIDNewHeap, LOCKMODE lockmode) ereport(ERROR, (errcode(ERRCODE_NOT_NULL_VIOLATION), errmsg("column \"%s\" contains null values", - NameStr(newTupDesc->attrs[attn]->attname)), + NameStr(newTupDesc->attrs[attn]->attname)), errtablecol(oldrel, attn + 1))); } @@ -4584,7 +4584,7 @@ ATRewriteTable(AlteredTableInfo *tab, Oid OIDNewHeap, LOCKMODE lockmode) if (partqualstate && !ExecCheck(partqualstate, econtext)) ereport(ERROR, (errcode(ERRCODE_CHECK_VIOLATION), - errmsg("partition constraint is violated by some row"))); + errmsg("partition constraint is violated by some row"))); /* Write the tuple out to the new relation */ if (newrel) @@ -4995,7 +4995,7 @@ find_typed_table_dependencies(Oid typeOid, const char *typeName, DropBehavior be (errcode(ERRCODE_DEPENDENT_OBJECTS_STILL_EXIST), errmsg("cannot alter type \"%s\" because it is the type of a typed table", typeName), - errhint("Use ALTER ... CASCADE to alter the typed tables too."))); + errhint("Use ALTER ... CASCADE to alter the typed tables too."))); else result = lappend_oid(result, HeapTupleGetOid(tuple)); } @@ -5139,23 +5139,23 @@ ATExecAddColumn(List **wqueue, AlteredTableInfo *tab, Relation rel, ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), errmsg("child table \"%s\" has different type for column \"%s\"", - RelationGetRelationName(rel), colDef->colname))); + RelationGetRelationName(rel), colDef->colname))); ccollid = GetColumnDefCollation(NULL, colDef, ctypeId); if (ccollid != childatt->attcollation) ereport(ERROR, (errcode(ERRCODE_COLLATION_MISMATCH), errmsg("child table \"%s\" has different collation for column \"%s\"", - RelationGetRelationName(rel), colDef->colname), + RelationGetRelationName(rel), colDef->colname), errdetail("\"%s\" versus \"%s\"", get_collation_name(ccollid), - get_collation_name(childatt->attcollation)))); + get_collation_name(childatt->attcollation)))); /* If it's OID, child column must actually be OID */ if (isOid && childatt->attnum != ObjectIdAttributeNumber) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("child table \"%s\" has a conflicting \"%s\" column", - RelationGetRelationName(rel), colDef->colname))); + errmsg("child table \"%s\" has a conflicting \"%s\" column", + RelationGetRelationName(rel), colDef->colname))); /* Bump the existing child att's inhcount */ childatt->attinhcount++; @@ -5165,8 +5165,8 @@ ATExecAddColumn(List **wqueue, AlteredTableInfo *tab, Relation rel, /* Inform the user about the merge */ ereport(NOTICE, - (errmsg("merging definition of column \"%s\" for child \"%s\"", - colDef->colname, RelationGetRelationName(rel)))); + (errmsg("merging definition of column \"%s\" for child \"%s\"", + colDef->colname, RelationGetRelationName(rel)))); heap_close(attrdesc, RowExclusiveLock); return InvalidObjectAddress; @@ -5468,8 +5468,8 @@ check_for_column_name_collision(Relation rel, const char *colname, if (attnum <= 0) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_COLUMN), - errmsg("column name \"%s\" conflicts with a system column name", - colname))); + errmsg("column name \"%s\" conflicts with a system column name", + colname))); else { if (if_not_exists) @@ -5620,8 +5620,8 @@ ATExecDropNotNull(Relation rel, const char *colName, LOCKMODE lockmode) if (get_attidentity(RelationGetRelid(rel), attnum)) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("column \"%s\" of relation \"%s\" is an identity column", - colName, RelationGetRelationName(rel)))); + errmsg("column \"%s\" of relation \"%s\" is an identity column", + colName, RelationGetRelationName(rel)))); /* * Check that the attribute is not in a primary key @@ -5678,8 +5678,8 @@ ATExecDropNotNull(Relation rel, const char *colName, LOCKMODE lockmode) if (tupDesc->attrs[parent_attnum - 1]->attnotnull) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("column \"%s\" is marked NOT NULL in parent table", - colName))); + errmsg("column \"%s\" is marked NOT NULL in parent table", + colName))); heap_close(parent, AccessShareLock); } @@ -5822,8 +5822,8 @@ ATExecColumnDefault(Relation rel, const char *colName, if (get_attidentity(RelationGetRelid(rel), attnum)) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("column \"%s\" of relation \"%s\" is an identity column", - colName, RelationGetRelationName(rel)), + errmsg("column \"%s\" of relation \"%s\" is an identity column", + colName, RelationGetRelationName(rel)), newDefault ? 0 : errhint("Use ALTER TABLE ... ALTER COLUMN ... DROP IDENTITY instead."))); /* @@ -5914,8 +5914,8 @@ ATExecAddIdentity(Relation rel, const char *colName, if (attTup->atthasdef) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("column \"%s\" of relation \"%s\" already has a default value", - colName, RelationGetRelationName(rel)))); + errmsg("column \"%s\" of relation \"%s\" already has a default value", + colName, RelationGetRelationName(rel)))); attTup->attidentity = cdef->identity; CatalogTupleUpdate(attrelation, &tuple->t_self, tuple); @@ -5991,8 +5991,8 @@ ATExecSetIdentity(Relation rel, const char *colName, Node *def, LOCKMODE lockmod if (!attTup->attidentity) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("column \"%s\" of relation \"%s\" is not an identity column", - colName, RelationGetRelationName(rel)))); + errmsg("column \"%s\" of relation \"%s\" is not an identity column", + colName, RelationGetRelationName(rel)))); if (generatedEl) { @@ -6829,7 +6829,7 @@ ATExecAddConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel, else newConstraint->conname = ChooseConstraintName(RelationGetRelationName(rel), - strVal(linitial(newConstraint->fk_attrs)), + strVal(linitial(newConstraint->fk_attrs)), "fkey", RelationGetNamespace(rel), NIL); @@ -7867,7 +7867,7 @@ transformFkeyGetPrimaryKey(Relation pkrel, Oid *indexOid, atttypids[i] = attnumTypeId(pkrel, pkattno); opclasses[i] = indclass->values[i]; *attnamelist = lappend(*attnamelist, - makeString(pstrdup(NameStr(*attnumAttName(pkrel, pkattno))))); + makeString(pstrdup(NameStr(*attnumAttName(pkrel, pkattno))))); } ReleaseSysCache(indexTuple); @@ -8528,8 +8528,8 @@ ATExecDropConstraint(Relation rel, const char *constrName, { ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("constraint \"%s\" of relation \"%s\" does not exist", - constrName, RelationGetRelationName(rel)))); + errmsg("constraint \"%s\" of relation \"%s\" does not exist", + constrName, RelationGetRelationName(rel)))); } else { @@ -8596,9 +8596,9 @@ ATExecDropConstraint(Relation rel, const char *constrName, if (!HeapTupleIsValid(tuple)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("constraint \"%s\" of relation \"%s\" does not exist", - constrName, - RelationGetRelationName(childrel)))); + errmsg("constraint \"%s\" of relation \"%s\" does not exist", + constrName, + RelationGetRelationName(childrel)))); copy_tuple = heap_copytuple(tuple); @@ -8716,7 +8716,7 @@ ATPrepAlterColumnType(List **wqueue, if (!is_expr) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("cannot alter type of column named in partition key"))); + errmsg("cannot alter type of column named in partition key"))); else ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), @@ -8780,10 +8780,10 @@ ATPrepAlterColumnType(List **wqueue, errmsg("column \"%s\" cannot be cast automatically to type %s", colName, format_type_be(targettype)), /* translator: USING is SQL, don't translate it */ - errhint("You might need to specify \"USING %s::%s\".", - quote_identifier(colName), - format_type_with_typemod(targettype, - targettypmod)))); + errhint("You might need to specify \"USING %s::%s\".", + quote_identifier(colName), + format_type_with_typemod(targettype, + targettypmod)))); } /* Fix collations after all else */ @@ -8869,7 +8869,7 @@ ATPrepAlterColumnType(List **wqueue, attmap = convert_tuples_by_name_map(RelationGetDescr(childrel), RelationGetDescr(rel), - gettext_noop("could not convert row type")); + gettext_noop("could not convert row type")); ((ColumnDef *) cmd->def)->cooked_default = map_variable_attnos(def->cooked_default, 1, 0, @@ -8878,7 +8878,7 @@ ATPrepAlterColumnType(List **wqueue, if (found_whole_row) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot convert whole-row table reference"), + errmsg("cannot convert whole-row table reference"), errdetail("USING expression contains a whole-row table reference."))); pfree(attmap); } @@ -9005,7 +9005,7 @@ ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel, Assert(defaultexpr); defaultexpr = strip_implicit_coercions(defaultexpr); defaultexpr = coerce_to_target_type(NULL, /* no UNKNOWN params */ - defaultexpr, exprType(defaultexpr), + defaultexpr, exprType(defaultexpr), targettype, targettypmod, COERCION_ASSIGNMENT, COERCE_IMPLICIT_CAST, @@ -9076,9 +9076,9 @@ ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel, if (!list_member_oid(tab->changedIndexOids, foundObject.objectId)) { tab->changedIndexOids = lappend_oid(tab->changedIndexOids, - foundObject.objectId); + foundObject.objectId); tab->changedIndexDefs = lappend(tab->changedIndexDefs, - pg_get_indexdef_string(foundObject.objectId)); + pg_get_indexdef_string(foundObject.objectId)); } } else if (relKind == RELKIND_SEQUENCE) @@ -9592,7 +9592,7 @@ ATPostAlterTypeParse(Oid oldId, Oid oldRelId, Oid refRelId, char *cmd, else if (IsA(stmt, AlterTableStmt)) querytree_list = list_concat(querytree_list, transformAlterTableStmt(oldRelId, - (AlterTableStmt *) stmt, + (AlterTableStmt *) stmt, cmd)); else querytree_list = lappend(querytree_list, stmt); @@ -9719,7 +9719,7 @@ RebuildConstraintComment(AlteredTableInfo *tab, int pass, Oid objid, cmd = makeNode(CommentStmt); cmd->objtype = OBJECT_TABCONSTRAINT; cmd->object = (Node *) list_make3(makeString(get_namespace_name(RelationGetNamespace(rel))), - makeString(pstrdup(RelationGetRelationName(rel))), + makeString(pstrdup(RelationGetRelationName(rel))), makeString(pstrdup(conname))); cmd->comment = comment_str; @@ -9872,9 +9872,9 @@ ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing, LOCKMODE lock (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("cannot change owner of sequence \"%s\"", NameStr(tuple_class->relname)), - errdetail("Sequence \"%s\" is linked to table \"%s\".", - NameStr(tuple_class->relname), - get_rel_name(tableId)))); + errdetail("Sequence \"%s\" is linked to table \"%s\".", + NameStr(tuple_class->relname), + get_rel_name(tableId)))); } break; case RELKIND_COMPOSITE_TYPE: @@ -9893,8 +9893,8 @@ ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing, LOCKMODE lock default: ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("\"%s\" is not a table, view, sequence, or foreign table", - NameStr(tuple_class->relname)))); + errmsg("\"%s\" is not a table, view, sequence, or foreign table", + NameStr(tuple_class->relname)))); } /* @@ -10756,7 +10756,7 @@ AlterTableMoveAll(AlterTableMoveAllStmt *stmt) ereport(NOTICE, (errcode(ERRCODE_NO_DATA_FOUND), errmsg("no matching relations in tablespace \"%s\" found", - orig_tablespaceoid == InvalidOid ? "(database default)" : + orig_tablespaceoid == InvalidOid ? "(database default)" : get_tablespace_name(orig_tablespaceoid)))); /* Everything is locked, loop through and move all of the relations. */ @@ -10881,7 +10881,7 @@ copy_relation_data(SMgrRelation src, SMgrRelation dst, */ static void ATExecEnableDisableTrigger(Relation rel, char *trigname, - char fires_when, bool skip_system, LOCKMODE lockmode) + char fires_when, bool skip_system, LOCKMODE lockmode) { EnableDisableTrigger(rel, trigname, fires_when, skip_system); } @@ -10959,14 +10959,14 @@ ATExecAddInherit(Relation child_rel, RangeVar *parent, LOCKMODE lockmode) !parent_rel->rd_islocaltemp) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("cannot inherit from temporary relation of another session"))); + errmsg("cannot inherit from temporary relation of another session"))); /* Ditto for the child */ if (child_rel->rd_rel->relpersistence == RELPERSISTENCE_TEMP && !child_rel->rd_islocaltemp) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("cannot inherit to temporary relation of another session"))); + errmsg("cannot inherit to temporary relation of another session"))); /* Prevent partitioned tables from becoming inheritance parents */ if (parent_rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE) @@ -11070,8 +11070,8 @@ CreateInheritance(Relation child_rel, Relation parent_rel) if (inh->inhparent == RelationGetRelid(parent_rel)) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_TABLE), - errmsg("relation \"%s\" would be inherited from more than once", - RelationGetRelationName(parent_rel)))); + errmsg("relation \"%s\" would be inherited from more than once", + RelationGetRelationName(parent_rel)))); if (inh->inhseqno > inhseqno) inhseqno = inh->inhseqno; @@ -11214,8 +11214,8 @@ MergeAttributesIntoExisting(Relation child_rel, Relation parent_rel) if (attribute->attnotnull && !childatt->attnotnull) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("column \"%s\" in child table must be marked NOT NULL", - attributeName))); + errmsg("column \"%s\" in child table must be marked NOT NULL", + attributeName))); /* * OK, bump the child column's inheritance count. (If we fail @@ -11258,7 +11258,7 @@ MergeAttributesIntoExisting(Relation child_rel, Relation parent_rel) * system column, not some random column named "oid". */ tuple = SearchSysCacheCopy2(ATTNUM, - ObjectIdGetDatum(RelationGetRelid(child_rel)), + ObjectIdGetDatum(RelationGetRelid(child_rel)), Int16GetDatum(ObjectIdAttributeNumber)); if (HeapTupleIsValid(tuple)) { @@ -11538,15 +11538,15 @@ RemoveInheritance(Relation child_rel, Relation parent_rel) if (child_is_partition) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_TABLE), - errmsg("relation \"%s\" is not a partition of relation \"%s\"", - RelationGetRelationName(child_rel), - RelationGetRelationName(parent_rel)))); + errmsg("relation \"%s\" is not a partition of relation \"%s\"", + RelationGetRelationName(child_rel), + RelationGetRelationName(parent_rel)))); else ereport(ERROR, (errcode(ERRCODE_UNDEFINED_TABLE), - errmsg("relation \"%s\" is not a parent of relation \"%s\"", - RelationGetRelationName(parent_rel), - RelationGetRelationName(child_rel)))); + errmsg("relation \"%s\" is not a parent of relation \"%s\"", + RelationGetRelationName(parent_rel), + RelationGetRelationName(child_rel)))); } /* @@ -11811,8 +11811,8 @@ ATExecAddOf(Relation rel, const TypeName *ofTypename, LOCKMODE lockmode) if (strncmp(table_attname, type_attname, NAMEDATALEN) != 0) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("table has column \"%s\" where type requires \"%s\"", - table_attname, type_attname))); + errmsg("table has column \"%s\" where type requires \"%s\"", + table_attname, type_attname))); /* Compare type. */ if (table_attr->atttypid != type_attr->atttypid || @@ -11820,8 +11820,8 @@ ATExecAddOf(Relation rel, const TypeName *ofTypename, LOCKMODE lockmode) table_attr->attcollation != type_attr->attcollation) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("table \"%s\" has different type for column \"%s\"", - RelationGetRelationName(rel), type_attname))); + errmsg("table \"%s\" has different type for column \"%s\"", + RelationGetRelationName(rel), type_attname))); } DecrTupleDescRefCount(typeTupleDesc); @@ -11934,7 +11934,7 @@ relation_mark_replica_identity(Relation rel, char ri_type, Oid indexOid, */ pg_class = heap_open(RelationRelationId, RowExclusiveLock); pg_class_tuple = SearchSysCacheCopy1(RELOID, - ObjectIdGetDatum(RelationGetRelid(rel))); + ObjectIdGetDatum(RelationGetRelid(rel))); if (!HeapTupleIsValid(pg_class_tuple)) elog(ERROR, "cache lookup failed for relation \"%s\"", RelationGetRelationName(rel)); @@ -12067,20 +12067,20 @@ ATExecReplicaIdentity(Relation rel, ReplicaIdentityStmt *stmt, LOCKMODE lockmode !indexRel->rd_index->indisunique) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("cannot use non-unique index \"%s\" as replica identity", - RelationGetRelationName(indexRel)))); + errmsg("cannot use non-unique index \"%s\" as replica identity", + RelationGetRelationName(indexRel)))); /* Deferred indexes are not guaranteed to be always unique. */ if (!indexRel->rd_index->indimmediate) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot use non-immediate index \"%s\" as replica identity", - RelationGetRelationName(indexRel)))); + errmsg("cannot use non-immediate index \"%s\" as replica identity", + RelationGetRelationName(indexRel)))); /* Expression indexes aren't supported. */ if (RelationGetIndexExpressions(indexRel) != NIL) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot use expression index \"%s\" as replica identity", - RelationGetRelationName(indexRel)))); + errmsg("cannot use expression index \"%s\" as replica identity", + RelationGetRelationName(indexRel)))); /* Predicate indexes aren't supported. */ if (RelationGetIndexPredicate(indexRel) != NIL) ereport(ERROR, @@ -12451,7 +12451,7 @@ AlterTableNamespace(AlterObjectSchemaStmt *stmt, Oid *oldschema) sequenceIsOwned(relid, DEPENDENCY_INTERNAL, &tableId, &colId)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot move an owned sequence into another schema"), + errmsg("cannot move an owned sequence into another schema"), errdetail("Sequence \"%s\" is linked to table \"%s\".", RelationGetRelationName(rel), get_rel_name(tableId)))); @@ -13233,15 +13233,15 @@ ComputePartitionAttrs(Relation rel, List *partParams, AttrNumber *partattrs, if (!HeapTupleIsValid(atttuple)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("column \"%s\" named in partition key does not exist", - pelem->name))); + errmsg("column \"%s\" named in partition key does not exist", + pelem->name))); attform = (Form_pg_attribute) GETSTRUCT(atttuple); if (attform->attnum <= 0) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("cannot use system column \"%s\" in partition key", - pelem->name))); + errmsg("cannot use system column \"%s\" in partition key", + pelem->name))); partattrs[attn] = attform->attnum; atttype = attform->atttypid; @@ -13383,8 +13383,8 @@ ComputePartitionAttrs(Relation rel, List *partParams, AttrNumber *partattrs, if (!OidIsValid(partopclass[attn])) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("data type %s has no default btree operator class", - format_type_be(atttype)), + errmsg("data type %s has no default btree operator class", + format_type_be(atttype)), errhint("You must specify a btree operator class or define a default btree operator class for the data type."))); } else @@ -13511,17 +13511,17 @@ ATExecAttachPartition(List **wqueue, Relation rel, PartitionCmd *cmd) if (rel->rd_rel->relhasoids && !attachRel->rd_rel->relhasoids) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("cannot attach table \"%s\" without OIDs as partition of" - " table \"%s\" with OIDs", RelationGetRelationName(attachRel), - RelationGetRelationName(rel)))); + errmsg("cannot attach table \"%s\" without OIDs as partition of" + " table \"%s\" with OIDs", RelationGetRelationName(attachRel), + RelationGetRelationName(rel)))); /* OTOH, if parent doesn't have them, do not allow in attachRel either */ if (attachRel->rd_rel->relhasoids && !rel->rd_rel->relhasoids) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("cannot attach table \"%s\" with OIDs as partition of table" - " \"%s\" without OIDs", RelationGetRelationName(attachRel), - RelationGetRelationName(rel)))); + errmsg("cannot attach table \"%s\" with OIDs as partition of table" + " \"%s\" without OIDs", RelationGetRelationName(attachRel), + RelationGetRelationName(rel)))); /* Check if there are any columns in attachRel that aren't in the parent */ tupleDesc = RelationGetDescr(attachRel); diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c index 03bf06012a..8559c3b6b3 100644 --- a/src/backend/commands/tablespace.c +++ b/src/backend/commands/tablespace.c @@ -159,8 +159,8 @@ TablespaceCreateDbspace(Oid spcNode, Oid dbNode, bool isRedo) if (errno != ENOENT || !isRedo) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not create directory \"%s\": %m", - dir))); + errmsg("could not create directory \"%s\": %m", + dir))); /* * Parent directories are missing during WAL replay, so @@ -176,8 +176,8 @@ TablespaceCreateDbspace(Oid spcNode, Oid dbNode, bool isRedo) if (mkdir(parentdir, S_IRWXU) < 0 && errno != EEXIST) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not create directory \"%s\": %m", - parentdir))); + errmsg("could not create directory \"%s\": %m", + parentdir))); pfree(parentdir); /* create one parent up if not exist */ @@ -187,16 +187,16 @@ TablespaceCreateDbspace(Oid spcNode, Oid dbNode, bool isRedo) if (mkdir(parentdir, S_IRWXU) < 0 && errno != EEXIST) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not create directory \"%s\": %m", - parentdir))); + errmsg("could not create directory \"%s\": %m", + parentdir))); pfree(parentdir); /* Create database directory */ if (mkdir(dir, S_IRWXU) < 0) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not create directory \"%s\": %m", - dir))); + errmsg("could not create directory \"%s\": %m", + dir))); } } @@ -282,7 +282,7 @@ CreateTableSpace(CreateTableSpaceStmt *stmt) * reference the whole path here, but mkdir() uses the first two parts. */ if (strlen(location) + 1 + strlen(TABLESPACE_VERSION_DIRECTORY) + 1 + - OIDCHARS + 1 + OIDCHARS + 1 + FORKNAMECHARS + 1 + OIDCHARS > MAXPGPATH) + OIDCHARS + 1 + OIDCHARS + 1 + FORKNAMECHARS + 1 + OIDCHARS > MAXPGPATH) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), errmsg("tablespace location \"%s\" is too long", @@ -303,7 +303,7 @@ CreateTableSpace(CreateTableSpaceStmt *stmt) (errcode(ERRCODE_RESERVED_NAME), errmsg("unacceptable tablespace name \"%s\"", stmt->tablespacename), - errdetail("The prefix \"pg_\" is reserved for system tablespaces."))); + errdetail("The prefix \"pg_\" is reserved for system tablespaces."))); /* * Check that there is no other tablespace by this name. (The unique @@ -585,8 +585,8 @@ create_tablespace_directories(const char *location, const Oid tablespaceoid) else ereport(ERROR, (errcode_for_file_access(), - errmsg("could not set permissions on directory \"%s\": %m", - location))); + errmsg("could not set permissions on directory \"%s\": %m", + location))); } if (InRecovery) @@ -948,7 +948,7 @@ RenameTableSpace(const char *oldname, const char *newname) ereport(ERROR, (errcode(ERRCODE_RESERVED_NAME), errmsg("unacceptable tablespace name \"%s\"", newname), - errdetail("The prefix \"pg_\" is reserved for system tablespaces."))); + errdetail("The prefix \"pg_\" is reserved for system tablespaces."))); /* Make sure the new name doesn't exist */ ScanKeyInit(&entry[0], @@ -1510,8 +1510,8 @@ tblspc_redo(XLogReaderState *record) if (!destroy_tablespace_directories(xlrec->ts_id, true)) ereport(LOG, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("directories for tablespace %u could not be removed", - xlrec->ts_id), + errmsg("directories for tablespace %u could not be removed", + xlrec->ts_id), errhint("You can remove the directories manually if necessary."))); } } diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index 191f27651c..45d1f515eb 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -193,7 +193,7 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg("\"%s\" is a partitioned table", RelationGetRelationName(rel)), - errdetail("Partitioned tables cannot have ROW triggers."))); + errdetail("Partitioned tables cannot have ROW triggers."))); } else if (rel->rd_rel->relkind == RELKIND_VIEW) { @@ -223,21 +223,21 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg("\"%s\" is a foreign table", RelationGetRelationName(rel)), - errdetail("Foreign tables cannot have INSTEAD OF triggers."))); + errdetail("Foreign tables cannot have INSTEAD OF triggers."))); if (TRIGGER_FOR_TRUNCATE(stmt->events)) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg("\"%s\" is a foreign table", RelationGetRelationName(rel)), - errdetail("Foreign tables cannot have TRUNCATE triggers."))); + errdetail("Foreign tables cannot have TRUNCATE triggers."))); if (stmt->isconstraint) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg("\"%s\" is a foreign table", RelationGetRelationName(rel)), - errdetail("Foreign tables cannot have constraint triggers."))); + errdetail("Foreign tables cannot have constraint triggers."))); } else ereport(ERROR, @@ -312,7 +312,7 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString, if (stmt->whenClause) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("INSTEAD OF triggers cannot have WHEN conditions"))); + errmsg("INSTEAD OF triggers cannot have WHEN conditions"))); if (stmt->columns != NIL) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), @@ -396,7 +396,7 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString, if (newtablename != NULL) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("NEW TABLE cannot be specified multiple times"))); + errmsg("NEW TABLE cannot be specified multiple times"))); newtablename = tt->name; } @@ -411,7 +411,7 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString, if (oldtablename != NULL) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("OLD TABLE cannot be specified multiple times"))); + errmsg("OLD TABLE cannot be specified multiple times"))); oldtablename = tt->name; } @@ -421,7 +421,7 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString, strcmp(newtablename, oldtablename) == 0) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("OLD TABLE name and NEW TABLE name cannot be the same"))); + errmsg("OLD TABLE name and NEW TABLE name cannot be the same"))); } /* @@ -546,9 +546,9 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString, if (funcrettype == OPAQUEOID) { ereport(WARNING, - (errmsg("changing return type of function %s from %s to %s", - NameListToString(stmt->funcname), - "opaque", "trigger"))); + (errmsg("changing return type of function %s from %s to %s", + NameListToString(stmt->funcname), + "opaque", "trigger"))); SetFunctionReturnType(funcoid, TRIGGEROID); } else @@ -666,8 +666,8 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString, if (namestrcmp(&(pg_trigger->tgname), trigname) == 0) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("trigger \"%s\" for relation \"%s\" already exists", - trigname, RelationGetRelationName(rel)))); + errmsg("trigger \"%s\" for relation \"%s\" already exists", + trigname, RelationGetRelationName(rel)))); } systable_endscan(tgscan); } @@ -679,7 +679,7 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString, values[Anum_pg_trigger_tgrelid - 1] = ObjectIdGetDatum(RelationGetRelid(rel)); values[Anum_pg_trigger_tgname - 1] = DirectFunctionCall1(namein, - CStringGetDatum(trigname)); + CStringGetDatum(trigname)); values[Anum_pg_trigger_tgfoid - 1] = ObjectIdGetDatum(funcoid); values[Anum_pg_trigger_tgtype - 1] = Int16GetDatum(tgtype); values[Anum_pg_trigger_tgenabled - 1] = CharGetDatum(TRIGGER_FIRES_ON_ORIGIN); @@ -725,13 +725,13 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString, } values[Anum_pg_trigger_tgnargs - 1] = Int16GetDatum(nargs); values[Anum_pg_trigger_tgargs - 1] = DirectFunctionCall1(byteain, - CStringGetDatum(args)); + CStringGetDatum(args)); } else { values[Anum_pg_trigger_tgnargs - 1] = Int16GetDatum(0); values[Anum_pg_trigger_tgargs - 1] = DirectFunctionCall1(byteain, - CStringGetDatum("")); + CStringGetDatum("")); } /* build column number array if it's a column-specific trigger */ @@ -755,8 +755,8 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString, if (attnum == InvalidAttrNumber) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("column \"%s\" of relation \"%s\" does not exist", - name, RelationGetRelationName(rel)))); + errmsg("column \"%s\" of relation \"%s\" does not exist", + name, RelationGetRelationName(rel)))); /* Check for duplicates */ for (j = i - 1; j >= 0; j--) @@ -782,12 +782,12 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString, if (oldtablename) values[Anum_pg_trigger_tgoldtable - 1] = DirectFunctionCall1(namein, - CStringGetDatum(oldtablename)); + CStringGetDatum(oldtablename)); else nulls[Anum_pg_trigger_tgoldtable - 1] = true; if (newtablename) values[Anum_pg_trigger_tgnewtable - 1] = DirectFunctionCall1(namein, - CStringGetDatum(newtablename)); + CStringGetDatum(newtablename)); else nulls[Anum_pg_trigger_tgnewtable - 1] = true; @@ -1073,9 +1073,9 @@ ConvertTriggerToFK(CreateTrigStmt *stmt, Oid funcoid) MemoryContext oldContext; ereport(NOTICE, - (errmsg("ignoring incomplete trigger group for constraint \"%s\" %s", - constr_name, buf.data), - errdetail_internal("%s", _(funcdescr[funcnum])))); + (errmsg("ignoring incomplete trigger group for constraint \"%s\" %s", + constr_name, buf.data), + errdetail_internal("%s", _(funcdescr[funcnum])))); oldContext = MemoryContextSwitchTo(TopMemoryContext); info = (OldTriggerInfo *) palloc0(sizeof(OldTriggerInfo)); info->args = copyObject(stmt->args); @@ -1089,9 +1089,9 @@ ConvertTriggerToFK(CreateTrigStmt *stmt, Oid funcoid) { /* Second trigger of set */ ereport(NOTICE, - (errmsg("ignoring incomplete trigger group for constraint \"%s\" %s", - constr_name, buf.data), - errdetail_internal("%s", _(funcdescr[funcnum])))); + (errmsg("ignoring incomplete trigger group for constraint \"%s\" %s", + constr_name, buf.data), + errdetail_internal("%s", _(funcdescr[funcnum])))); } else { @@ -1565,8 +1565,8 @@ EnableDisableTrigger(Relation rel, const char *tgname, if (!superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("permission denied: \"%s\" is a system trigger", - NameStr(oldtrig->tgname)))); + errmsg("permission denied: \"%s\" is a system trigger", + NameStr(oldtrig->tgname)))); } found = true; @@ -1673,7 +1673,7 @@ RelationBuildTriggers(Relation relation) build->tgoid = HeapTupleGetOid(htup); build->tgname = DatumGetCString(DirectFunctionCall1(nameout, - NameGetDatum(&pg_trigger->tgname))); + NameGetDatum(&pg_trigger->tgname))); build->tgfoid = pg_trigger->tgfoid; build->tgtype = pg_trigger->tgtype; build->tgenabled = pg_trigger->tgenabled; @@ -2181,7 +2181,7 @@ ExecBSInsertTriggers(EState *estate, ResultRelInfo *relinfo) if (newtuple) ereport(ERROR, (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), - errmsg("BEFORE STATEMENT trigger cannot return a value"))); + errmsg("BEFORE STATEMENT trigger cannot return a value"))); } } @@ -2387,7 +2387,7 @@ ExecBSDeleteTriggers(EState *estate, ResultRelInfo *relinfo) if (newtuple) ereport(ERROR, (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), - errmsg("BEFORE STATEMENT trigger cannot return a value"))); + errmsg("BEFORE STATEMENT trigger cannot return a value"))); } } @@ -2598,7 +2598,7 @@ ExecBSUpdateTriggers(EState *estate, ResultRelInfo *relinfo) if (newtuple) ereport(ERROR, (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), - errmsg("BEFORE STATEMENT trigger cannot return a value"))); + errmsg("BEFORE STATEMENT trigger cannot return a value"))); } } @@ -2740,7 +2740,7 @@ ExecARUpdateTriggers(EState *estate, ResultRelInfo *relinfo, TriggerDesc *trigdesc = relinfo->ri_TrigDesc; if (trigdesc && (trigdesc->trig_update_after_row || - trigdesc->trig_update_old_table || trigdesc->trig_update_new_table)) + trigdesc->trig_update_old_table || trigdesc->trig_update_new_table)) { HeapTuple trigtuple; @@ -2877,7 +2877,7 @@ ExecBSTruncateTriggers(EState *estate, ResultRelInfo *relinfo) if (newtuple) ereport(ERROR, (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), - errmsg("BEFORE STATEMENT trigger cannot return a value"))); + errmsg("BEFORE STATEMENT trigger cannot return a value"))); } } @@ -4797,7 +4797,7 @@ AfterTriggerSetState(ConstraintsSetStmt *stmt) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("cross-database references are not implemented: \"%s.%s.%s\"", - constraint->catalogname, constraint->schemaname, + constraint->catalogname, constraint->schemaname, constraint->relname))); } @@ -5149,8 +5149,8 @@ AfterTriggerSaveEvent(EState *estate, ResultRelInfo *relinfo, /* If transition tables are the only reason we're here, return. */ if ((event == TRIGGER_EVENT_DELETE && !trigdesc->trig_delete_after_row) || - (event == TRIGGER_EVENT_INSERT && !trigdesc->trig_insert_after_row) || - (event == TRIGGER_EVENT_UPDATE && !trigdesc->trig_update_after_row)) + (event == TRIGGER_EVENT_INSERT && !trigdesc->trig_insert_after_row) || + (event == TRIGGER_EVENT_UPDATE && !trigdesc->trig_update_after_row)) return; } diff --git a/src/backend/commands/tsearchcmds.c b/src/backend/commands/tsearchcmds.c index cb212fdf68..adc7cd67a7 100644 --- a/src/backend/commands/tsearchcmds.c +++ b/src/backend/commands/tsearchcmds.c @@ -237,8 +237,8 @@ DefineTSParser(List *names, List *parameters) else ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("text search parser parameter \"%s\" not recognized", - defel->defname))); + errmsg("text search parser parameter \"%s\" not recognized", + defel->defname))); } /* @@ -381,8 +381,8 @@ verify_dictoptions(Oid tmplId, List *dictoptions) if (dictoptions) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("text search template \"%s\" does not accept options", - NameStr(tform->tmplname)))); + errmsg("text search template \"%s\" does not accept options", + NameStr(tform->tmplname)))); } else { @@ -743,7 +743,7 @@ DefineTSTemplate(List *names, List *parameters) if (!superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("must be superuser to create text search templates"))); + errmsg("must be superuser to create text search templates"))); /* Convert list of names to a name and namespace */ namespaceoid = QualifiedNameGetCreationNamespace(names, &tmplname); @@ -780,8 +780,8 @@ DefineTSTemplate(List *names, List *parameters) else ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("text search template parameter \"%s\" not recognized", - defel->defname))); + errmsg("text search template parameter \"%s\" not recognized", + defel->defname))); } /* @@ -1484,8 +1484,8 @@ DropConfigurationMapping(AlterTSConfigurationStmt *stmt, { ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("mapping for token type \"%s\" does not exist", - strVal(val)))); + errmsg("mapping for token type \"%s\" does not exist", + strVal(val)))); } else { @@ -1685,7 +1685,7 @@ deserialize_deflist(Datum txt) *wsptr++ = '\0'; result = lappend(result, makeDefElem(pstrdup(workspace), - (Node *) makeString(pstrdup(startvalue)), -1)); + (Node *) makeString(pstrdup(startvalue)), -1)); state = CS_WAITKEY; } } @@ -1717,7 +1717,7 @@ deserialize_deflist(Datum txt) *wsptr++ = '\0'; result = lappend(result, makeDefElem(pstrdup(workspace), - (Node *) makeString(pstrdup(startvalue)), -1)); + (Node *) makeString(pstrdup(startvalue)), -1)); state = CS_WAITKEY; } } @@ -1732,7 +1732,7 @@ deserialize_deflist(Datum txt) *wsptr++ = '\0'; result = lappend(result, makeDefElem(pstrdup(workspace), - (Node *) makeString(pstrdup(startvalue)), -1)); + (Node *) makeString(pstrdup(startvalue)), -1)); state = CS_WAITKEY; } else @@ -1751,7 +1751,7 @@ deserialize_deflist(Datum txt) *wsptr++ = '\0'; result = lappend(result, makeDefElem(pstrdup(workspace), - (Node *) makeString(pstrdup(startvalue)), -1)); + (Node *) makeString(pstrdup(startvalue)), -1)); } else if (state != CS_WAITKEY) ereport(ERROR, diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c index 4e083eb345..c2fc59d1aa 100644 --- a/src/backend/commands/typecmds.c +++ b/src/backend/commands/typecmds.c @@ -343,8 +343,8 @@ DefineType(ParseState *pstate, List *names, List *parameters) if (category < 32 || category > 126) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid type category \"%s\": must be simple ASCII", - p))); + errmsg("invalid type category \"%s\": must be simple ASCII", + p))); } if (preferredEl) preferred = defGetBoolean(preferredEl); @@ -454,8 +454,8 @@ DefineType(ParseState *pstate, List *names, List *parameters) { /* backwards-compatibility hack */ ereport(WARNING, - (errmsg("changing return type of function %s from %s to %s", - NameListToString(inputName), "opaque", typeName))); + (errmsg("changing return type of function %s from %s to %s", + NameListToString(inputName), "opaque", typeName))); SetFunctionReturnType(inputOid, typoid); } else @@ -471,8 +471,8 @@ DefineType(ParseState *pstate, List *names, List *parameters) { /* backwards-compatibility hack */ ereport(WARNING, - (errmsg("changing return type of function %s from %s to %s", - NameListToString(outputName), "opaque", "cstring"))); + (errmsg("changing return type of function %s from %s to %s", + NameListToString(outputName), "opaque", "cstring"))); SetFunctionReturnType(outputOid, CSTRINGOID); } else @@ -581,13 +581,13 @@ DefineType(ParseState *pstate, List *names, List *parameters) if (typmodinOid && func_volatile(typmodinOid) == PROVOLATILE_VOLATILE) ereport(WARNING, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("type modifier input function %s should not be volatile", - NameListToString(typmodinName)))); + errmsg("type modifier input function %s should not be volatile", + NameListToString(typmodinName)))); if (typmodoutOid && func_volatile(typmodoutOid) == PROVOLATILE_VOLATILE) ereport(WARNING, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("type modifier output function %s should not be volatile", - NameListToString(typmodoutName)))); + errmsg("type modifier output function %s should not be volatile", + NameListToString(typmodoutName)))); /* * OK, we're done checking, time to make the type. We must assign the @@ -956,7 +956,7 @@ DefineDomain(CreateDomainStmt *stmt) if (nullDefined && !typNotNull) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("conflicting NULL/NOT NULL constraints"))); + errmsg("conflicting NULL/NOT NULL constraints"))); typNotNull = true; nullDefined = true; break; @@ -965,7 +965,7 @@ DefineDomain(CreateDomainStmt *stmt) if (nullDefined && typNotNull) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("conflicting NULL/NOT NULL constraints"))); + errmsg("conflicting NULL/NOT NULL constraints"))); typNotNull = false; nullDefined = true; break; @@ -990,25 +990,25 @@ DefineDomain(CreateDomainStmt *stmt) case CONSTR_UNIQUE: ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("unique constraints not possible for domains"))); + errmsg("unique constraints not possible for domains"))); break; case CONSTR_PRIMARY: ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("primary key constraints not possible for domains"))); + errmsg("primary key constraints not possible for domains"))); break; case CONSTR_EXCLUSION: ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("exclusion constraints not possible for domains"))); + errmsg("exclusion constraints not possible for domains"))); break; case CONSTR_FOREIGN: ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("foreign key constraints not possible for domains"))); + errmsg("foreign key constraints not possible for domains"))); break; case CONSTR_ATTR_DEFERRABLE: @@ -1728,8 +1728,8 @@ findTypeOutputFunction(List *procname, Oid typeOid) { /* Found, but must complain and fix the pg_proc entry */ ereport(WARNING, - (errmsg("changing argument type of function %s from \"opaque\" to %s", - NameListToString(procname), format_type_be(typeOid)))); + (errmsg("changing argument type of function %s from \"opaque\" to %s", + NameListToString(procname), format_type_be(typeOid)))); SetFunctionArgType(procOid, 0, typeOid); /* @@ -1913,9 +1913,9 @@ findRangeSubOpclass(List *opcname, Oid subtype) if (!IsBinaryCoercible(subtype, opInputType)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("operator class \"%s\" does not accept data type %s", - NameListToString(opcname), - format_type_be(subtype)))); + errmsg("operator class \"%s\" does not accept data type %s", + NameListToString(opcname), + format_type_be(subtype)))); } else { @@ -2338,7 +2338,7 @@ AlterDomainNotNull(List *names, bool notNull) ereport(ERROR, (errcode(ERRCODE_NOT_NULL_VIOLATION), errmsg("column \"%s\" of table \"%s\" contains null values", - NameStr(tupdesc->attrs[attnum - 1]->attname), + NameStr(tupdesc->attrs[attnum - 1]->attname), RelationGetRelationName(testrel)), errtablecol(testrel, attnum))); } @@ -2450,8 +2450,8 @@ AlterDomainDropConstraint(List *names, const char *constrName, if (!missing_ok) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("constraint \"%s\" of domain \"%s\" does not exist", - constrName, TypeNameToString(typename)))); + errmsg("constraint \"%s\" of domain \"%s\" does not exist", + constrName, TypeNameToString(typename)))); else ereport(NOTICE, (errmsg("constraint \"%s\" of domain \"%s\" does not exist, skipping", @@ -2515,19 +2515,19 @@ AlterDomainAddConstraint(List *names, Node *newConstraint, case CONSTR_PRIMARY: ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("primary key constraints not possible for domains"))); + errmsg("primary key constraints not possible for domains"))); break; case CONSTR_EXCLUSION: ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("exclusion constraints not possible for domains"))); + errmsg("exclusion constraints not possible for domains"))); break; case CONSTR_FOREIGN: ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("foreign key constraints not possible for domains"))); + errmsg("foreign key constraints not possible for domains"))); break; case CONSTR_ATTR_DEFERRABLE: @@ -2639,8 +2639,8 @@ AlterDomainValidateConstraint(List *names, char *constrName) if (con->contype != CONSTRAINT_CHECK) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("constraint \"%s\" of domain \"%s\" is not a check constraint", - constrName, TypeNameToString(typename)))); + errmsg("constraint \"%s\" of domain \"%s\" is not a check constraint", + constrName, TypeNameToString(typename)))); val = SysCacheGetAttr(CONSTROID, tuple, Anum_pg_constraint_conbin, @@ -2745,7 +2745,7 @@ validateDomainConstraint(Oid domainoid, char *ccbin) ereport(ERROR, (errcode(ERRCODE_CHECK_VIOLATION), errmsg("column \"%s\" of table \"%s\" contains values that violate the new constraint", - NameStr(tupdesc->attrs[attnum - 1]->attname), + NameStr(tupdesc->attrs[attnum - 1]->attname), RelationGetRelationName(testrel)), errtablecol(testrel, attnum))); } @@ -2991,8 +2991,8 @@ domainAddConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid, constr->conname)) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("constraint \"%s\" for domain \"%s\" already exists", - constr->conname, domainName))); + errmsg("constraint \"%s\" for domain \"%s\" already exists", + constr->conname, domainName))); } else constr->conname = ChooseConstraintName(domainName, @@ -3042,7 +3042,7 @@ domainAddConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid, contain_var_clause(expr)) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("cannot use table references in domain check constraint"))); + errmsg("cannot use table references in domain check constraint"))); /* * Convert to string form for storage. diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index 24608c27c3..0a72c2ecb3 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -299,14 +299,14 @@ CreateRole(ParseState *pstate, CreateRoleStmt *stmt) if (!superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("must be superuser to create replication users"))); + errmsg("must be superuser to create replication users"))); } else if (bypassrls) { if (!superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("must be superuser to change bypassrls attribute"))); + errmsg("must be superuser to change bypassrls attribute"))); } else { @@ -325,7 +325,7 @@ CreateRole(ParseState *pstate, CreateRoleStmt *stmt) (errcode(ERRCODE_RESERVED_NAME), errmsg("role name \"%s\" is reserved", stmt->role), - errdetail("Role names starting with \"pg_\" are reserved."))); + errdetail("Role names starting with \"pg_\" are reserved."))); /* * Check the pg_authid relation to be certain the role doesn't already @@ -681,7 +681,7 @@ AlterRole(AlterRoleStmt *stmt) if (!superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("must be superuser to change bypassrls attribute"))); + errmsg("must be superuser to change bypassrls attribute"))); } else if (!have_createrole_privilege()) { @@ -961,7 +961,7 @@ DropRole(DropRoleStmt *stmt) if (rolspec->roletype != ROLESPEC_CSTRING) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("cannot use special role specifier in DROP ROLE"))); + errmsg("cannot use special role specifier in DROP ROLE"))); role = rolspec->rolename; tuple = SearchSysCache1(AUTHNAME, PointerGetDatum(role)); @@ -1159,14 +1159,14 @@ RenameRole(const char *oldname, const char *newname) (errcode(ERRCODE_RESERVED_NAME), errmsg("role name \"%s\" is reserved", NameStr(authform->rolname)), - errdetail("Role names starting with \"pg_\" are reserved."))); + errdetail("Role names starting with \"pg_\" are reserved."))); if (IsReservedName(newname)) ereport(ERROR, (errcode(ERRCODE_RESERVED_NAME), errmsg("role name \"%s\" is reserved", newname), - errdetail("Role names starting with \"pg_\" are reserved."))); + errdetail("Role names starting with \"pg_\" are reserved."))); /* make sure the new name doesn't exist */ if (SearchSysCacheExists1(AUTHNAME, CStringGetDatum(newname))) @@ -1198,7 +1198,7 @@ RenameRole(const char *oldname, const char *newname) repl_repl[Anum_pg_authid_rolname - 1] = true; repl_val[Anum_pg_authid_rolname - 1] = DirectFunctionCall1(namein, - CStringGetDatum(newname)); + CStringGetDatum(newname)); repl_null[Anum_pg_authid_rolname - 1] = false; datum = heap_getattr(oldtuple, Anum_pg_authid_rolpassword, dsc, &isnull); @@ -1270,7 +1270,7 @@ GrantRole(GrantRoleStmt *stmt) if (rolename == NULL || priv->cols != NIL) ereport(ERROR, (errcode(ERRCODE_INVALID_GRANT_OPERATION), - errmsg("column names cannot be included in GRANT/REVOKE ROLE"))); + errmsg("column names cannot be included in GRANT/REVOKE ROLE"))); roleid = get_role_oid(rolename, false); if (stmt->is_grant) diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index 9fbb0eb4eb..faa181207a 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -1303,8 +1303,8 @@ vacuum_rel(Oid relid, RangeVar *relation, int options, VacuumParams *params) if (IsAutoVacuumWorkerProcess() && params->log_min_duration >= 0) ereport(LOG, (errcode(ERRCODE_LOCK_NOT_AVAILABLE), - errmsg("skipping vacuum of \"%s\" --- lock not available", - relation->relname))); + errmsg("skipping vacuum of \"%s\" --- lock not available", + relation->relname))); } if (!onerel) @@ -1329,8 +1329,8 @@ vacuum_rel(Oid relid, RangeVar *relation, int options, VacuumParams *params) { if (onerel->rd_rel->relisshared) ereport(WARNING, - (errmsg("skipping \"%s\" --- only superuser can vacuum it", - RelationGetRelationName(onerel)))); + (errmsg("skipping \"%s\" --- only superuser can vacuum it", + RelationGetRelationName(onerel)))); else if (onerel->rd_rel->relnamespace == PG_CATALOG_NAMESPACE) ereport(WARNING, (errmsg("skipping \"%s\" --- only superuser or database owner can vacuum it", diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c index 7978c062d7..1951aa94fb 100644 --- a/src/backend/commands/vacuumlazy.c +++ b/src/backend/commands/vacuumlazy.c @@ -167,7 +167,7 @@ static void lazy_record_dead_tuple(LVRelStats *vacrelstats, static bool lazy_tid_reaped(ItemPointer itemptr, void *state); static int vac_cmp_itemptr(const void *left, const void *right); static bool heap_page_is_all_visible(Relation rel, Buffer buf, - TransactionId *visibility_cutoff_xid, bool *all_frozen); + TransactionId *visibility_cutoff_xid, bool *all_frozen); /* @@ -391,7 +391,7 @@ lazy_vacuum_rel(Relation onerel, int options, VacuumParams *params, vacrelstats->new_dead_tuples, OldestXmin); appendStringInfo(&buf, - _("buffer usage: %d hits, %d misses, %d dirtied\n"), + _("buffer usage: %d hits, %d misses, %d dirtied\n"), VacuumPageHit, VacuumPageMiss, VacuumPageDirty); @@ -621,7 +621,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats, uint8 vmskipflags; vmskipflags = visibilitymap_get_status(onerel, - next_unskippable_block, + next_unskippable_block, &vmbuffer); if (aggressive) { @@ -857,8 +857,8 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats, if (PageIsNew(page)) { ereport(WARNING, - (errmsg("relation \"%s\" page %u is uninitialized --- fixing", - relname, blkno))); + (errmsg("relation \"%s\" page %u is uninitialized --- fixing", + relname, blkno))); PageInit(page, BufferGetPageSize(buf), 0); empty_pages++; } @@ -900,7 +900,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats, PageSetAllVisible(page); visibilitymap_set(onerel, blkno, buf, InvalidXLogRecPtr, vmbuffer, InvalidTransactionId, - VISIBILITYMAP_ALL_VISIBLE | VISIBILITYMAP_ALL_FROZEN); + VISIBILITYMAP_ALL_VISIBLE | VISIBILITYMAP_ALL_FROZEN); END_CRIT_SECTION(); } @@ -1071,7 +1071,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats, { lazy_record_dead_tuple(vacrelstats, &(tuple.t_self)); HeapTupleHeaderAdvanceLatestRemovedXid(tuple.t_data, - &vacrelstats->latestRemovedXid); + &vacrelstats->latestRemovedXid); tups_vacuumed += 1; has_dead_tuples = true; } @@ -1087,7 +1087,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats, * freezing. Note we already have exclusive buffer lock. */ if (heap_prepare_freeze_tuple(tuple.t_data, FreezeLimit, - MultiXactCutoff, &frozen[nfrozen], + MultiXactCutoff, &frozen[nfrozen], &tuple_totally_frozen)) frozen[nfrozen++].offset = offnum; @@ -1268,7 +1268,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats, /* now we can compute the new value for pg_class.reltuples */ vacrelstats->new_rel_tuples = vac_estimate_reltuples(onerel, false, nblocks, - vacrelstats->tupcount_pages, + vacrelstats->tupcount_pages, num_tuples); /* @@ -1337,7 +1337,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats, */ initStringInfo(&buf); appendStringInfo(&buf, - _("%.0f dead row versions cannot be removed yet, oldest xmin: %u\n"), + _("%.0f dead row versions cannot be removed yet, oldest xmin: %u\n"), nkeep, OldestXmin); appendStringInfo(&buf, _("There were %.0f unused item pointers.\n"), nunused); @@ -1664,7 +1664,7 @@ lazy_cleanup_index(Relation indrel, stats->num_index_tuples, stats->num_pages), errdetail("%.0f index row versions were removed.\n" - "%u index pages have been deleted, %u are currently reusable.\n" + "%u index pages have been deleted, %u are currently reusable.\n" "%s.", stats->tuples_removed, stats->pages_deleted, stats->pages_free, @@ -1700,7 +1700,7 @@ should_attempt_truncation(LVRelStats *vacrelstats) possibly_freeable = vacrelstats->rel_pages - vacrelstats->nonempty_pages; if (possibly_freeable > 0 && (possibly_freeable >= REL_TRUNCATE_MINIMUM || - possibly_freeable >= vacrelstats->rel_pages / REL_TRUNCATE_FRACTION) && + possibly_freeable >= vacrelstats->rel_pages / REL_TRUNCATE_FRACTION) && old_snapshot_threshold < 0) return true; else diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c index f8f456e0e5..4156bcd8df 100644 --- a/src/backend/commands/variable.c +++ b/src/backend/commands/variable.c @@ -290,7 +290,7 @@ check_timezone(char **newval, void **extra, GucSource source) */ interval = DatumGetIntervalP(DirectFunctionCall3(interval_in, CStringGetDatum(val), - ObjectIdGetDatum(InvalidOid), + ObjectIdGetDatum(InvalidOid), Int32GetDatum(-1))); pfree(val); @@ -773,7 +773,7 @@ assign_client_encoding(const char *newval, void *extra) */ ereport(ERROR, (errcode(ERRCODE_INVALID_TRANSACTION_STATE), - errmsg("cannot change client_encoding during a parallel operation"))); + errmsg("cannot change client_encoding during a parallel operation"))); } /* We do not expect an error if PrepareClientEncoding succeeded */ diff --git a/src/backend/commands/view.c b/src/backend/commands/view.c index e83e4f455f..f25a5658d6 100644 --- a/src/backend/commands/view.c +++ b/src/backend/commands/view.c @@ -87,7 +87,7 @@ DefineVirtualRelation(RangeVar *relation, List *tlist, bool replace, ColumnDef *def = makeColumnDef(tle->resname, exprType((Node *) tle->expr), exprTypmod((Node *) tle->expr), - exprCollation((Node *) tle->expr)); + exprCollation((Node *) tle->expr)); /* * It's possible that the column is of a collatable type but the @@ -295,9 +295,9 @@ checkViewTupleDesc(TupleDesc newdesc, TupleDesc olddesc) if (strcmp(NameStr(newattr->attname), NameStr(oldattr->attname)) != 0) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("cannot change name of view column \"%s\" to \"%s\"", - NameStr(oldattr->attname), - NameStr(newattr->attname)))); + errmsg("cannot change name of view column \"%s\" to \"%s\"", + NameStr(oldattr->attname), + NameStr(newattr->attname)))); /* XXX would it be safe to allow atttypmod to change? Not sure */ if (newattr->atttypid != oldattr->atttypid || newattr->atttypmod != oldattr->atttypmod) @@ -460,7 +460,7 @@ DefineView(ViewStmt *stmt, const char *queryString, if (viewParse->hasModifyingCTE) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("views must not contain data-modifying statements in WITH"))); + errmsg("views must not contain data-modifying statements in WITH"))); /* * If the user specified the WITH CHECK OPTION, add it to the list of @@ -469,11 +469,11 @@ DefineView(ViewStmt *stmt, const char *queryString, if (stmt->withCheckOption == LOCAL_CHECK_OPTION) stmt->options = lappend(stmt->options, makeDefElem("check_option", - (Node *) makeString("local"), -1)); + (Node *) makeString("local"), -1)); else if (stmt->withCheckOption == CASCADED_CHECK_OPTION) stmt->options = lappend(stmt->options, makeDefElem("check_option", - (Node *) makeString("cascaded"), -1)); + (Node *) makeString("cascaded"), -1)); /* * Check that the view is auto-updatable if WITH CHECK OPTION was @@ -538,7 +538,7 @@ DefineView(ViewStmt *stmt, const char *queryString, if (stmt->view->relpersistence == RELPERSISTENCE_UNLOGGED) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("views cannot be unlogged because they do not have storage"))); + errmsg("views cannot be unlogged because they do not have storage"))); /* * If the user didn't explicitly ask for a temporary view, check whether |
