diff options
author | Tom Lane | 2017-06-21 19:35:54 +0000 |
---|---|---|
committer | Tom Lane | 2017-06-21 19:35:54 +0000 |
commit | 382ceffdf7f620d8f2d50e451b4167d291ae2348 (patch) | |
tree | f558251492f2c6f86e3566f7a82f9d00509122c2 /src | |
parent | c7b8998ebbf310a156aa38022555a24d98fdbfb4 (diff) |
Phase 3 of pgindent updates.
Don't move parenthesized lines to the left, even if that means they
flow past the right margin.
By default, BSD indent lines up statement continuation lines that are
within parentheses so that they start just to the right of the preceding
left parenthesis. However, traditionally, if that resulted in the
continuation line extending to the right of the desired right margin,
then indent would push it left just far enough to not overrun the margin,
if it could do so without making the continuation line start to the left of
the current statement indent. That makes for a weird mix of indentations
unless one has been completely rigid about never violating the 80-column
limit.
This behavior has been pretty universally panned by Postgres developers.
Hence, disable it with indent's new -lpl switch, so that parenthesized
lines are always lined up with the preceding left paren.
This patch is much less interesting than the first round of indent
changes, but also bulkier, so I thought it best to separate the effects.
Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org
Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
Diffstat (limited to 'src')
492 files changed, 4429 insertions, 4427 deletions
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c index b0e89ace5e..efebeb035a 100644 --- a/src/backend/access/brin/brin.c +++ b/src/backend/access/brin/brin.c @@ -473,7 +473,7 @@ bringetbitmap(IndexScanDesc scan, TIDBitmap *tbm) */ Assert((key->sk_flags & SK_ISNULL) || (key->sk_collation == - bdesc->bd_tupdesc->attrs[keyattno - 1]->attcollation)); + bdesc->bd_tupdesc->attrs[keyattno - 1]->attcollation)); /* First time this column? look up consistent function */ if (consistentFn[keyattno - 1].fn_oid == InvalidOid) @@ -1116,7 +1116,7 @@ terminate_brin_buildstate(BrinBuildState *state) page = BufferGetPage(state->bs_currentInsertBuf); RecordPageWithFreeSpace(state->bs_irel, - BufferGetBlockNumber(state->bs_currentInsertBuf), + BufferGetBlockNumber(state->bs_currentInsertBuf), PageGetFreeSpace(page)); ReleaseBuffer(state->bs_currentInsertBuf); } diff --git a/src/backend/access/brin/brin_inclusion.c b/src/backend/access/brin/brin_inclusion.c index bc16dd7981..9c0a058ccb 100644 --- a/src/backend/access/brin/brin_inclusion.c +++ b/src/backend/access/brin/brin_inclusion.c @@ -312,7 +312,7 @@ brin_inclusion_consistent(PG_FUNCTION_ARGS) case RTLeftStrategyNumber: finfo = inclusion_get_strategy_procinfo(bdesc, attno, subtype, - RTOverRightStrategyNumber); + RTOverRightStrategyNumber); result = FunctionCall2Coll(finfo, colloid, unionval, query); PG_RETURN_BOOL(!DatumGetBool(result)); @@ -336,7 +336,7 @@ brin_inclusion_consistent(PG_FUNCTION_ARGS) case RTBelowStrategyNumber: finfo = inclusion_get_strategy_procinfo(bdesc, attno, subtype, - RTOverAboveStrategyNumber); + RTOverAboveStrategyNumber); result = FunctionCall2Coll(finfo, colloid, unionval, query); PG_RETURN_BOOL(!DatumGetBool(result)); @@ -354,7 +354,7 @@ brin_inclusion_consistent(PG_FUNCTION_ARGS) case RTAboveStrategyNumber: finfo = inclusion_get_strategy_procinfo(bdesc, attno, subtype, - RTOverBelowStrategyNumber); + RTOverBelowStrategyNumber); result = FunctionCall2Coll(finfo, colloid, unionval, query); PG_RETURN_BOOL(!DatumGetBool(result)); @@ -686,7 +686,7 @@ inclusion_get_strategy_procinfo(BrinDesc *bdesc, uint16 attno, Oid subtype, strategynum, attr->atttypid, subtype, opfamily); oprid = DatumGetObjectId(SysCacheGetAttr(AMOPSTRATEGY, tuple, - Anum_pg_amop_amopopr, &isNull)); + Anum_pg_amop_amopopr, &isNull)); ReleaseSysCache(tuple); Assert(!isNull && RegProcedureIsValid(oprid)); diff --git a/src/backend/access/brin/brin_minmax.c b/src/backend/access/brin/brin_minmax.c index 8f7a0c75b8..62fd90aabe 100644 --- a/src/backend/access/brin/brin_minmax.c +++ b/src/backend/access/brin/brin_minmax.c @@ -212,7 +212,7 @@ brin_minmax_consistent(PG_FUNCTION_ARGS) break; /* max() >= scankey */ finfo = minmax_get_strategy_procinfo(bdesc, attno, subtype, - BTGreaterEqualStrategyNumber); + BTGreaterEqualStrategyNumber); matches = FunctionCall2Coll(finfo, colloid, column->bv_values[1], value); break; @@ -358,7 +358,7 @@ minmax_get_strategy_procinfo(BrinDesc *bdesc, uint16 attno, Oid subtype, strategynum, attr->atttypid, subtype, opfamily); oprid = DatumGetObjectId(SysCacheGetAttr(AMOPSTRATEGY, tuple, - Anum_pg_amop_amopopr, &isNull)); + Anum_pg_amop_amopopr, &isNull)); ReleaseSysCache(tuple); Assert(!isNull && RegProcedureIsValid(oprid)); diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c index bd08f0e396..80f803e438 100644 --- a/src/backend/access/brin/brin_pageops.c +++ b/src/backend/access/brin/brin_pageops.c @@ -73,8 +73,8 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange, { ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("index row size %zu exceeds maximum %zu for index \"%s\"", - newsz, BrinMaxItemSize, RelationGetRelationName(idxrel)))); + errmsg("index row size %zu exceeds maximum %zu for index \"%s\"", + newsz, BrinMaxItemSize, RelationGetRelationName(idxrel)))); return false; /* keep compiler quiet */ } @@ -355,8 +355,8 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange, { ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("index row size %zu exceeds maximum %zu for index \"%s\"", - itemsz, BrinMaxItemSize, RelationGetRelationName(idxrel)))); + errmsg("index row size %zu exceeds maximum %zu for index \"%s\"", + itemsz, BrinMaxItemSize, RelationGetRelationName(idxrel)))); return InvalidOffsetNumber; /* keep compiler quiet */ } @@ -821,8 +821,8 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz, ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("index row size %zu exceeds maximum %zu for index \"%s\"", - itemsz, freespace, RelationGetRelationName(irel)))); + errmsg("index row size %zu exceeds maximum %zu for index \"%s\"", + itemsz, freespace, RelationGetRelationName(irel)))); return InvalidBuffer; /* keep compiler quiet */ } diff --git a/src/backend/access/brin/brin_revmap.c b/src/backend/access/brin/brin_revmap.c index c87bc03a9e..22f2076887 100644 --- a/src/backend/access/brin/brin_revmap.c +++ b/src/backend/access/brin/brin_revmap.c @@ -260,7 +260,7 @@ brinGetTupleForHeapBlock(BrinRevmap *revmap, BlockNumber heapBlk, if (ItemPointerIsValid(&previptr) && ItemPointerEquals(&previptr, iptr)) ereport(ERROR, (errcode(ERRCODE_INDEX_CORRUPTED), - errmsg_internal("corrupted BRIN index: inconsistent range map"))); + errmsg_internal("corrupted BRIN index: inconsistent range map"))); previptr = *iptr; blk = ItemPointerGetBlockNumber(iptr); @@ -598,10 +598,10 @@ revmap_physical_extend(BrinRevmap *revmap) if (!PageIsNew(page) && !BRIN_IS_REGULAR_PAGE(page)) ereport(ERROR, (errcode(ERRCODE_INDEX_CORRUPTED), - errmsg("unexpected page type 0x%04X in BRIN index \"%s\" block %u", - BrinPageType(page), - RelationGetRelationName(irel), - BufferGetBlockNumber(buf)))); + errmsg("unexpected page type 0x%04X in BRIN index \"%s\" block %u", + BrinPageType(page), + RelationGetRelationName(irel), + BufferGetBlockNumber(buf)))); /* If the page is in use, evacuate it and restart */ if (brin_start_evacuating_page(irel, buf)) diff --git a/src/backend/access/brin/brin_tuple.c b/src/backend/access/brin/brin_tuple.c index e2e1d23377..ed5b4b108d 100644 --- a/src/backend/access/brin/brin_tuple.c +++ b/src/backend/access/brin/brin_tuple.c @@ -68,7 +68,7 @@ brtuple_disk_tupdesc(BrinDesc *brdesc) { for (j = 0; j < brdesc->bd_info[i]->oi_nstored; j++) TupleDescInitEntry(tupdesc, attno++, NULL, - brdesc->bd_info[i]->oi_typcache[j]->type_id, + brdesc->bd_info[i]->oi_typcache[j]->type_id, -1, 0); } diff --git a/src/backend/access/common/indextuple.c b/src/backend/access/common/indextuple.c index 2846ec8b34..37a21057d0 100644 --- a/src/backend/access/common/indextuple.c +++ b/src/backend/access/common/indextuple.c @@ -80,7 +80,7 @@ index_form_tuple(TupleDesc tupleDescriptor, { untoasted_values[i] = PointerGetDatum(heap_tuple_fetch_attr((struct varlena *) - DatumGetPointer(values[i]))); + DatumGetPointer(values[i]))); untoasted_free[i] = true; } @@ -89,7 +89,7 @@ index_form_tuple(TupleDesc tupleDescriptor, * try to compress it in-line. */ if (!VARATT_IS_EXTENDED(DatumGetPointer(untoasted_values[i])) && - VARSIZE(DatumGetPointer(untoasted_values[i])) > TOAST_INDEX_TARGET && + VARSIZE(DatumGetPointer(untoasted_values[i])) > TOAST_INDEX_TARGET && (att->attstorage == 'x' || att->attstorage == 'm')) { Datum cvalue = toast_compress_datum(untoasted_values[i]); diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c index a6adf6e637..ec10762529 100644 --- a/src/backend/access/common/reloptions.c +++ b/src/backend/access/common/reloptions.c @@ -537,7 +537,7 @@ add_reloption_kind(void) if (last_assigned_kind >= RELOPT_KIND_MAX) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("user-defined relation parameter types limit exceeded"))); + errmsg("user-defined relation parameter types limit exceeded"))); last_assigned_kind <<= 1; return (relopt_kind) last_assigned_kind; } @@ -567,7 +567,7 @@ add_reloption(relopt_gen *newoption) { max_custom_options *= 2; custom_options = repalloc(custom_options, - max_custom_options * sizeof(relopt_gen *)); + max_custom_options * sizeof(relopt_gen *)); } MemoryContextSwitchTo(oldcxt); } @@ -818,7 +818,7 @@ transformRelOptions(Datum oldOptions, List *defList, char *namspace, if (def->arg != NULL) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("RESET must not include values for parameters"))); + errmsg("RESET must not include values for parameters"))); } else { @@ -1137,8 +1137,8 @@ parse_one_reloption(relopt_value *option, char *text_str, int text_len, if (validate && !parsed) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid value for boolean option \"%s\": %s", - option->gen->name, value))); + errmsg("invalid value for boolean option \"%s\": %s", + option->gen->name, value))); } break; case RELOPT_TYPE_INT: @@ -1149,16 +1149,16 @@ parse_one_reloption(relopt_value *option, char *text_str, int text_len, if (validate && !parsed) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid value for integer option \"%s\": %s", - option->gen->name, value))); + errmsg("invalid value for integer option \"%s\": %s", + option->gen->name, value))); if (validate && (option->values.int_val < optint->min || option->values.int_val > optint->max)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("value %s out of bounds for option \"%s\"", - value, option->gen->name), - errdetail("Valid values are between \"%d\" and \"%d\".", - optint->min, optint->max))); + errmsg("value %s out of bounds for option \"%s\"", + value, option->gen->name), + errdetail("Valid values are between \"%d\" and \"%d\".", + optint->min, optint->max))); } break; case RELOPT_TYPE_REAL: @@ -1175,10 +1175,10 @@ parse_one_reloption(relopt_value *option, char *text_str, int text_len, option->values.real_val > optreal->max)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("value %s out of bounds for option \"%s\"", - value, option->gen->name), - errdetail("Valid values are between \"%f\" and \"%f\".", - optreal->min, optreal->max))); + errmsg("value %s out of bounds for option \"%s\"", + value, option->gen->name), + errdetail("Valid values are between \"%f\" and \"%f\".", + optreal->min, optreal->max))); } break; case RELOPT_TYPE_STRING: diff --git a/src/backend/access/gin/gindatapage.c b/src/backend/access/gin/gindatapage.c index 93ed3272ea..2e5ea47976 100644 --- a/src/backend/access/gin/gindatapage.c +++ b/src/backend/access/gin/gindatapage.c @@ -685,7 +685,7 @@ dataBeginPlaceToPageLeaf(GinBtree btree, Buffer buf, GinBtreeStack *stack, Assert(GinPageRightMost(page) || ginCompareItemPointers(GinDataPageGetRightBound(*newlpage), - GinDataPageGetRightBound(*newrpage)) < 0); + GinDataPageGetRightBound(*newrpage)) < 0); if (append) elog(DEBUG2, "appended %d items to block %u; split %d/%d (%d to go)", @@ -1468,7 +1468,7 @@ addItemsToLeaf(disassembledLeaf *leaf, ItemPointer newItems, int nNewItems) ItemPointerData next_first; next = (leafSegmentInfo *) dlist_container(leafSegmentInfo, node, - dlist_next_node(&leaf->segments, iter.cur)); + dlist_next_node(&leaf->segments, iter.cur)); if (next->items) next_first = next->items[0]; else @@ -1595,7 +1595,7 @@ leafRepackItems(disassembledLeaf *leaf, ItemPointer remaining) { seginfo->seg = ginCompressPostingList(seginfo->items, seginfo->nitems, - GinPostingListSegmentMaxSize, + GinPostingListSegmentMaxSize, &npacked); } if (npacked != seginfo->nitems) @@ -1610,7 +1610,7 @@ leafRepackItems(disassembledLeaf *leaf, ItemPointer remaining) pfree(seginfo->seg); seginfo->seg = ginCompressPostingList(seginfo->items, seginfo->nitems, - GinPostingListSegmentTargetSize, + GinPostingListSegmentTargetSize, &npacked); if (seginfo->action != GIN_SEGMENT_INSERT) seginfo->action = GIN_SEGMENT_REPLACE; diff --git a/src/backend/access/gin/ginentrypage.c b/src/backend/access/gin/ginentrypage.c index 8c9859ce8e..d5cc70258a 100644 --- a/src/backend/access/gin/ginentrypage.c +++ b/src/backend/access/gin/ginentrypage.c @@ -107,9 +107,9 @@ GinFormTuple(GinState *ginstate, if (errorTooBig) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("index row size %zu exceeds maximum %zu for index \"%s\"", - (Size) newsize, (Size) GinMaxItemSize, - RelationGetRelationName(ginstate->index)))); + errmsg("index row size %zu exceeds maximum %zu for index \"%s\"", + (Size) newsize, (Size) GinMaxItemSize, + RelationGetRelationName(ginstate->index)))); pfree(itup); return NULL; } @@ -256,7 +256,7 @@ entryIsMoveRight(GinBtree btree, Page page) key = gintuple_get_key(btree->ginstate, itup, &category); if (ginCompareAttEntries(btree->ginstate, - btree->entryAttnum, btree->entryKey, btree->entryCategory, + btree->entryAttnum, btree->entryKey, btree->entryCategory, attnum, key, category) > 0) return TRUE; diff --git a/src/backend/access/gin/ginfast.c b/src/backend/access/gin/ginfast.c index 03a54346aa..59e435465a 100644 --- a/src/backend/access/gin/ginfast.c +++ b/src/backend/access/gin/ginfast.c @@ -482,7 +482,7 @@ ginHeapTupleFastCollect(GinState *ginstate, { collector->lentuples *= 2; collector->tuples = (IndexTuple *) repalloc(collector->tuples, - sizeof(IndexTuple) * collector->lentuples); + sizeof(IndexTuple) * collector->lentuples); } /* @@ -874,7 +874,7 @@ ginInsertCleanup(GinState *ginstate, bool full_clean, */ ginBeginBAScan(&accum); while ((list = ginGetBAEntry(&accum, - &attnum, &key, &category, &nlist)) != NULL) + &attnum, &key, &category, &nlist)) != NULL) { ginEntryInsert(ginstate, attnum, key, category, list, nlist, NULL); @@ -904,7 +904,7 @@ ginInsertCleanup(GinState *ginstate, bool full_clean, ginBeginBAScan(&accum); while ((list = ginGetBAEntry(&accum, - &attnum, &key, &category, &nlist)) != NULL) + &attnum, &key, &category, &nlist)) != NULL) ginEntryInsert(ginstate, attnum, key, category, list, nlist, NULL); } @@ -989,7 +989,7 @@ gin_clean_pending_list(PG_FUNCTION_ARGS) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("recovery is in progress"), - errhint("GIN pending list cannot be cleaned up during recovery."))); + errhint("GIN pending list cannot be cleaned up during recovery."))); /* Must be a GIN index */ if (indexRel->rd_rel->relkind != RELKIND_INDEX || @@ -1007,7 +1007,7 @@ gin_clean_pending_list(PG_FUNCTION_ARGS) if (RELATION_IS_OTHER_TEMP(indexRel)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot access temporary indexes of other sessions"))); + errmsg("cannot access temporary indexes of other sessions"))); /* User must own the index (comparable to privileges needed for VACUUM) */ if (!pg_class_ownercheck(indexoid, GetUserId())) diff --git a/src/backend/access/gin/ginget.c b/src/backend/access/gin/ginget.c index 610d386ff8..56a5bf47b8 100644 --- a/src/backend/access/gin/ginget.c +++ b/src/backend/access/gin/ginget.c @@ -179,11 +179,11 @@ collectMatchBitmap(GinBtreeData *btree, GinBtreeStack *stack, *---------- */ cmp = DatumGetInt32(FunctionCall4Coll(&btree->ginstate->comparePartialFn[attnum - 1], - btree->ginstate->supportCollation[attnum - 1], + btree->ginstate->supportCollation[attnum - 1], scanEntry->queryKey, idatum, - UInt16GetDatum(scanEntry->strategy), - PointerGetDatum(scanEntry->extra_data))); + UInt16GetDatum(scanEntry->strategy), + PointerGetDatum(scanEntry->extra_data))); if (cmp > 0) return true; @@ -628,7 +628,7 @@ entryLoadMoreItems(GinState *ginstate, GinScanEntry entry, { ItemPointerSet(&entry->btree.itemptr, GinItemPointerGetBlockNumber(&advancePast), - OffsetNumberNext(GinItemPointerGetOffsetNumber(&advancePast))); + OffsetNumberNext(GinItemPointerGetOffsetNumber(&advancePast))); } entry->btree.fullScan = false; stack = ginFindLeafPage(&entry->btree, true, snapshot); @@ -990,7 +990,7 @@ keyGetItem(GinState *ginstate, MemoryContext tempCtx, GinScanKey key, Assert(GinItemPointerGetOffsetNumber(&minItem) > 0); ItemPointerSet(&advancePast, GinItemPointerGetBlockNumber(&minItem), - OffsetNumberPrev(GinItemPointerGetOffsetNumber(&minItem))); + OffsetNumberPrev(GinItemPointerGetOffsetNumber(&minItem))); } /* @@ -1249,7 +1249,7 @@ scanGetItem(IndexScanDesc scan, ItemPointerData advancePast, GinItemPointerGetBlockNumber(&key->curItem)) { ItemPointerSet(&advancePast, - GinItemPointerGetBlockNumber(&key->curItem), + GinItemPointerGetBlockNumber(&key->curItem), InvalidOffsetNumber); } } @@ -1461,11 +1461,11 @@ matchPartialInPendingList(GinState *ginstate, Page page, *---------- */ cmp = DatumGetInt32(FunctionCall4Coll(&ginstate->comparePartialFn[entry->attnum - 1], - ginstate->supportCollation[entry->attnum - 1], + ginstate->supportCollation[entry->attnum - 1], entry->queryKey, datum[off - 1], UInt16GetDatum(entry->strategy), - PointerGetDatum(entry->extra_data))); + PointerGetDatum(entry->extra_data))); if (cmp == 0) return true; else if (cmp > 0) diff --git a/src/backend/access/gin/gininsert.c b/src/backend/access/gin/gininsert.c index d90faae65d..5378011f50 100644 --- a/src/backend/access/gin/gininsert.c +++ b/src/backend/access/gin/gininsert.c @@ -292,7 +292,7 @@ ginBuildCallback(Relation index, HeapTuple htup, Datum *values, ginBeginBAScan(&buildstate->accum); while ((list = ginGetBAEntry(&buildstate->accum, - &attnum, &key, &category, &nlist)) != NULL) + &attnum, &key, &category, &nlist)) != NULL) { /* there could be many entries, so be willing to abort here */ CHECK_FOR_INTERRUPTS(); @@ -380,7 +380,7 @@ ginbuild(Relation heap, Relation index, IndexInfo *indexInfo) * ginExtractEntries(), and can be reset after each tuple */ buildstate.funcCtx = AllocSetContextCreate(CurrentMemoryContext, - "Gin build temporary context for user-defined function", + "Gin build temporary context for user-defined function", ALLOCSET_DEFAULT_SIZES); buildstate.accum.ginstate = &buildstate.ginstate; diff --git a/src/backend/access/gin/ginlogic.c b/src/backend/access/gin/ginlogic.c index a940a9374a..5b8ad9a25a 100644 --- a/src/backend/access/gin/ginlogic.c +++ b/src/backend/access/gin/ginlogic.c @@ -83,9 +83,9 @@ directBoolConsistentFn(GinScanKey key) key->query, UInt32GetDatum(key->nuserentries), PointerGetDatum(key->extra_data), - PointerGetDatum(&key->recheckCurItem), + PointerGetDatum(&key->recheckCurItem), PointerGetDatum(key->queryValues), - PointerGetDatum(key->queryCategories))); + PointerGetDatum(key->queryCategories))); } /* @@ -95,15 +95,15 @@ static GinTernaryValue directTriConsistentFn(GinScanKey key) { return DatumGetGinTernaryValue(FunctionCall7Coll( - key->triConsistentFmgrInfo, + key->triConsistentFmgrInfo, key->collation, - PointerGetDatum(key->entryRes), - UInt16GetDatum(key->strategy), + PointerGetDatum(key->entryRes), + UInt16GetDatum(key->strategy), key->query, - UInt32GetDatum(key->nuserentries), - PointerGetDatum(key->extra_data), - PointerGetDatum(key->queryValues), - PointerGetDatum(key->queryCategories))); + UInt32GetDatum(key->nuserentries), + PointerGetDatum(key->extra_data), + PointerGetDatum(key->queryValues), + PointerGetDatum(key->queryCategories))); } /* @@ -117,15 +117,15 @@ shimBoolConsistentFn(GinScanKey key) GinTernaryValue result; result = DatumGetGinTernaryValue(FunctionCall7Coll( - key->triConsistentFmgrInfo, + key->triConsistentFmgrInfo, key->collation, - PointerGetDatum(key->entryRes), - UInt16GetDatum(key->strategy), + PointerGetDatum(key->entryRes), + UInt16GetDatum(key->strategy), key->query, - UInt32GetDatum(key->nuserentries), - PointerGetDatum(key->extra_data), - PointerGetDatum(key->queryValues), - PointerGetDatum(key->queryCategories))); + UInt32GetDatum(key->nuserentries), + PointerGetDatum(key->extra_data), + PointerGetDatum(key->queryValues), + PointerGetDatum(key->queryCategories))); if (result == GIN_MAYBE) { key->recheckCurItem = true; diff --git a/src/backend/access/gin/ginscan.c b/src/backend/access/gin/ginscan.c index 25758b9b5d..7ceea7a741 100644 --- a/src/backend/access/gin/ginscan.c +++ b/src/backend/access/gin/ginscan.c @@ -310,11 +310,11 @@ ginNewScanKey(IndexScanDesc scan) /* OK to call the extractQueryFn */ queryValues = (Datum *) DatumGetPointer(FunctionCall7Coll(&so->ginstate.extractQueryFn[skey->sk_attno - 1], - so->ginstate.supportCollation[skey->sk_attno - 1], + so->ginstate.supportCollation[skey->sk_attno - 1], skey->sk_argument, PointerGetDatum(&nQueryValues), - UInt16GetDatum(skey->sk_strategy), - PointerGetDatum(&partial_matches), + UInt16GetDatum(skey->sk_strategy), + PointerGetDatum(&partial_matches), PointerGetDatum(&extra_data), PointerGetDatum(&nullFlags), PointerGetDatum(&searchMode))); diff --git a/src/backend/access/gin/ginutil.c b/src/backend/access/gin/ginutil.c index d03d59da6a..91e4a8cf70 100644 --- a/src/backend/access/gin/ginutil.c +++ b/src/backend/access/gin/ginutil.c @@ -131,8 +131,8 @@ initGinState(GinState *state, Relation index) if (!OidIsValid(typentry->cmp_proc_finfo.fn_oid)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), - errmsg("could not identify a comparison function for type %s", - format_type_be(origTupdesc->attrs[i]->atttypid)))); + errmsg("could not identify a comparison function for type %s", + format_type_be(origTupdesc->attrs[i]->atttypid)))); fmgr_info_copy(&(state->compareFn[i]), &(typentry->cmp_proc_finfo), CurrentMemoryContext); @@ -153,14 +153,14 @@ initGinState(GinState *state, Relation index) if (index_getprocid(index, i + 1, GIN_TRICONSISTENT_PROC) != InvalidOid) { fmgr_info_copy(&(state->triConsistentFn[i]), - index_getprocinfo(index, i + 1, GIN_TRICONSISTENT_PROC), + index_getprocinfo(index, i + 1, GIN_TRICONSISTENT_PROC), CurrentMemoryContext); } if (index_getprocid(index, i + 1, GIN_CONSISTENT_PROC) != InvalidOid) { fmgr_info_copy(&(state->consistentFn[i]), - index_getprocinfo(index, i + 1, GIN_CONSISTENT_PROC), + index_getprocinfo(index, i + 1, GIN_CONSISTENT_PROC), CurrentMemoryContext); } @@ -178,7 +178,7 @@ initGinState(GinState *state, Relation index) if (index_getprocid(index, i + 1, GIN_COMPARE_PARTIAL_PROC) != InvalidOid) { fmgr_info_copy(&(state->comparePartialFn[i]), - index_getprocinfo(index, i + 1, GIN_COMPARE_PARTIAL_PROC), + index_getprocinfo(index, i + 1, GIN_COMPARE_PARTIAL_PROC), CurrentMemoryContext); state->canPartialMatch[i] = true; } @@ -392,7 +392,7 @@ ginCompareEntries(GinState *ginstate, OffsetNumber attnum, /* both not null, so safe to call the compareFn */ return DatumGetInt32(FunctionCall2Coll(&ginstate->compareFn[attnum - 1], - ginstate->supportCollation[attnum - 1], + ginstate->supportCollation[attnum - 1], a, b)); } @@ -499,7 +499,7 @@ ginExtractEntries(GinState *ginstate, OffsetNumber attnum, nullFlags = NULL; /* in case extractValue doesn't set it */ entries = (Datum *) DatumGetPointer(FunctionCall3Coll(&ginstate->extractValueFn[attnum - 1], - ginstate->supportCollation[attnum - 1], + ginstate->supportCollation[attnum - 1], value, PointerGetDatum(nentries), PointerGetDatum(&nullFlags))); @@ -602,7 +602,7 @@ ginoptions(Datum reloptions, bool validate) static const relopt_parse_elt tab[] = { {"fastupdate", RELOPT_TYPE_BOOL, offsetof(GinOptions, useFastUpdate)}, {"gin_pending_list_limit", RELOPT_TYPE_INT, offsetof(GinOptions, - pendingListCleanupSize)} + pendingListCleanupSize)} }; options = parseRelOptions(reloptions, validate, RELOPT_KIND_GIN, diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c index afef753ede..565525bbdf 100644 --- a/src/backend/access/gist/gist.c +++ b/src/backend/access/gist/gist.c @@ -28,7 +28,7 @@ /* non-export function prototypes */ static void gistfixsplit(GISTInsertState *state, GISTSTATE *giststate); static bool gistinserttuple(GISTInsertState *state, GISTInsertStack *stack, - GISTSTATE *giststate, IndexTuple tuple, OffsetNumber oldoffnum); + GISTSTATE *giststate, IndexTuple tuple, OffsetNumber oldoffnum); static bool gistinserttuples(GISTInsertState *state, GISTInsertStack *stack, GISTSTATE *giststate, IndexTuple *tuples, int ntup, OffsetNumber oldoffnum, @@ -1170,7 +1170,7 @@ gistfixsplit(GISTInsertState *state, GISTSTATE *giststate) */ static bool gistinserttuple(GISTInsertState *state, GISTInsertStack *stack, - GISTSTATE *giststate, IndexTuple tuple, OffsetNumber oldoffnum) + GISTSTATE *giststate, IndexTuple tuple, OffsetNumber oldoffnum) { return gistinserttuples(state, stack, giststate, &tuple, 1, oldoffnum, InvalidBuffer, InvalidBuffer, false, false); @@ -1360,9 +1360,9 @@ gistSplit(Relation r, if (len == 1) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("index row size %zu exceeds maximum %zu for index \"%s\"", - IndexTupleSize(itup[0]), GiSTPageSize, - RelationGetRelationName(r)))); + errmsg("index row size %zu exceeds maximum %zu for index \"%s\"", + IndexTupleSize(itup[0]), GiSTPageSize, + RelationGetRelationName(r)))); memset(v.spl_lisnull, TRUE, sizeof(bool) * giststate->tupdesc->natts); memset(v.spl_risnull, TRUE, sizeof(bool) * giststate->tupdesc->natts); @@ -1471,7 +1471,7 @@ initGISTstate(Relation index) /* opclasses are not required to provide a Distance method */ if (OidIsValid(index_getprocid(index, i + 1, GIST_DISTANCE_PROC))) fmgr_info_copy(&(giststate->distanceFn[i]), - index_getprocinfo(index, i + 1, GIST_DISTANCE_PROC), + index_getprocinfo(index, i + 1, GIST_DISTANCE_PROC), scanCxt); else giststate->distanceFn[i].fn_oid = InvalidOid; diff --git a/src/backend/access/gist/gistbuild.c b/src/backend/access/gist/gistbuild.c index c24643df03..4756a70ae6 100644 --- a/src/backend/access/gist/gistbuild.c +++ b/src/backend/access/gist/gistbuild.c @@ -248,7 +248,7 @@ gistValidateBufferingOption(char *value) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("invalid value for \"buffering\" option"), - errdetail("Valid values are \"on\", \"off\", and \"auto\"."))); + errdetail("Valid values are \"on\", \"off\", and \"auto\"."))); } } @@ -1083,7 +1083,7 @@ gistGetMaxLevel(Relation index) * everywhere, so we just pick the first one. */ itup = (IndexTuple) PageGetItem(page, - PageGetItemId(page, FirstOffsetNumber)); + PageGetItemId(page, FirstOffsetNumber)); blkno = ItemPointerGetBlockNumber(&(itup->t_tid)); UnlockReleaseBuffer(buffer); @@ -1143,7 +1143,7 @@ gistInitParentMap(GISTBuildState *buildstate) buildstate->parentMap = hash_create("gistbuild parent map", 1024, &hashCtl, - HASH_ELEM | HASH_BLOBS | HASH_CONTEXT); + HASH_ELEM | HASH_BLOBS | HASH_CONTEXT); } static void diff --git a/src/backend/access/gist/gistbuildbuffers.c b/src/backend/access/gist/gistbuildbuffers.c index f558729fbf..88cee2028d 100644 --- a/src/backend/access/gist/gistbuildbuffers.c +++ b/src/backend/access/gist/gistbuildbuffers.c @@ -102,7 +102,7 @@ gistInitBuildBuffers(int pagesPerBuffer, int levelStep, int maxLevel) */ gfbb->loadedBuffersLen = 32; gfbb->loadedBuffers = (GISTNodeBuffer **) palloc(gfbb->loadedBuffersLen * - sizeof(GISTNodeBuffer *)); + sizeof(GISTNodeBuffer *)); gfbb->loadedBuffersCount = 0; gfbb->rootlevel = maxLevel; diff --git a/src/backend/access/gist/gistproc.c b/src/backend/access/gist/gistproc.c index 15b89fd8ad..08990f5a1b 100644 --- a/src/backend/access/gist/gistproc.c +++ b/src/backend/access/gist/gistproc.c @@ -910,64 +910,64 @@ gist_box_leaf_consistent(BOX *key, BOX *query, StrategyNumber strategy) case RTLeftStrategyNumber: retval = DatumGetBool(DirectFunctionCall2(box_left, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTOverLeftStrategyNumber: retval = DatumGetBool(DirectFunctionCall2(box_overleft, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTOverlapStrategyNumber: retval = DatumGetBool(DirectFunctionCall2(box_overlap, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTOverRightStrategyNumber: retval = DatumGetBool(DirectFunctionCall2(box_overright, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTRightStrategyNumber: retval = DatumGetBool(DirectFunctionCall2(box_right, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTSameStrategyNumber: retval = DatumGetBool(DirectFunctionCall2(box_same, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTContainsStrategyNumber: case RTOldContainsStrategyNumber: retval = DatumGetBool(DirectFunctionCall2(box_contain, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTContainedByStrategyNumber: case RTOldContainedByStrategyNumber: retval = DatumGetBool(DirectFunctionCall2(box_contained, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTOverBelowStrategyNumber: retval = DatumGetBool(DirectFunctionCall2(box_overbelow, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTBelowStrategyNumber: retval = DatumGetBool(DirectFunctionCall2(box_below, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTAboveStrategyNumber: retval = DatumGetBool(DirectFunctionCall2(box_above, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTOverAboveStrategyNumber: retval = DatumGetBool(DirectFunctionCall2(box_overabove, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; default: elog(ERROR, "unrecognized strategy number: %d", strategy); @@ -997,60 +997,60 @@ rtree_internal_consistent(BOX *key, BOX *query, StrategyNumber strategy) case RTLeftStrategyNumber: retval = !DatumGetBool(DirectFunctionCall2(box_overright, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTOverLeftStrategyNumber: retval = !DatumGetBool(DirectFunctionCall2(box_right, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTOverlapStrategyNumber: retval = DatumGetBool(DirectFunctionCall2(box_overlap, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTOverRightStrategyNumber: retval = !DatumGetBool(DirectFunctionCall2(box_left, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTRightStrategyNumber: retval = !DatumGetBool(DirectFunctionCall2(box_overleft, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTSameStrategyNumber: case RTContainsStrategyNumber: case RTOldContainsStrategyNumber: retval = DatumGetBool(DirectFunctionCall2(box_contain, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTContainedByStrategyNumber: case RTOldContainedByStrategyNumber: retval = DatumGetBool(DirectFunctionCall2(box_overlap, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTOverBelowStrategyNumber: retval = !DatumGetBool(DirectFunctionCall2(box_above, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTBelowStrategyNumber: retval = !DatumGetBool(DirectFunctionCall2(box_overabove, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTAboveStrategyNumber: retval = !DatumGetBool(DirectFunctionCall2(box_overbelow, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; case RTOverAboveStrategyNumber: retval = !DatumGetBool(DirectFunctionCall2(box_below, PointerGetDatum(key), - PointerGetDatum(query))); + PointerGetDatum(query))); break; default: elog(ERROR, "unrecognized strategy number: %d", strategy); @@ -1419,11 +1419,11 @@ gist_point_consistent(PG_FUNCTION_ARGS) POLYGON *query = PG_GETARG_POLYGON_P(1); result = DatumGetBool(DirectFunctionCall5( - gist_poly_consistent, - PointerGetDatum(entry), - PolygonPGetDatum(query), - Int16GetDatum(RTOverlapStrategyNumber), - 0, PointerGetDatum(recheck))); + gist_poly_consistent, + PointerGetDatum(entry), + PolygonPGetDatum(query), + Int16GetDatum(RTOverlapStrategyNumber), + 0, PointerGetDatum(recheck))); if (GIST_LEAF(entry) && result) { @@ -1437,8 +1437,8 @@ gist_point_consistent(PG_FUNCTION_ARGS) && box->high.y == box->low.y); result = DatumGetBool(DirectFunctionCall2( poly_contain_pt, - PolygonPGetDatum(query), - PointPGetDatum(&box->high))); + PolygonPGetDatum(query), + PointPGetDatum(&box->high))); *recheck = false; } } @@ -1448,11 +1448,11 @@ gist_point_consistent(PG_FUNCTION_ARGS) CIRCLE *query = PG_GETARG_CIRCLE_P(1); result = DatumGetBool(DirectFunctionCall5( - gist_circle_consistent, - PointerGetDatum(entry), - CirclePGetDatum(query), - Int16GetDatum(RTOverlapStrategyNumber), - 0, PointerGetDatum(recheck))); + gist_circle_consistent, + PointerGetDatum(entry), + CirclePGetDatum(query), + Int16GetDatum(RTOverlapStrategyNumber), + 0, PointerGetDatum(recheck))); if (GIST_LEAF(entry) && result) { @@ -1465,9 +1465,9 @@ gist_point_consistent(PG_FUNCTION_ARGS) Assert(box->high.x == box->low.x && box->high.y == box->low.y); result = DatumGetBool(DirectFunctionCall2( - circle_contain_pt, - CirclePGetDatum(query), - PointPGetDatum(&box->high))); + circle_contain_pt, + CirclePGetDatum(query), + PointPGetDatum(&box->high))); *recheck = false; } } diff --git a/src/backend/access/gist/gistsplit.c b/src/backend/access/gist/gistsplit.c index cffc5ddc75..617f42c317 100644 --- a/src/backend/access/gist/gistsplit.c +++ b/src/backend/access/gist/gistsplit.c @@ -443,8 +443,8 @@ gistUserPicksplit(Relation r, GistEntryVector *entryvec, int attno, GistSplitVec */ ereport(DEBUG1, (errcode(ERRCODE_INTERNAL_ERROR), - errmsg("picksplit method for column %d of index \"%s\" failed", - attno + 1, RelationGetRelationName(r)), + errmsg("picksplit method for column %d of index \"%s\" failed", + attno + 1, RelationGetRelationName(r)), errhint("The index is not optimal. To optimize it, contact a developer, or try to use the column as the second one in the CREATE INDEX command."))); /* diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c index cbdaec9d2b..b6ccc1a66a 100644 --- a/src/backend/access/gist/gistutil.c +++ b/src/backend/access/gist/gistutil.c @@ -552,7 +552,7 @@ gistdentryinit(GISTSTATE *giststate, int nkey, GISTENTRY *e, gistentryinit(*e, k, r, pg, o, l); dep = (GISTENTRY *) DatumGetPointer(FunctionCall1Coll(&giststate->decompressFn[nkey], - giststate->supportCollation[nkey], + giststate->supportCollation[nkey], PointerGetDatum(e))); /* decompressFn may just return the given pointer */ if (dep != e) @@ -587,7 +587,7 @@ gistFormTuple(GISTSTATE *giststate, Relation r, isleaf); cep = (GISTENTRY *) DatumGetPointer(FunctionCall1Coll(&giststate->compressFn[i], - giststate->supportCollation[i], + giststate->supportCollation[i], PointerGetDatum(¢ry))); compatt[i] = cep->key; } @@ -733,9 +733,9 @@ gistcheckpage(Relation rel, Buffer buf) if (PageIsNew(page)) ereport(ERROR, (errcode(ERRCODE_INDEX_CORRUPTED), - errmsg("index \"%s\" contains unexpected zero page at block %u", - RelationGetRelationName(rel), - BufferGetBlockNumber(buf)), + errmsg("index \"%s\" contains unexpected zero page at block %u", + RelationGetRelationName(rel), + BufferGetBlockNumber(buf)), errhint("Please REINDEX it."))); /* diff --git a/src/backend/access/hash/hashinsert.c b/src/backend/access/hash/hashinsert.c index 01c8d8006c..dc08db97db 100644 --- a/src/backend/access/hash/hashinsert.c +++ b/src/backend/access/hash/hashinsert.c @@ -81,7 +81,7 @@ restart_insert: (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), errmsg("index row size %zu exceeds hash maximum %zu", itemsz, HashMaxItemSize(metapage)), - errhint("Values larger than a buffer page cannot be indexed."))); + errhint("Values larger than a buffer page cannot be indexed."))); /* Lock the primary bucket page for the target bucket. */ buf = _hash_getbucketbuf_from_hashkey(rel, hashkey, HASH_WRITE, diff --git a/src/backend/access/hash/hashovfl.c b/src/backend/access/hash/hashovfl.c index 8468efee02..c206e704d4 100644 --- a/src/backend/access/hash/hashovfl.c +++ b/src/backend/access/hash/hashovfl.c @@ -534,7 +534,7 @@ _hash_freeovflpage(Relation rel, Buffer bucketbuf, Buffer ovflbuf, prevbuf = _hash_getbuf_with_strategy(rel, prevblkno, HASH_WRITE, - LH_BUCKET_PAGE | LH_OVERFLOW_PAGE, + LH_BUCKET_PAGE | LH_OVERFLOW_PAGE, bstrategy); } if (BlockNumberIsValid(nextblkno)) @@ -972,7 +972,7 @@ readpage: XLogRegisterBuffer(2, rbuf, REGBUF_STANDARD); XLogRegisterBufData(2, (char *) deletable, - ndeletable * sizeof(OffsetNumber)); + ndeletable * sizeof(OffsetNumber)); recptr = XLogInsert(RM_HASH_ID, XLOG_HASH_MOVE_PAGE_CONTENTS); diff --git a/src/backend/access/hash/hashpage.c b/src/backend/access/hash/hashpage.c index 4544889294..1cb18a7513 100644 --- a/src/backend/access/hash/hashpage.c +++ b/src/backend/access/hash/hashpage.c @@ -923,7 +923,7 @@ restart_expand: XLogRegisterBufData(2, (char *) &metap->hashm_ovflpoint, sizeof(uint32)); XLogRegisterBufData(2, - (char *) &metap->hashm_spares[metap->hashm_ovflpoint], + (char *) &metap->hashm_spares[metap->hashm_ovflpoint], sizeof(uint32)); } diff --git a/src/backend/access/hash/hashutil.c b/src/backend/access/hash/hashutil.c index 62e37b6de5..9b803af7c2 100644 --- a/src/backend/access/hash/hashutil.c +++ b/src/backend/access/hash/hashutil.c @@ -235,9 +235,9 @@ _hash_checkpage(Relation rel, Buffer buf, int flags) if (PageIsNew(page)) ereport(ERROR, (errcode(ERRCODE_INDEX_CORRUPTED), - errmsg("index \"%s\" contains unexpected zero page at block %u", - RelationGetRelationName(rel), - BufferGetBlockNumber(buf)), + errmsg("index \"%s\" contains unexpected zero page at block %u", + RelationGetRelationName(rel), + BufferGetBlockNumber(buf)), errhint("Please REINDEX it."))); /* @@ -258,9 +258,9 @@ _hash_checkpage(Relation rel, Buffer buf, int flags) if ((opaque->hasho_flag & flags) == 0) ereport(ERROR, (errcode(ERRCODE_INDEX_CORRUPTED), - errmsg("index \"%s\" contains corrupted page at block %u", - RelationGetRelationName(rel), - BufferGetBlockNumber(buf)), + errmsg("index \"%s\" contains corrupted page at block %u", + RelationGetRelationName(rel), + BufferGetBlockNumber(buf)), errhint("Please REINDEX it."))); } diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 5357a77dc2..9766723deb 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -1426,7 +1426,7 @@ heap_beginscan_bm(Relation relation, Snapshot snapshot, HeapScanDesc heap_beginscan_sampling(Relation relation, Snapshot snapshot, int nkeys, ScanKey key, - bool allow_strat, bool allow_sync, bool allow_pagemode) + bool allow_strat, bool allow_sync, bool allow_pagemode) { return heap_beginscan_internal(relation, snapshot, nkeys, key, NULL, allow_strat, allow_sync, allow_pagemode, @@ -2244,7 +2244,7 @@ heap_get_latest_tid(Relation relation, * tuple. Check for XMIN match. */ if (TransactionIdIsValid(priorXmax) && - !TransactionIdEquals(priorXmax, HeapTupleHeaderGetXmin(tp.t_data))) + !TransactionIdEquals(priorXmax, HeapTupleHeaderGetXmin(tp.t_data))) { UnlockReleaseBuffer(buffer); break; @@ -3735,8 +3735,8 @@ l2: */ if (xmax_infomask_changed(oldtup.t_data->t_infomask, infomask) || - !TransactionIdEquals(HeapTupleHeaderGetRawXmax(oldtup.t_data), - xwait)) + !TransactionIdEquals(HeapTupleHeaderGetRawXmax(oldtup.t_data), + xwait)) goto l2; } @@ -3815,7 +3815,7 @@ l2: */ if (xmax_infomask_changed(oldtup.t_data->t_infomask, infomask) || !TransactionIdEquals(xwait, - HeapTupleHeaderGetRawXmax(oldtup.t_data))) + HeapTupleHeaderGetRawXmax(oldtup.t_data))) goto l2; /* Otherwise check if it committed or aborted */ @@ -4002,7 +4002,7 @@ l2: oldtup.t_data->t_infomask, oldtup.t_data->t_infomask2, xid, *lockmode, false, - &xmax_lock_old_tuple, &infomask_lock_old_tuple, + &xmax_lock_old_tuple, &infomask_lock_old_tuple, &infomask2_lock_old_tuple); Assert(HEAP_XMAX_IS_LOCKED_ONLY(infomask_lock_old_tuple)); @@ -4177,7 +4177,7 @@ l2: * logged. */ old_key_tuple = ExtractReplicaIdentity(relation, &oldtup, - bms_overlap(modified_attrs, id_attrs), + bms_overlap(modified_attrs, id_attrs), &old_key_copied); /* NO EREPORT(ERROR) from here till changes are logged */ @@ -4433,7 +4433,7 @@ HeapDetermineModifiedColumns(Relation relation, Bitmapset *interesting_cols, if (!heap_tuple_attr_equals(RelationGetDescr(relation), attnum, oldtup, newtup)) modified = bms_add_member(modified, - attnum - FirstLowInvalidHeapAttributeNumber); + attnum - FirstLowInvalidHeapAttributeNumber); } return modified; @@ -4829,7 +4829,7 @@ l3: /* if the xmax changed in the meantime, start over */ if (xmax_infomask_changed(tuple->t_data->t_infomask, infomask) || !TransactionIdEquals( - HeapTupleHeaderGetRawXmax(tuple->t_data), + HeapTupleHeaderGetRawXmax(tuple->t_data), xwait)) goto l3; /* otherwise, we're good */ @@ -4915,11 +4915,11 @@ l3: { case LockWaitBlock: MultiXactIdWait((MultiXactId) xwait, status, infomask, - relation, &tuple->t_self, XLTW_Lock, NULL); + relation, &tuple->t_self, XLTW_Lock, NULL); break; case LockWaitSkip: if (!ConditionalMultiXactIdWait((MultiXactId) xwait, - status, infomask, relation, + status, infomask, relation, NULL)) { result = HeapTupleWouldBlock; @@ -4930,12 +4930,12 @@ l3: break; case LockWaitError: if (!ConditionalMultiXactIdWait((MultiXactId) xwait, - status, infomask, relation, + status, infomask, relation, NULL)) ereport(ERROR, (errcode(ERRCODE_LOCK_NOT_AVAILABLE), errmsg("could not obtain lock on row in relation \"%s\"", - RelationGetRelationName(relation)))); + RelationGetRelationName(relation)))); break; } @@ -4973,7 +4973,7 @@ l3: ereport(ERROR, (errcode(ERRCODE_LOCK_NOT_AVAILABLE), errmsg("could not obtain lock on row in relation \"%s\"", - RelationGetRelationName(relation)))); + RelationGetRelationName(relation)))); break; } } @@ -5224,8 +5224,8 @@ heap_acquire_tuplock(Relation relation, ItemPointer tid, LockTupleMode mode, if (!ConditionalLockTupleTuplock(relation, tid, mode)) ereport(ERROR, (errcode(ERRCODE_LOCK_NOT_AVAILABLE), - errmsg("could not obtain lock on row in relation \"%s\"", - RelationGetRelationName(relation)))); + errmsg("could not obtain lock on row in relation \"%s\"", + RelationGetRelationName(relation)))); break; } *have_tuple_lock = true; @@ -5351,7 +5351,7 @@ l5: { if (HEAP_XMAX_IS_LOCKED_ONLY(old_infomask) || !TransactionIdDidCommit(MultiXactIdGetUpdateXid(xmax, - old_infomask))) + old_infomask))) { /* * Reset these bits and restart; otherwise fall through to @@ -5741,7 +5741,7 @@ l4: Assert(!HEAP_LOCKED_UPGRADED(mytup.t_data->t_infomask)); nmembers = GetMultiXactIdMembers(rawxmax, &members, false, - HEAP_XMAX_IS_LOCKED_ONLY(old_infomask)); + HEAP_XMAX_IS_LOCKED_ONLY(old_infomask)); for (i = 0; i < nmembers; i++) { result = test_lockmode_for_conflict(members[i].status, @@ -7236,7 +7236,7 @@ heap_tuple_needs_freeze(HeapTupleHeader tuple, TransactionId cutoff_xid, /* need to check whether any member of the mxact is too old */ nmembers = GetMultiXactIdMembers(multi, &members, false, - HEAP_XMAX_IS_LOCKED_ONLY(tuple->t_infomask)); + HEAP_XMAX_IS_LOCKED_ONLY(tuple->t_infomask)); for (i = 0; i < nmembers; i++) { @@ -7639,7 +7639,7 @@ log_heap_update(Relation reln, Buffer oldbuf, { XLogRegisterBufData(0, ((char *) newtup->t_data) + SizeofHeapTupleHeader, - newtup->t_len - SizeofHeapTupleHeader - suffixlen); + newtup->t_len - SizeofHeapTupleHeader - suffixlen); } else { @@ -7651,14 +7651,14 @@ log_heap_update(Relation reln, Buffer oldbuf, if (newtup->t_data->t_hoff - SizeofHeapTupleHeader > 0) { XLogRegisterBufData(0, - ((char *) newtup->t_data) + SizeofHeapTupleHeader, - newtup->t_data->t_hoff - SizeofHeapTupleHeader); + ((char *) newtup->t_data) + SizeofHeapTupleHeader, + newtup->t_data->t_hoff - SizeofHeapTupleHeader); } /* data after common prefix */ XLogRegisterBufData(0, - ((char *) newtup->t_data) + newtup->t_data->t_hoff + prefixlen, - newtup->t_len - newtup->t_data->t_hoff - prefixlen - suffixlen); + ((char *) newtup->t_data) + newtup->t_data->t_hoff + prefixlen, + newtup->t_len - newtup->t_data->t_hoff - prefixlen - suffixlen); } /* We need to log a tuple identity */ diff --git a/src/backend/access/heap/pruneheap.c b/src/backend/access/heap/pruneheap.c index 5b7c57d568..52231ac417 100644 --- a/src/backend/access/heap/pruneheap.c +++ b/src/backend/access/heap/pruneheap.c @@ -407,7 +407,7 @@ heap_prune_chain(Relation relation, Buffer buffer, OffsetNumber rootoffnum, { heap_prune_record_unused(prstate, rootoffnum); HeapTupleHeaderAdvanceLatestRemovedXid(htup, - &prstate->latestRemovedXid); + &prstate->latestRemovedXid); ndeleted++; } @@ -540,7 +540,7 @@ heap_prune_chain(Relation relation, Buffer buffer, OffsetNumber rootoffnum, { latestdead = offnum; HeapTupleHeaderAdvanceLatestRemovedXid(htup, - &prstate->latestRemovedXid); + &prstate->latestRemovedXid); } else if (!recent_dead) break; diff --git a/src/backend/access/heap/tuptoaster.c b/src/backend/access/heap/tuptoaster.c index fa5e78a067..458180bc95 100644 --- a/src/backend/access/heap/tuptoaster.c +++ b/src/backend/access/heap/tuptoaster.c @@ -1628,7 +1628,7 @@ toast_save_datum(Relation rel, Datum value, { toast_pointer.va_valueid = GetNewOidWithIndex(toastrel, - RelationGetRelid(toastidxs[validIndex]), + RelationGetRelid(toastidxs[validIndex]), (AttrNumber) 1); } while (toastid_valueid_exists(rel->rd_toastoid, toast_pointer.va_valueid)); @@ -2168,7 +2168,7 @@ toast_fetch_datum_slice(struct varlena *attr, int32 sliceoffset, int32 length) init_toast_snapshot(&SnapshotToast); nextidx = startchunk; toastscan = systable_beginscan_ordered(toastrel, toastidxs[validIndex], - &SnapshotToast, nscankeys, toastkey); + &SnapshotToast, nscankeys, toastkey); while ((ttup = systable_getnext_ordered(toastscan, ForwardScanDirection)) != NULL) { /* diff --git a/src/backend/access/heap/visibilitymap.c b/src/backend/access/heap/visibilitymap.c index e5616ce051..4c2a13aeba 100644 --- a/src/backend/access/heap/visibilitymap.c +++ b/src/backend/access/heap/visibilitymap.c @@ -592,7 +592,7 @@ vm_readbuf(Relation rel, BlockNumber blkno, bool extend) { if (smgrexists(rel->rd_smgr, VISIBILITYMAP_FORKNUM)) rel->rd_smgr->smgr_vm_nblocks = smgrnblocks(rel->rd_smgr, - VISIBILITYMAP_FORKNUM); + VISIBILITYMAP_FORKNUM); else rel->rd_smgr->smgr_vm_nblocks = 0; } diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c index cacd74a978..bef4255369 100644 --- a/src/backend/access/index/indexam.c +++ b/src/backend/access/index/indexam.c @@ -431,7 +431,7 @@ index_parallelscan_estimate(Relation indexRelation, Snapshot snapshot) */ if (indexRelation->rd_amroutine->amestimateparallelscan != NULL) nbytes = add_size(nbytes, - indexRelation->rd_amroutine->amestimateparallelscan()); + indexRelation->rd_amroutine->amestimateparallelscan()); return nbytes; } @@ -751,7 +751,7 @@ index_bulk_delete(IndexVacuumInfo *info, CHECK_REL_PROCEDURE(ambulkdelete); return indexRelation->rd_amroutine->ambulkdelete(info, stats, - callback, callback_state); + callback, callback_state); } /* ---------------- diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c index df8f44ae80..4aca7e4db8 100644 --- a/src/backend/access/nbtree/nbtinsert.c +++ b/src/backend/access/nbtree/nbtinsert.c @@ -428,10 +428,10 @@ _bt_check_unique(Relation rel, IndexTuple itup, Relation heapRel, (errcode(ERRCODE_UNIQUE_VIOLATION), errmsg("duplicate key value violates unique constraint \"%s\"", RelationGetRelationName(rel)), - key_desc ? errdetail("Key %s already exists.", - key_desc) : 0, + key_desc ? errdetail("Key %s already exists.", + key_desc) : 0, errtableconstraint(heapRel, - RelationGetRelationName(rel)))); + RelationGetRelationName(rel)))); } } else if (all_dead) @@ -497,7 +497,7 @@ _bt_check_unique(Relation rel, IndexTuple itup, Relation heapRel, (errcode(ERRCODE_INTERNAL_ERROR), errmsg("failed to re-find tuple within index \"%s\"", RelationGetRelationName(rel)), - errhint("This may be because of a non-immutable index expression."), + errhint("This may be because of a non-immutable index expression."), errtableconstraint(heapRel, RelationGetRelationName(rel)))); @@ -574,12 +574,12 @@ _bt_findinsertloc(Relation rel, if (itemsz > BTMaxItemSize(page)) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("index row size %zu exceeds maximum %zu for index \"%s\"", - itemsz, BTMaxItemSize(page), - RelationGetRelationName(rel)), - errhint("Values larger than 1/3 of a buffer page cannot be indexed.\n" - "Consider a function index of an MD5 hash of the value, " - "or use full text indexing."), + errmsg("index row size %zu exceeds maximum %zu for index \"%s\"", + itemsz, BTMaxItemSize(page), + RelationGetRelationName(rel)), + errhint("Values larger than 1/3 of a buffer page cannot be indexed.\n" + "Consider a function index of an MD5 hash of the value, " + "or use full text indexing."), errtableconstraint(heapRel, RelationGetRelationName(rel)))); @@ -1194,7 +1194,7 @@ _bt_split(Relation rel, Buffer buf, Buffer cbuf, OffsetNumber firstright, { memset(rightpage, 0, BufferGetPageSize(rbuf)); elog(ERROR, "right sibling's left-link doesn't match: " - "block %u links to %u instead of expected %u in index \"%s\"", + "block %u links to %u instead of expected %u in index \"%s\"", oopaque->btpo_next, sopaque->btpo_prev, origpagenumber, RelationGetRelationName(rel)); } @@ -1327,7 +1327,7 @@ _bt_split(Relation rel, Buffer buf, Buffer cbuf, OffsetNumber firstright, * _bt_restore_page(). */ XLogRegisterBufData(1, - (char *) rightpage + ((PageHeader) rightpage)->pd_upper, + (char *) rightpage + ((PageHeader) rightpage)->pd_upper, ((PageHeader) rightpage)->pd_special - ((PageHeader) rightpage)->pd_upper); if (isroot) @@ -2052,7 +2052,7 @@ _bt_newroot(Relation rel, Buffer lbuf, Buffer rbuf) * some new func in page API. */ XLogRegisterBufData(0, - (char *) rootpage + ((PageHeader) rootpage)->pd_upper, + (char *) rootpage + ((PageHeader) rootpage)->pd_upper, ((PageHeader) rootpage)->pd_special - ((PageHeader) rootpage)->pd_upper); diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c index f815fd40b2..5c817b6510 100644 --- a/src/backend/access/nbtree/nbtpage.c +++ b/src/backend/access/nbtree/nbtpage.c @@ -513,9 +513,9 @@ _bt_checkpage(Relation rel, Buffer buf) if (PageIsNew(page)) ereport(ERROR, (errcode(ERRCODE_INDEX_CORRUPTED), - errmsg("index \"%s\" contains unexpected zero page at block %u", - RelationGetRelationName(rel), - BufferGetBlockNumber(buf)), + errmsg("index \"%s\" contains unexpected zero page at block %u", + RelationGetRelationName(rel), + BufferGetBlockNumber(buf)), errhint("Please REINDEX it."))); /* @@ -1067,7 +1067,7 @@ _bt_lock_branch_parent(Relation rel, BlockNumber child, BTStack stack, } return _bt_lock_branch_parent(rel, parent, stack->bts_parent, - topparent, topoff, target, rightsib); + topparent, topoff, target, rightsib); } else { @@ -1150,8 +1150,8 @@ _bt_pagedel(Relation rel, Buffer buf) if (P_ISHALFDEAD(opaque)) ereport(LOG, (errcode(ERRCODE_INDEX_CORRUPTED), - errmsg("index \"%s\" contains a half-dead internal page", - RelationGetRelationName(rel)), + errmsg("index \"%s\" contains a half-dead internal page", + RelationGetRelationName(rel)), errhint("This can be caused by an interrupted VACUUM in version 9.3 or older, before upgrade. Please REINDEX it."))); _bt_relbuf(rel, buf); return ndeleted; diff --git a/src/backend/access/nbtree/nbtsearch.c b/src/backend/access/nbtree/nbtsearch.c index 2de1625a12..642c8943e7 100644 --- a/src/backend/access/nbtree/nbtsearch.c +++ b/src/backend/access/nbtree/nbtsearch.c @@ -681,11 +681,11 @@ _bt_first(IndexScanDesc scan, ScanDirection dir) ScanKeyEntryInitialize(chosen, (SK_SEARCHNOTNULL | SK_ISNULL | (impliesNN->sk_flags & - (SK_BT_DESC | SK_BT_NULLS_FIRST))), + (SK_BT_DESC | SK_BT_NULLS_FIRST))), curattr, - ((impliesNN->sk_flags & SK_BT_NULLS_FIRST) ? - BTGreaterStrategyNumber : - BTLessStrategyNumber), + ((impliesNN->sk_flags & SK_BT_NULLS_FIRST) ? + BTGreaterStrategyNumber : + BTLessStrategyNumber), InvalidOid, InvalidOid, InvalidOid, diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c index 168756cc78..bf6c03c7b2 100644 --- a/src/backend/access/nbtree/nbtsort.c +++ b/src/backend/access/nbtree/nbtsort.c @@ -345,7 +345,7 @@ _bt_pagestate(BTWriteState *wstate, uint32 level) state->btps_full = (BLCKSZ * (100 - BTREE_NONLEAF_FILLFACTOR) / 100); else state->btps_full = RelationGetTargetPageFreeSpace(wstate->index, - BTREE_DEFAULT_FILLFACTOR); + BTREE_DEFAULT_FILLFACTOR); /* no parent level, yet */ state->btps_next = NULL; @@ -485,12 +485,12 @@ _bt_buildadd(BTWriteState *wstate, BTPageState *state, IndexTuple itup) if (itupsz > BTMaxItemSize(npage)) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("index row size %zu exceeds maximum %zu for index \"%s\"", - itupsz, BTMaxItemSize(npage), - RelationGetRelationName(wstate->index)), - errhint("Values larger than 1/3 of a buffer page cannot be indexed.\n" - "Consider a function index of an MD5 hash of the value, " - "or use full text indexing."), + errmsg("index row size %zu exceeds maximum %zu for index \"%s\"", + itupsz, BTMaxItemSize(npage), + RelationGetRelationName(wstate->index)), + errhint("Values larger than 1/3 of a buffer page cannot be indexed.\n" + "Consider a function index of an MD5 hash of the value, " + "or use full text indexing."), errtableconstraint(wstate->heap, RelationGetRelationName(wstate->index)))); diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c index 5b259a31d9..dbfb775dec 100644 --- a/src/backend/access/nbtree/nbtutils.c +++ b/src/backend/access/nbtree/nbtutils.c @@ -336,7 +336,7 @@ _bt_preprocess_array_keys(IndexScanDesc scan) * successive primitive indexscans produce data in index order. */ num_elems = _bt_sort_array_elements(scan, cur, - (indoption[cur->sk_attno - 1] & INDOPTION_DESC) != 0, + (indoption[cur->sk_attno - 1] & INDOPTION_DESC) != 0, elem_values, num_nonnulls); /* @@ -1163,7 +1163,7 @@ _bt_compare_scankey_args(IndexScanDesc scan, ScanKey op, *result = DatumGetBool(OidFunctionCall2Coll(cmp_proc, op->sk_collation, leftarg->sk_argument, - rightarg->sk_argument)); + rightarg->sk_argument)); return true; } } diff --git a/src/backend/access/rmgrdesc/brindesc.c b/src/backend/access/rmgrdesc/brindesc.c index 637ebf30f8..8eb5275a8b 100644 --- a/src/backend/access/rmgrdesc/brindesc.c +++ b/src/backend/access/rmgrdesc/brindesc.c @@ -66,7 +66,7 @@ brin_desc(StringInfo buf, XLogReaderState *record) xl_brin_desummarize *xlrec = (xl_brin_desummarize *) rec; appendStringInfo(buf, "pagesPerRange %u, heapBlk %u, page offset %u", - xlrec->pagesPerRange, xlrec->heapBlk, xlrec->regOffset); + xlrec->pagesPerRange, xlrec->heapBlk, xlrec->regOffset); } } diff --git a/src/backend/access/rmgrdesc/gindesc.c b/src/backend/access/rmgrdesc/gindesc.c index df51f3ce1f..02c887496e 100644 --- a/src/backend/access/rmgrdesc/gindesc.c +++ b/src/backend/access/rmgrdesc/gindesc.c @@ -89,8 +89,8 @@ gin_desc(StringInfo buf, XLogReaderState *record) ginxlogInsert *xlrec = (ginxlogInsert *) rec; appendStringInfo(buf, "isdata: %c isleaf: %c", - (xlrec->flags & GIN_INSERT_ISDATA) ? 'T' : 'F', - (xlrec->flags & GIN_INSERT_ISLEAF) ? 'T' : 'F'); + (xlrec->flags & GIN_INSERT_ISDATA) ? 'T' : 'F', + (xlrec->flags & GIN_INSERT_ISLEAF) ? 'T' : 'F'); if (!(xlrec->flags & GIN_INSERT_ISLEAF)) { char *payload = rec + sizeof(ginxlogInsert); @@ -126,9 +126,9 @@ gin_desc(StringInfo buf, XLogReaderState *record) (ginxlogInsertDataInternal *) payload; appendStringInfo(buf, " pitem: %u-%u/%u", - PostingItemGetBlockNumber(&insertData->newitem), - ItemPointerGetBlockNumber(&insertData->newitem.key), - ItemPointerGetOffsetNumber(&insertData->newitem.key)); + PostingItemGetBlockNumber(&insertData->newitem), + ItemPointerGetBlockNumber(&insertData->newitem.key), + ItemPointerGetOffsetNumber(&insertData->newitem.key)); } } } @@ -138,10 +138,10 @@ gin_desc(StringInfo buf, XLogReaderState *record) ginxlogSplit *xlrec = (ginxlogSplit *) rec; appendStringInfo(buf, "isrootsplit: %c", - (((ginxlogSplit *) rec)->flags & GIN_SPLIT_ROOT) ? 'T' : 'F'); + (((ginxlogSplit *) rec)->flags & GIN_SPLIT_ROOT) ? 'T' : 'F'); appendStringInfo(buf, " isdata: %c isleaf: %c", - (xlrec->flags & GIN_INSERT_ISDATA) ? 'T' : 'F', - (xlrec->flags & GIN_INSERT_ISLEAF) ? 'T' : 'F'); + (xlrec->flags & GIN_INSERT_ISDATA) ? 'T' : 'F', + (xlrec->flags & GIN_INSERT_ISLEAF) ? 'T' : 'F'); } break; case XLOG_GIN_VACUUM_PAGE: diff --git a/src/backend/access/rmgrdesc/hashdesc.c b/src/backend/access/rmgrdesc/hashdesc.c index 35d86dc893..3e9236122b 100644 --- a/src/backend/access/rmgrdesc/hashdesc.c +++ b/src/backend/access/rmgrdesc/hashdesc.c @@ -51,7 +51,7 @@ hash_desc(StringInfo buf, XLogReaderState *record) xl_hash_add_ovfl_page *xlrec = (xl_hash_add_ovfl_page *) rec; appendStringInfo(buf, "bmsize %d, bmpage_found %c", - xlrec->bmsize, (xlrec->bmpage_found) ? 'T' : 'F'); + xlrec->bmsize, (xlrec->bmpage_found) ? 'T' : 'F'); break; } case XLOG_HASH_SPLIT_ALLOCATE_PAGE: @@ -60,7 +60,7 @@ hash_desc(StringInfo buf, XLogReaderState *record) appendStringInfo(buf, "new_bucket %u, meta_page_masks_updated %c, issplitpoint_changed %c", xlrec->new_bucket, - (xlrec->flags & XLH_SPLIT_META_UPDATE_MASKS) ? 'T' : 'F', + (xlrec->flags & XLH_SPLIT_META_UPDATE_MASKS) ? 'T' : 'F', (xlrec->flags & XLH_SPLIT_META_UPDATE_SPLITPOINT) ? 'T' : 'F'); break; } @@ -69,7 +69,7 @@ hash_desc(StringInfo buf, XLogReaderState *record) xl_hash_split_complete *xlrec = (xl_hash_split_complete *) rec; appendStringInfo(buf, "old_bucket_flag %u, new_bucket_flag %u", - xlrec->old_bucket_flag, xlrec->new_bucket_flag); + xlrec->old_bucket_flag, xlrec->new_bucket_flag); break; } case XLOG_HASH_MOVE_PAGE_CONTENTS: diff --git a/src/backend/access/rmgrdesc/logicalmsgdesc.c b/src/backend/access/rmgrdesc/logicalmsgdesc.c index 8287751e48..0b971c2aee 100644 --- a/src/backend/access/rmgrdesc/logicalmsgdesc.c +++ b/src/backend/access/rmgrdesc/logicalmsgdesc.c @@ -26,7 +26,7 @@ logicalmsg_desc(StringInfo buf, XLogReaderState *record) xl_logical_message *xlrec = (xl_logical_message *) rec; appendStringInfo(buf, "%s message size %zu bytes", - xlrec->transactional ? "transactional" : "nontransactional", + xlrec->transactional ? "transactional" : "nontransactional", xlrec->message_size); } } diff --git a/src/backend/access/rmgrdesc/nbtdesc.c b/src/backend/access/rmgrdesc/nbtdesc.c index fbde9d6555..ad6bba6130 100644 --- a/src/backend/access/rmgrdesc/nbtdesc.c +++ b/src/backend/access/rmgrdesc/nbtdesc.c @@ -93,7 +93,7 @@ btree_desc(StringInfo buf, XLogReaderState *record) appendStringInfo(buf, "rel %u/%u/%u; latestRemovedXid %u", xlrec->node.spcNode, xlrec->node.dbNode, - xlrec->node.relNode, xlrec->latestRemovedXid); + xlrec->node.relNode, xlrec->latestRemovedXid); break; } } diff --git a/src/backend/access/rmgrdesc/spgdesc.c b/src/backend/access/rmgrdesc/spgdesc.c index 24d6cb58fd..41ed84b168 100644 --- a/src/backend/access/rmgrdesc/spgdesc.c +++ b/src/backend/access/rmgrdesc/spgdesc.c @@ -76,7 +76,7 @@ spg_desc(StringInfo buf, XLogReaderState *record) break; case XLOG_SPGIST_VACUUM_REDIRECT: appendStringInfo(buf, "newest XID %u", - ((spgxlogVacuumRedirect *) rec)->newestRedirectXid); + ((spgxlogVacuumRedirect *) rec)->newestRedirectXid); break; } } diff --git a/src/backend/access/rmgrdesc/xactdesc.c b/src/backend/access/rmgrdesc/xactdesc.c index 735f8c598f..3aafa79e52 100644 --- a/src/backend/access/rmgrdesc/xactdesc.c +++ b/src/backend/access/rmgrdesc/xactdesc.c @@ -205,8 +205,8 @@ xact_desc_commit(StringInfo buf, uint8 info, xl_xact_commit *xlrec, RepOriginId if (parsed.nmsgs > 0) { standby_desc_invalidations( - buf, parsed.nmsgs, parsed.msgs, parsed.dbId, parsed.tsId, - XactCompletionRelcacheInitFileInval(parsed.xinfo)); + buf, parsed.nmsgs, parsed.msgs, parsed.dbId, parsed.tsId, + XactCompletionRelcacheInitFileInval(parsed.xinfo)); } if (XactCompletionForceSyncCommit(parsed.xinfo)) diff --git a/src/backend/access/rmgrdesc/xlogdesc.c b/src/backend/access/rmgrdesc/xlogdesc.c index 2bf6de3332..f72f076017 100644 --- a/src/backend/access/rmgrdesc/xlogdesc.c +++ b/src/backend/access/rmgrdesc/xlogdesc.c @@ -48,7 +48,7 @@ xlog_desc(StringInfo buf, XLogReaderState *record) "oldest xid %u in DB %u; oldest multi %u in DB %u; " "oldest/newest commit timestamp xid: %u/%u; " "oldest running xid %u; %s", - (uint32) (checkpoint->redo >> 32), (uint32) checkpoint->redo, + (uint32) (checkpoint->redo >> 32), (uint32) checkpoint->redo, checkpoint->ThisTimeLineID, checkpoint->PrevTimeLineID, checkpoint->fullPageWrites ? "true" : "false", @@ -63,7 +63,7 @@ xlog_desc(StringInfo buf, XLogReaderState *record) checkpoint->oldestCommitTsXid, checkpoint->newestCommitTsXid, checkpoint->oldestActiveXid, - (info == XLOG_CHECKPOINT_SHUTDOWN) ? "shutdown" : "online"); + (info == XLOG_CHECKPOINT_SHUTDOWN) ? "shutdown" : "online"); } else if (info == XLOG_NEXTOID) { diff --git a/src/backend/access/spgist/spgdoinsert.c b/src/backend/access/spgist/spgdoinsert.c index 8c420633f4..b0702a7f92 100644 --- a/src/backend/access/spgist/spgdoinsert.c +++ b/src/backend/access/spgist/spgdoinsert.c @@ -189,7 +189,7 @@ saveNodeLink(Relation index, SPPageDesc *parent, SpGistInnerTuple innerTuple; innerTuple = (SpGistInnerTuple) PageGetItem(parent->page, - PageGetItemId(parent->page, parent->offnum)); + PageGetItemId(parent->page, parent->offnum)); spgUpdateNodeLink(innerTuple, parent->node, blkno, offnum); @@ -201,7 +201,7 @@ saveNodeLink(Relation index, SPPageDesc *parent, */ static void addLeafTuple(Relation index, SpGistState *state, SpGistLeafTuple leafTuple, - SPPageDesc *current, SPPageDesc *parent, bool isNulls, bool isNew) + SPPageDesc *current, SPPageDesc *parent, bool isNulls, bool isNew) { spgxlogAddLeaf xlrec; @@ -222,7 +222,7 @@ addLeafTuple(Relation index, SpGistState *state, SpGistLeafTuple leafTuple, /* Tuple is not part of a chain */ leafTuple->nextOffset = InvalidOffsetNumber; current->offnum = SpGistPageAddNewItem(state, current->page, - (Item) leafTuple, leafTuple->size, + (Item) leafTuple, leafTuple->size, NULL, false); xlrec.offnumLeaf = current->offnum; @@ -250,7 +250,7 @@ addLeafTuple(Relation index, SpGistState *state, SpGistLeafTuple leafTuple, OffsetNumber offnum; head = (SpGistLeafTuple) PageGetItem(current->page, - PageGetItemId(current->page, current->offnum)); + PageGetItemId(current->page, current->offnum)); if (head->tupstate == SPGIST_LIVE) { leafTuple->nextOffset = head->nextOffset; @@ -263,7 +263,7 @@ addLeafTuple(Relation index, SpGistState *state, SpGistLeafTuple leafTuple, * and set new second element */ head = (SpGistLeafTuple) PageGetItem(current->page, - PageGetItemId(current->page, current->offnum)); + PageGetItemId(current->page, current->offnum)); head->nextOffset = offnum; xlrec.offnumLeaf = offnum; @@ -467,7 +467,7 @@ moveLeafs(Relation index, SpGistState *state, for (i = 0; i < nDelete; i++) { it = (SpGistLeafTuple) PageGetItem(current->page, - PageGetItemId(current->page, toDelete[i])); + PageGetItemId(current->page, toDelete[i])); Assert(it->tupstate == SPGIST_LIVE); /* @@ -505,7 +505,7 @@ moveLeafs(Relation index, SpGistState *state, * be any concurrent scan so we need not provide a redirect. */ spgPageIndexMultiDelete(state, current->page, toDelete, nDelete, - state->isBuild ? SPGIST_PLACEHOLDER : SPGIST_REDIRECT, + state->isBuild ? SPGIST_PLACEHOLDER : SPGIST_REDIRECT, SPGIST_PLACEHOLDER, nblkno, r); @@ -570,7 +570,7 @@ setRedirectionTuple(SPPageDesc *current, OffsetNumber position, SpGistDeadTuple dt; dt = (SpGistDeadTuple) PageGetItem(current->page, - PageGetItemId(current->page, position)); + PageGetItemId(current->page, position)); Assert(dt->tupstate == SPGIST_REDIRECT); Assert(ItemPointerGetBlockNumber(&dt->pointer) == SPGIST_METAPAGE_BLKNO); ItemPointerSet(&dt->pointer, blkno, offnum); @@ -754,7 +754,7 @@ doPickSplit(Relation index, SpGistState *state, SpGistLeafTuple it; it = (SpGistLeafTuple) PageGetItem(current->page, - PageGetItemId(current->page, i)); + PageGetItemId(current->page, i)); if (it->tupstate == SPGIST_LIVE) { in.datums[nToInsert] = SGLTDATUM(it, state); @@ -779,7 +779,7 @@ doPickSplit(Relation index, SpGistState *state, Assert(i >= FirstOffsetNumber && i <= max); it = (SpGistLeafTuple) PageGetItem(current->page, - PageGetItemId(current->page, i)); + PageGetItemId(current->page, i)); if (it->tupstate == SPGIST_LIVE) { in.datums[nToInsert] = SGLTDATUM(it, state); @@ -957,9 +957,9 @@ doPickSplit(Relation index, SpGistState *state, { /* Send tuple to page with next triple parity (see README) */ newInnerBuffer = SpGistGetBuffer(index, - GBUF_INNER_PARITY(parent->blkno + 1) | + GBUF_INNER_PARITY(parent->blkno + 1) | (isNulls ? GBUF_NULLS : 0), - innerTuple->size + sizeof(ItemIdData), + innerTuple->size + sizeof(ItemIdData), &xlrec.initInner); } else @@ -1025,7 +1025,7 @@ doPickSplit(Relation index, SpGistState *state, int newspace; newLeafBuffer = SpGistGetBuffer(index, - GBUF_LEAF | (isNulls ? GBUF_NULLS : 0), + GBUF_LEAF | (isNulls ? GBUF_NULLS : 0), Min(totalLeafSizes, SPGIST_PAGE_CAPACITY), &xlrec.initDest); @@ -1576,7 +1576,7 @@ spgAddNodeAction(Relation index, SpGistState *state, */ current->buffer = SpGistGetBuffer(index, GBUF_INNER_PARITY(current->blkno), - newInnerTuple->size + sizeof(ItemIdData), + newInnerTuple->size + sizeof(ItemIdData), &xlrec.newPage); current->blkno = BufferGetBlockNumber(current->buffer); current->page = BufferGetPage(current->buffer); @@ -1758,7 +1758,7 @@ spgSplitNodeAction(Relation index, SpGistState *state, postfixTuple = spgFormInnerTuple(state, out->result.splitTuple.postfixHasPrefix, - out->result.splitTuple.postfixPrefixDatum, + out->result.splitTuple.postfixPrefixDatum, innerTuple->nNodes, nodes); /* Postfix tuple is allTheSame if original tuple was */ @@ -1834,7 +1834,7 @@ spgSplitNodeAction(Relation index, SpGistState *state, spgUpdateNodeLink(prefixTuple, out->result.splitTuple.childNodeN, postfixBlkno, postfixOffset); prefixTuple = (SpGistInnerTuple) PageGetItem(current->page, - PageGetItemId(current->page, current->offnum)); + PageGetItemId(current->page, current->offnum)); spgUpdateNodeLink(prefixTuple, out->result.splitTuple.childNodeN, postfixBlkno, postfixOffset); @@ -1930,11 +1930,11 @@ spgdoinsert(Relation index, SpGistState *state, if (leafSize > SPGIST_PAGE_CAPACITY && !state->config.longValuesOK) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("index row size %zu exceeds maximum %zu for index \"%s\"", - leafSize - sizeof(ItemIdData), - SPGIST_PAGE_CAPACITY - sizeof(ItemIdData), - RelationGetRelationName(index)), - errhint("Values larger than a buffer page cannot be indexed."))); + errmsg("index row size %zu exceeds maximum %zu for index \"%s\"", + leafSize - sizeof(ItemIdData), + SPGIST_PAGE_CAPACITY - sizeof(ItemIdData), + RelationGetRelationName(index)), + errhint("Values larger than a buffer page cannot be indexed."))); /* Initialize "current" to the appropriate root page */ current.blkno = isnull ? SPGIST_NULL_BLKNO : SPGIST_ROOT_BLKNO; @@ -2035,7 +2035,7 @@ spgdoinsert(Relation index, SpGistState *state, } else if ((sizeToSplit = checkSplitConditions(index, state, ¤t, - &nToSplit)) < SPGIST_PAGE_CAPACITY / 2 && + &nToSplit)) < SPGIST_PAGE_CAPACITY / 2 && nToSplit < 64 && leafTuple->size + sizeof(ItemIdData) + sizeToSplit <= SPGIST_PAGE_CAPACITY) { @@ -2084,7 +2084,7 @@ spgdoinsert(Relation index, SpGistState *state, CHECK_FOR_INTERRUPTS(); innerTuple = (SpGistInnerTuple) PageGetItem(current.page, - PageGetItemId(current.page, current.offnum)); + PageGetItemId(current.page, current.offnum)); in.datum = datum; in.leafDatum = leafDatum; diff --git a/src/backend/access/spgist/spginsert.c b/src/backend/access/spgist/spginsert.c index 9a37259916..e4b2c29b0e 100644 --- a/src/backend/access/spgist/spginsert.c +++ b/src/backend/access/spgist/spginsert.c @@ -134,7 +134,7 @@ spgbuild(Relation heap, Relation index, IndexInfo *indexInfo) buildstate.spgstate.isBuild = true; buildstate.tmpCtx = AllocSetContextCreate(CurrentMemoryContext, - "SP-GiST build temporary context", + "SP-GiST build temporary context", ALLOCSET_DEFAULT_SIZES); reltuples = IndexBuildHeapScan(heap, index, indexInfo, true, diff --git a/src/backend/access/spgist/spgquadtreeproc.c b/src/backend/access/spgist/spgquadtreeproc.c index 6ad73f448d..773774555f 100644 --- a/src/backend/access/spgist/spgquadtreeproc.c +++ b/src/backend/access/spgist/spgquadtreeproc.c @@ -253,8 +253,8 @@ spg_quad_inner_consistent(PG_FUNCTION_ARGS) boxQuery = DatumGetBoxP(in->scankeys[i].sk_argument); if (DatumGetBool(DirectFunctionCall2(box_contain_pt, - PointerGetDatum(boxQuery), - PointerGetDatum(centroid)))) + PointerGetDatum(boxQuery), + PointerGetDatum(centroid)))) { /* centroid is in box, so all quadrants are OK */ } diff --git a/src/backend/access/spgist/spgscan.c b/src/backend/access/spgist/spgscan.c index e1f9d87278..7965b5846d 100644 --- a/src/backend/access/spgist/spgscan.c +++ b/src/backend/access/spgist/spgscan.c @@ -442,7 +442,7 @@ redirect: MemoryContext oldCtx; innerTuple = (SpGistInnerTuple) PageGetItem(page, - PageGetItemId(page, offset)); + PageGetItemId(page, offset)); if (innerTuple->tupstate != SPGIST_LIVE) { diff --git a/src/backend/access/spgist/spgutils.c b/src/backend/access/spgist/spgutils.c index e57ac49c6b..8656af453c 100644 --- a/src/backend/access/spgist/spgutils.c +++ b/src/backend/access/spgist/spgutils.c @@ -705,7 +705,7 @@ spgFormInnerTuple(SpGistState *state, bool hasPrefix, Datum prefix, errmsg("SP-GiST inner tuple size %zu exceeds maximum %zu", (Size) size, SPGIST_PAGE_CAPACITY - sizeof(ItemIdData)), - errhint("Values larger than a buffer page cannot be indexed."))); + errhint("Values larger than a buffer page cannot be indexed."))); /* * Check for overflow of header fields --- probably can't fail if the @@ -848,7 +848,7 @@ SpGistPageAddNewItem(SpGistState *state, Page page, Item item, Size size, for (; i <= maxoff; i++) { SpGistDeadTuple it = (SpGistDeadTuple) PageGetItem(page, - PageGetItemId(page, i)); + PageGetItemId(page, i)); if (it->tupstate == SPGIST_PLACEHOLDER) { diff --git a/src/backend/access/spgist/spgvacuum.c b/src/backend/access/spgist/spgvacuum.c index 508d3e083f..d7d5e90ef3 100644 --- a/src/backend/access/spgist/spgvacuum.c +++ b/src/backend/access/spgist/spgvacuum.c @@ -750,7 +750,7 @@ spgprocesspending(spgBulkDeleteState *bds) offset = ItemPointerGetOffsetNumber(&nitem->tid); innerTuple = (SpGistInnerTuple) PageGetItem(page, - PageGetItemId(page, offset)); + PageGetItemId(page, offset)); if (innerTuple->tupstate == SPGIST_LIVE) { SpGistNodeTuple node; @@ -766,7 +766,7 @@ spgprocesspending(spgBulkDeleteState *bds) { /* transfer attention to redirect point */ spgAddPendingTID(bds, - &((SpGistDeadTuple) innerTuple)->pointer); + &((SpGistDeadTuple) innerTuple)->pointer); } else elog(ERROR, "unexpected SPGiST tuple state: %d", diff --git a/src/backend/access/spgist/spgxlog.c b/src/backend/access/spgist/spgxlog.c index c007601efd..c440d21715 100644 --- a/src/backend/access/spgist/spgxlog.c +++ b/src/backend/access/spgist/spgxlog.c @@ -54,7 +54,7 @@ addOrReplaceTuple(Page page, Item tuple, int size, OffsetNumber offset) if (offset <= PageGetMaxOffsetNumber(page)) { SpGistDeadTuple dt = (SpGistDeadTuple) PageGetItem(page, - PageGetItemId(page, offset)); + PageGetItemId(page, offset)); if (dt->tupstate != SPGIST_PLACEHOLDER) elog(ERROR, "SPGiST tuple to be replaced is not a placeholder"); @@ -130,7 +130,7 @@ spgRedoAddLeaf(XLogReaderState *record) { buffer = XLogInitBufferForRedo(record, 0); SpGistInitBuffer(buffer, - SPGIST_LEAF | (xldata->storesNulls ? SPGIST_NULLS : 0)); + SPGIST_LEAF | (xldata->storesNulls ? SPGIST_NULLS : 0)); action = BLK_NEEDS_REDO; } else @@ -153,7 +153,7 @@ spgRedoAddLeaf(XLogReaderState *record) SpGistLeafTuple head; head = (SpGistLeafTuple) PageGetItem(page, - PageGetItemId(page, xldata->offnumHeadLeaf)); + PageGetItemId(page, xldata->offnumHeadLeaf)); Assert(head->nextOffset == leafTupleHdr.nextOffset); head->nextOffset = xldata->offnumLeaf; } @@ -164,7 +164,7 @@ spgRedoAddLeaf(XLogReaderState *record) PageIndexTupleDelete(page, xldata->offnumLeaf); if (PageAddItem(page, (Item) leafTuple, leafTupleHdr.size, - xldata->offnumLeaf, false, false) != xldata->offnumLeaf) + xldata->offnumLeaf, false, false) != xldata->offnumLeaf) elog(ERROR, "failed to add item of size %u to SPGiST index page", leafTupleHdr.size); } @@ -188,7 +188,7 @@ spgRedoAddLeaf(XLogReaderState *record) page = BufferGetPage(buffer); tuple = (SpGistInnerTuple) PageGetItem(page, - PageGetItemId(page, xldata->offnumParent)); + PageGetItemId(page, xldata->offnumParent)); spgUpdateNodeLink(tuple, xldata->nodeI, blknoLeaf, xldata->offnumLeaf); @@ -241,7 +241,7 @@ spgRedoMoveLeafs(XLogReaderState *record) { buffer = XLogInitBufferForRedo(record, 1); SpGistInitBuffer(buffer, - SPGIST_LEAF | (xldata->storesNulls ? SPGIST_NULLS : 0)); + SPGIST_LEAF | (xldata->storesNulls ? SPGIST_NULLS : 0)); action = BLK_NEEDS_REDO; } else @@ -283,7 +283,7 @@ spgRedoMoveLeafs(XLogReaderState *record) page = BufferGetPage(buffer); spgPageIndexMultiDelete(&state, page, toDelete, xldata->nMoves, - state.isBuild ? SPGIST_PLACEHOLDER : SPGIST_REDIRECT, + state.isBuild ? SPGIST_PLACEHOLDER : SPGIST_REDIRECT, SPGIST_PLACEHOLDER, blknoDst, toInsert[nInsert - 1]); @@ -302,7 +302,7 @@ spgRedoMoveLeafs(XLogReaderState *record) page = BufferGetPage(buffer); tuple = (SpGistInnerTuple) PageGetItem(page, - PageGetItemId(page, xldata->offnumParent)); + PageGetItemId(page, xldata->offnumParent)); spgUpdateNodeLink(tuple, xldata->nodeI, blknoDst, toInsert[nInsert - 1]); @@ -396,7 +396,7 @@ spgRedoAddNode(XLogReaderState *record) SpGistInnerTuple parentTuple; parentTuple = (SpGistInnerTuple) PageGetItem(page, - PageGetItemId(page, xldata->offnumParent)); + PageGetItemId(page, xldata->offnumParent)); spgUpdateNodeLink(parentTuple, xldata->nodeI, blknoNew, xldata->offnumNew); @@ -443,7 +443,7 @@ spgRedoAddNode(XLogReaderState *record) SpGistInnerTuple parentTuple; parentTuple = (SpGistInnerTuple) PageGetItem(page, - PageGetItemId(page, xldata->offnumParent)); + PageGetItemId(page, xldata->offnumParent)); spgUpdateNodeLink(parentTuple, xldata->nodeI, blknoNew, xldata->offnumNew); @@ -467,7 +467,7 @@ spgRedoAddNode(XLogReaderState *record) page = BufferGetPage(buffer); parentTuple = (SpGistInnerTuple) PageGetItem(page, - PageGetItemId(page, xldata->offnumParent)); + PageGetItemId(page, xldata->offnumParent)); spgUpdateNodeLink(parentTuple, xldata->nodeI, blknoNew, xldata->offnumNew); @@ -543,7 +543,7 @@ spgRedoSplitTuple(XLogReaderState *record) PageIndexTupleDelete(page, xldata->offnumPrefix); if (PageAddItem(page, (Item) prefixTuple, prefixTupleHdr.size, - xldata->offnumPrefix, false, false) != xldata->offnumPrefix) + xldata->offnumPrefix, false, false) != xldata->offnumPrefix) elog(ERROR, "failed to add item of size %u to SPGiST index page", prefixTupleHdr.size); @@ -613,7 +613,7 @@ spgRedoPickSplit(XLogReaderState *record) srcPage = (Page) BufferGetPage(srcBuffer); SpGistInitBuffer(srcBuffer, - SPGIST_LEAF | (xldata->storesNulls ? SPGIST_NULLS : 0)); + SPGIST_LEAF | (xldata->storesNulls ? SPGIST_NULLS : 0)); /* don't update LSN etc till we're done with it */ } else @@ -666,7 +666,7 @@ spgRedoPickSplit(XLogReaderState *record) destPage = (Page) BufferGetPage(destBuffer); SpGistInitBuffer(destBuffer, - SPGIST_LEAF | (xldata->storesNulls ? SPGIST_NULLS : 0)); + SPGIST_LEAF | (xldata->storesNulls ? SPGIST_NULLS : 0)); /* don't update LSN etc till we're done with it */ } else @@ -735,7 +735,7 @@ spgRedoPickSplit(XLogReaderState *record) SpGistInnerTuple parent; parent = (SpGistInnerTuple) PageGetItem(page, - PageGetItemId(page, xldata->offnumParent)); + PageGetItemId(page, xldata->offnumParent)); spgUpdateNodeLink(parent, xldata->nodeI, blknoInner, xldata->offnumInner); } @@ -767,7 +767,7 @@ spgRedoPickSplit(XLogReaderState *record) page = BufferGetPage(parentBuffer); parent = (SpGistInnerTuple) PageGetItem(page, - PageGetItemId(page, xldata->offnumParent)); + PageGetItemId(page, xldata->offnumParent)); spgUpdateNodeLink(parent, xldata->nodeI, blknoInner, xldata->offnumInner); @@ -852,7 +852,7 @@ spgRedoVacuumLeaf(XLogReaderState *record) SpGistLeafTuple lt; lt = (SpGistLeafTuple) PageGetItem(page, - PageGetItemId(page, chainSrc[i])); + PageGetItemId(page, chainSrc[i])); Assert(lt->tupstate == SPGIST_LIVE); lt->nextOffset = chainDest[i]; } @@ -929,7 +929,7 @@ spgRedoVacuumRedirect(XLogReaderState *record) SpGistDeadTuple dt; dt = (SpGistDeadTuple) PageGetItem(page, - PageGetItemId(page, itemToPlaceholder[i])); + PageGetItemId(page, itemToPlaceholder[i])); Assert(dt->tupstate == SPGIST_REDIRECT); dt->tupstate = SPGIST_PLACEHOLDER; ItemPointerSetInvalid(&dt->pointer); diff --git a/src/backend/access/transam/clog.c b/src/backend/access/transam/clog.c index ed1b1d8ce4..c34e7e1945 100644 --- a/src/backend/access/transam/clog.c +++ b/src/backend/access/transam/clog.c @@ -147,7 +147,7 @@ static void set_status_by_pages(int nsubxids, TransactionId *subxids, */ void TransactionIdSetTreeStatus(TransactionId xid, int nsubxids, - TransactionId *subxids, XidStatus status, XLogRecPtr lsn) + TransactionId *subxids, XidStatus status, XLogRecPtr lsn) { int pageno = TransactionIdToPage(xid); /* get page of parent */ int i; diff --git a/src/backend/access/transam/commit_ts.c b/src/backend/access/transam/commit_ts.c index 7646c23c4e..827d976db8 100644 --- a/src/backend/access/transam/commit_ts.c +++ b/src/backend/access/transam/commit_ts.c @@ -292,7 +292,7 @@ TransactionIdGetCommitTsData(TransactionId xid, TimestampTz *ts, if (!TransactionIdIsValid(xid)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("cannot retrieve commit timestamp for transaction %u", xid))); + errmsg("cannot retrieve commit timestamp for transaction %u", xid))); else if (!TransactionIdIsNormal(xid)) { /* frozen and bootstrap xids are always committed far in the past */ @@ -877,7 +877,7 @@ AdvanceOldestCommitTsXid(TransactionId oldestXact) { LWLockAcquire(CommitTsLock, LW_EXCLUSIVE); if (ShmemVariableCache->oldestCommitTsXid != InvalidTransactionId && - TransactionIdPrecedes(ShmemVariableCache->oldestCommitTsXid, oldestXact)) + TransactionIdPrecedes(ShmemVariableCache->oldestCommitTsXid, oldestXact)) ShmemVariableCache->oldestCommitTsXid = oldestXact; LWLockRelease(CommitTsLock); } diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c index 1a7824b5d4..682eef420b 100644 --- a/src/backend/access/transam/multixact.c +++ b/src/backend/access/transam/multixact.c @@ -999,15 +999,15 @@ GetNewMultiXactId(int nmembers, MultiXactOffset *offset) (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), errmsg("database is not accepting commands that generate new MultiXactIds to avoid wraparound data loss in database \"%s\"", oldest_datname), - errhint("Execute a database-wide VACUUM in that database.\n" - "You might also need to commit or roll back old prepared transactions."))); + errhint("Execute a database-wide VACUUM in that database.\n" + "You might also need to commit or roll back old prepared transactions."))); else ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), errmsg("database is not accepting commands that generate new MultiXactIds to avoid wraparound data loss in database with OID %u", oldest_datoid), - errhint("Execute a database-wide VACUUM in that database.\n" - "You might also need to commit or roll back old prepared transactions."))); + errhint("Execute a database-wide VACUUM in that database.\n" + "You might also need to commit or roll back old prepared transactions."))); } /* @@ -1030,8 +1030,8 @@ GetNewMultiXactId(int nmembers, MultiXactOffset *offset) multiWrapLimit - result, oldest_datname, multiWrapLimit - result), - errhint("Execute a database-wide VACUUM in that database.\n" - "You might also need to commit or roll back old prepared transactions."))); + errhint("Execute a database-wide VACUUM in that database.\n" + "You might also need to commit or roll back old prepared transactions."))); else ereport(WARNING, (errmsg_plural("database with OID %u must be vacuumed before %u more MultiXactId is used", @@ -1039,8 +1039,8 @@ GetNewMultiXactId(int nmembers, MultiXactOffset *offset) multiWrapLimit - result, oldest_datoid, multiWrapLimit - result), - errhint("Execute a database-wide VACUUM in that database.\n" - "You might also need to commit or roll back old prepared transactions."))); + errhint("Execute a database-wide VACUUM in that database.\n" + "You might also need to commit or roll back old prepared transactions."))); } /* Re-acquire lock and start over */ @@ -1098,9 +1098,9 @@ GetNewMultiXactId(int nmembers, MultiXactOffset *offset) errmsg("multixact \"members\" limit exceeded"), errdetail_plural("This command would create a multixact with %u members, but the remaining space is only enough for %u member.", "This command would create a multixact with %u members, but the remaining space is only enough for %u members.", - MultiXactState->offsetStopLimit - nextOffset - 1, + MultiXactState->offsetStopLimit - nextOffset - 1, nmembers, - MultiXactState->offsetStopLimit - nextOffset - 1), + MultiXactState->offsetStopLimit - nextOffset - 1), errhint("Execute a database-wide VACUUM in database with OID %u with reduced vacuum_multixact_freeze_min_age and vacuum_multixact_freeze_table_age settings.", MultiXactState->oldestMultiXactDB))); } @@ -1134,9 +1134,9 @@ GetNewMultiXactId(int nmembers, MultiXactOffset *offset) (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), errmsg_plural("database with OID %u must be vacuumed before %d more multixact member is used", "database with OID %u must be vacuumed before %d more multixact members are used", - MultiXactState->offsetStopLimit - nextOffset + nmembers, + MultiXactState->offsetStopLimit - nextOffset + nmembers, MultiXactState->oldestMultiXactDB, - MultiXactState->offsetStopLimit - nextOffset + nmembers), + MultiXactState->offsetStopLimit - nextOffset + nmembers), errhint("Execute a database-wide VACUUM in that database with reduced vacuum_multixact_freeze_min_age and vacuum_multixact_freeze_table_age settings."))); ExtendMultiXactMember(nextOffset, nmembers); @@ -1274,8 +1274,8 @@ GetMultiXactIdMembers(MultiXactId multi, MultiXactMember **members, { ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR), - errmsg("MultiXactId %u does no longer exist -- apparent wraparound", - multi))); + errmsg("MultiXactId %u does no longer exist -- apparent wraparound", + multi))); return -1; } @@ -2265,8 +2265,8 @@ SetMultiXactIdLimit(MultiXactId oldest_datminmxid, Oid oldest_datoid, /* Log the info */ ereport(DEBUG1, - (errmsg("MultiXactId wrap limit is %u, limited by database with OID %u", - multiWrapLimit, oldest_datoid))); + (errmsg("MultiXactId wrap limit is %u, limited by database with OID %u", + multiWrapLimit, oldest_datoid))); /* * Computing the actual limits is only possible once the data directory is @@ -2618,7 +2618,7 @@ SetOffsetVacuumLimit(bool is_startup) { /* move back to start of the corresponding segment */ offsetStopLimit = oldestOffset - (oldestOffset % - (MULTIXACT_MEMBERS_PER_PAGE * SLRU_PAGES_PER_SEGMENT)); + (MULTIXACT_MEMBERS_PER_PAGE * SLRU_PAGES_PER_SEGMENT)); /* always leave one segment before the wraparound point */ offsetStopLimit -= (MULTIXACT_MEMBERS_PER_PAGE * SLRU_PAGES_PER_SEGMENT); @@ -2628,8 +2628,8 @@ SetOffsetVacuumLimit(bool is_startup) (errmsg("MultiXact member wraparound protections are now enabled"))); ereport(DEBUG1, - (errmsg("MultiXact member stop limit is now %u based on MultiXact %u", - offsetStopLimit, oldestMultiXactId))); + (errmsg("MultiXact member stop limit is now %u based on MultiXact %u", + offsetStopLimit, oldestMultiXactId))); } else if (prevOldestOffsetKnown) { @@ -2915,7 +2915,7 @@ PerformOffsetsTruncation(MultiXactId oldestMulti, MultiXactId newOldestMulti) * detection. */ SimpleLruTruncate(MultiXactOffsetCtl, - MultiXactIdToOffsetPage(PreviousMultiXactId(newOldestMulti))); + MultiXactIdToOffsetPage(PreviousMultiXactId(newOldestMulti))); } /* @@ -3191,7 +3191,7 @@ WriteMZeroPageXlogRec(int pageno, uint8 info) static void WriteMTruncateXlogRec(Oid oldestMultiDB, MultiXactId startTruncOff, MultiXactId endTruncOff, - MultiXactOffset startTruncMemb, MultiXactOffset endTruncMemb) + MultiXactOffset startTruncMemb, MultiXactOffset endTruncMemb) { XLogRecPtr recptr; xl_multixact_truncate xlrec; diff --git a/src/backend/access/transam/parallel.c b/src/backend/access/transam/parallel.c index 98793bda66..17b10383e4 100644 --- a/src/backend/access/transam/parallel.c +++ b/src/backend/access/transam/parallel.c @@ -574,7 +574,7 @@ WaitForParallelWorkersToExit(ParallelContext *pcxt) if (status == BGWH_POSTMASTER_DIED) ereport(FATAL, (errcode(ERRCODE_ADMIN_SHUTDOWN), - errmsg("postmaster exited during a parallel transaction"))); + errmsg("postmaster exited during a parallel transaction"))); /* Release memory. */ pfree(pcxt->worker[i].bgwhandle); @@ -760,8 +760,8 @@ HandleParallelMessages(void) } else ereport(ERROR, - (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("lost connection to parallel worker"))); + (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), + errmsg("lost connection to parallel worker"))); } } } @@ -970,7 +970,7 @@ ParallelWorkerMain(Datum main_arg) if (toc == NULL) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("invalid magic number in dynamic shared memory segment"))); + errmsg("invalid magic number in dynamic shared memory segment"))); /* Look up fixed parallel state. */ fps = shm_toc_lookup(toc, PARALLEL_KEY_FIXED, false); diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c index aba45b0a85..93ec653dd6 100644 --- a/src/backend/access/transam/slru.c +++ b/src/backend/access/transam/slru.c @@ -907,22 +907,22 @@ SlruReportIOError(SlruCtl ctl, int pageno, TransactionId xid) ereport(ERROR, (errcode_for_file_access(), errmsg("could not access status of transaction %u", xid), - errdetail("Could not seek in file \"%s\" to offset %u: %m.", - path, offset))); + errdetail("Could not seek in file \"%s\" to offset %u: %m.", + path, offset))); break; case SLRU_READ_FAILED: ereport(ERROR, (errcode_for_file_access(), errmsg("could not access status of transaction %u", xid), - errdetail("Could not read from file \"%s\" at offset %u: %m.", - path, offset))); + errdetail("Could not read from file \"%s\" at offset %u: %m.", + path, offset))); break; case SLRU_WRITE_FAILED: ereport(ERROR, (errcode_for_file_access(), errmsg("could not access status of transaction %u", xid), - errdetail("Could not write to file \"%s\" at offset %u: %m.", - path, offset))); + errdetail("Could not write to file \"%s\" at offset %u: %m.", + path, offset))); break; case SLRU_FSYNC_FAILED: ereport(ERROR, @@ -1192,8 +1192,8 @@ restart:; { LWLockRelease(shared->ControlLock); ereport(LOG, - (errmsg("could not truncate directory \"%s\": apparent wraparound", - ctl->Dir))); + (errmsg("could not truncate directory \"%s\": apparent wraparound", + ctl->Dir))); return; } diff --git a/src/backend/access/transam/timeline.c b/src/backend/access/transam/timeline.c index 188008b4ca..63db8a981d 100644 --- a/src/backend/access/transam/timeline.c +++ b/src/backend/access/transam/timeline.c @@ -151,12 +151,12 @@ readTimeLineHistory(TimeLineID targetTLI) if (nfields != 3) ereport(FATAL, (errmsg("syntax error in history file: %s", fline), - errhint("Expected a write-ahead log switchpoint location."))); + errhint("Expected a write-ahead log switchpoint location."))); if (result && tli <= lasttli) ereport(FATAL, (errmsg("invalid data in history file: %s", fline), - errhint("Timeline IDs must be in increasing sequence."))); + errhint("Timeline IDs must be in increasing sequence."))); lasttli = tli; @@ -177,7 +177,7 @@ readTimeLineHistory(TimeLineID targetTLI) if (result && targetTLI <= lasttli) ereport(FATAL, (errmsg("invalid data in history file \"%s\"", path), - errhint("Timeline IDs must be less than child timeline's ID."))); + errhint("Timeline IDs must be less than child timeline's ID."))); /* * Create one more entry for the "tip" of the timeline, which has no entry @@ -367,7 +367,7 @@ writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI, ereport(ERROR, (errcode_for_file_access(), - errmsg("could not write to file \"%s\": %m", tmppath))); + errmsg("could not write to file \"%s\": %m", tmppath))); } pgstat_report_wait_end(); } diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c index 9e6933e9e8..ba03d9687e 100644 --- a/src/backend/access/transam/twophase.c +++ b/src/backend/access/transam/twophase.c @@ -388,7 +388,7 @@ MarkAsPreparing(TransactionId xid, const char *gid, ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("prepared transactions are disabled"), - errhint("Set max_prepared_transactions to a nonzero value."))); + errhint("Set max_prepared_transactions to a nonzero value."))); /* on first call, register the exit hook */ if (!twophaseExitRegistered) @@ -584,13 +584,13 @@ LockGXact(const char *gid, Oid user) if (gxact->locking_backend != InvalidBackendId) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("prepared transaction with identifier \"%s\" is busy", - gid))); + errmsg("prepared transaction with identifier \"%s\" is busy", + gid))); if (user != gxact->owner && !superuser_arg(user)) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("permission denied to finish prepared transaction"), + errmsg("permission denied to finish prepared transaction"), errhint("Must be superuser or the user that prepared the transaction."))); /* @@ -602,7 +602,7 @@ LockGXact(const char *gid, Oid user) if (MyDatabaseId != proc->databaseId) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("prepared transaction belongs to another database"), + errmsg("prepared transaction belongs to another database"), errhint("Connect to the database where the transaction was prepared to finish it."))); /* OK for me to lock it */ @@ -618,8 +618,8 @@ LockGXact(const char *gid, Oid user) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("prepared transaction with identifier \"%s\" does not exist", - gid))); + errmsg("prepared transaction with identifier \"%s\" does not exist", + gid))); /* NOTREACHED */ return NULL; @@ -1304,7 +1304,7 @@ XlogReadTwoPhaseData(XLogRecPtr lsn, char **buf, int *len) ereport(ERROR, (errcode(ERRCODE_OUT_OF_MEMORY), errmsg("out of memory"), - errdetail("Failed while allocating a WAL reading processor."))); + errdetail("Failed while allocating a WAL reading processor."))); record = XLogReadRecord(xlogreader, lsn, &errormsg); if (record == NULL) @@ -1318,9 +1318,9 @@ XlogReadTwoPhaseData(XLogRecPtr lsn, char **buf, int *len) (XLogRecGetInfo(xlogreader) & XLOG_XACT_OPMASK) != XLOG_XACT_PREPARE) ereport(ERROR, (errcode_for_file_access(), - errmsg("expected two-phase state data is not present in WAL at %X/%X", - (uint32) (lsn >> 32), - (uint32) lsn))); + errmsg("expected two-phase state data is not present in WAL at %X/%X", + (uint32) (lsn >> 32), + (uint32) lsn))); if (len != NULL) *len = XLogRecGetDataLen(xlogreader); @@ -1555,8 +1555,8 @@ RemoveTwoPhaseFile(TransactionId xid, bool giveWarning) if (errno != ENOENT || giveWarning) ereport(WARNING, (errcode_for_file_access(), - errmsg("could not remove two-phase state file \"%s\": %m", - path))); + errmsg("could not remove two-phase state file \"%s\": %m", + path))); } /* @@ -2058,8 +2058,8 @@ ProcessTwoPhaseBuffer(TransactionId xid, else { ereport(WARNING, - (errmsg("removing future two-phase state from memory for \"%u\"", - xid))); + (errmsg("removing future two-phase state from memory for \"%u\"", + xid))); PrepareRedoRemove(xid, true); } return NULL; @@ -2072,8 +2072,8 @@ ProcessTwoPhaseBuffer(TransactionId xid, if (buf == NULL) { ereport(WARNING, - (errmsg("removing corrupt two-phase state file for \"%u\"", - xid))); + (errmsg("removing corrupt two-phase state file for \"%u\"", + xid))); RemoveTwoPhaseFile(xid, true); return NULL; } @@ -2091,15 +2091,15 @@ ProcessTwoPhaseBuffer(TransactionId xid, if (fromdisk) { ereport(WARNING, - (errmsg("removing corrupt two-phase state file for \"%u\"", - xid))); + (errmsg("removing corrupt two-phase state file for \"%u\"", + xid))); RemoveTwoPhaseFile(xid, true); } else { ereport(WARNING, - (errmsg("removing corrupt two-phase state from memory for \"%u\"", - xid))); + (errmsg("removing corrupt two-phase state from memory for \"%u\"", + xid))); PrepareRedoRemove(xid, true); } pfree(buf); @@ -2192,7 +2192,7 @@ RecordTransactionCommitPrepared(TransactionId xid, nchildren, children, nrels, rels, ninvalmsgs, invalmsgs, initfileinval, false, - MyXactFlags | XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK, + MyXactFlags | XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK, xid); @@ -2277,7 +2277,7 @@ RecordTransactionAbortPrepared(TransactionId xid, recptr = XactLogAbortRecord(GetCurrentTimestamp(), nchildren, children, nrels, rels, - MyXactFlags | XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK, + MyXactFlags | XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK, xid); /* Always flush, since we're about to remove the 2PC state file */ diff --git a/src/backend/access/transam/varsup.c b/src/backend/access/transam/varsup.c index b02dd6fbd2..15e05591b7 100644 --- a/src/backend/access/transam/varsup.c +++ b/src/backend/access/transam/varsup.c @@ -399,11 +399,11 @@ SetTransactionIdLimit(TransactionId oldest_datfrozenxid, Oid oldest_datoid) if (oldest_datname) ereport(WARNING, - (errmsg("database \"%s\" must be vacuumed within %u transactions", - oldest_datname, - xidWrapLimit - curXid), - errhint("To avoid a database shutdown, execute a database-wide VACUUM in that database.\n" - "You might also need to commit or roll back old prepared transactions."))); + (errmsg("database \"%s\" must be vacuumed within %u transactions", + oldest_datname, + xidWrapLimit - curXid), + errhint("To avoid a database shutdown, execute a database-wide VACUUM in that database.\n" + "You might also need to commit or roll back old prepared transactions."))); else ereport(WARNING, (errmsg("database with OID %u must be vacuumed within %u transactions", diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index e14be6b314..b0aa69fe4b 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -1482,7 +1482,7 @@ AtSubCommit_childXids(void) new_maxChildXids * sizeof(TransactionId)); else new_childXids = repalloc(s->parent->childXids, - new_maxChildXids * sizeof(TransactionId)); + new_maxChildXids * sizeof(TransactionId)); s->parent->childXids = new_childXids; s->parent->maxChildXids = new_maxChildXids; @@ -2275,7 +2275,7 @@ PrepareTransaction(void) if (XactHasExportedSnapshots()) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot PREPARE a transaction that has exported snapshots"))); + errmsg("cannot PREPARE a transaction that has exported snapshots"))); /* Prevent cancel/die interrupt while cleaning up */ HOLD_INTERRUPTS(); @@ -3760,7 +3760,7 @@ DefineSavepoint(char *name) if (IsInParallelMode()) ereport(ERROR, (errcode(ERRCODE_INVALID_TRANSACTION_STATE), - errmsg("cannot define savepoints during a parallel operation"))); + errmsg("cannot define savepoints during a parallel operation"))); switch (s->blockState) { @@ -3827,7 +3827,7 @@ ReleaseSavepoint(List *options) if (IsInParallelMode()) ereport(ERROR, (errcode(ERRCODE_INVALID_TRANSACTION_STATE), - errmsg("cannot release savepoints during a parallel operation"))); + errmsg("cannot release savepoints during a parallel operation"))); switch (s->blockState) { @@ -3940,7 +3940,7 @@ RollbackToSavepoint(List *options) if (IsInParallelMode()) ereport(ERROR, (errcode(ERRCODE_INVALID_TRANSACTION_STATE), - errmsg("cannot rollback to savepoints during a parallel operation"))); + errmsg("cannot rollback to savepoints during a parallel operation"))); switch (s->blockState) { @@ -4068,7 +4068,7 @@ BeginInternalSubTransaction(char *name) if (IsInParallelMode()) ereport(ERROR, (errcode(ERRCODE_INVALID_TRANSACTION_STATE), - errmsg("cannot start subtransactions during a parallel operation"))); + errmsg("cannot start subtransactions during a parallel operation"))); switch (s->blockState) { @@ -4135,7 +4135,7 @@ ReleaseCurrentSubTransaction(void) if (IsInParallelMode()) ereport(ERROR, (errcode(ERRCODE_INVALID_TRANSACTION_STATE), - errmsg("cannot commit subtransactions during a parallel operation"))); + errmsg("cannot commit subtransactions during a parallel operation"))); if (s->blockState != TBLOCK_SUBINPROGRESS) elog(ERROR, "ReleaseCurrentSubTransaction: unexpected state %s", @@ -5412,13 +5412,13 @@ xact_redo_commit(xl_xact_parsed_commit *parsed, * recovered. It's unlikely but it's good to be safe. */ TransactionIdAsyncCommitTree( - xid, parsed->nsubxacts, parsed->subxacts, lsn); + xid, parsed->nsubxacts, parsed->subxacts, lsn); /* * We must mark clog before we update the ProcArray. */ ExpireTreeKnownAssignedTransactionIds( - xid, parsed->nsubxacts, parsed->subxacts, max_xid); + xid, parsed->nsubxacts, parsed->subxacts, max_xid); /* * Send any cache invalidations attached to the commit. We must @@ -5427,7 +5427,7 @@ xact_redo_commit(xl_xact_parsed_commit *parsed, */ ProcessCommittedInvalidationMessages( parsed->msgs, parsed->nmsgs, - XactCompletionRelcacheInitFileInval(parsed->xinfo), + XactCompletionRelcacheInitFileInval(parsed->xinfo), parsed->dbId, parsed->tsId); /* @@ -5566,7 +5566,7 @@ xact_redo_abort(xl_xact_parsed_abort *parsed, TransactionId xid) * We must update the ProcArray after we have marked clog. */ ExpireTreeKnownAssignedTransactionIds( - xid, parsed->nsubxacts, parsed->subxacts, max_xid); + xid, parsed->nsubxacts, parsed->subxacts, max_xid); /* * There are no flat files that need updating, nor invalidation diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 106210a883..48eecfc84a 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -1432,7 +1432,7 @@ checkXLogConsistency(XLogReaderState *record) if (memcmp(replay_image_masked, master_image_masked, BLCKSZ) != 0) { elog(FATAL, - "inconsistent page found, rel %u/%u/%u, forknum %u, blkno %u", + "inconsistent page found, rel %u/%u/%u, forknum %u, blkno %u", rnode.spcNode, rnode.dbNode, rnode.relNode, forknum, blkno); } @@ -1677,7 +1677,7 @@ WALInsertLockUpdateInsertingAt(XLogRecPtr insertingAt) * WALInsertLockAcquireExclusive. */ LWLockUpdateVar(&WALInsertLocks[NUM_XLOGINSERT_LOCKS - 1].l.lock, - &WALInsertLocks[NUM_XLOGINSERT_LOCKS - 1].l.insertingAt, + &WALInsertLocks[NUM_XLOGINSERT_LOCKS - 1].l.insertingAt, insertingAt); } else @@ -2452,9 +2452,9 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible) if (lseek(openLogFile, (off_t) startoffset, SEEK_SET) < 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("could not seek in log file %s to offset %u: %m", - XLogFileNameP(ThisTimeLineID, openLogSegNo), - startoffset))); + errmsg("could not seek in log file %s to offset %u: %m", + XLogFileNameP(ThisTimeLineID, openLogSegNo), + startoffset))); openLogOff = startoffset; } @@ -2476,7 +2476,7 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible) (errcode_for_file_access(), errmsg("could not write to log file %s " "at offset %u, length %zu: %m", - XLogFileNameP(ThisTimeLineID, openLogSegNo), + XLogFileNameP(ThisTimeLineID, openLogSegNo), openLogOff, nbytes))); } nleft -= written; @@ -2723,7 +2723,7 @@ UpdateMinRecoveryPoint(XLogRecPtr lsn, bool force) if (!force && newMinRecoveryPoint < lsn) elog(WARNING, - "xlog min recovery request %X/%X is past current point %X/%X", + "xlog min recovery request %X/%X is past current point %X/%X", (uint32) (lsn >> 32), (uint32) lsn, (uint32) (newMinRecoveryPoint >> 32), (uint32) newMinRecoveryPoint); @@ -2738,10 +2738,10 @@ UpdateMinRecoveryPoint(XLogRecPtr lsn, bool force) minRecoveryPointTLI = newMinRecoveryPointTLI; ereport(DEBUG2, - (errmsg("updated min recovery point to %X/%X on timeline %u", - (uint32) (minRecoveryPoint >> 32), - (uint32) minRecoveryPoint, - newMinRecoveryPointTLI))); + (errmsg("updated min recovery point to %X/%X on timeline %u", + (uint32) (minRecoveryPoint >> 32), + (uint32) minRecoveryPoint, + newMinRecoveryPointTLI))); } } LWLockRelease(ControlFileLock); @@ -2781,7 +2781,7 @@ XLogFlush(XLogRecPtr record) elog(LOG, "xlog flush request %X/%X; write %X/%X; flush %X/%X", (uint32) (record >> 32), (uint32) record, (uint32) (LogwrtResult.Write >> 32), (uint32) LogwrtResult.Write, - (uint32) (LogwrtResult.Flush >> 32), (uint32) LogwrtResult.Flush); + (uint32) (LogwrtResult.Flush >> 32), (uint32) LogwrtResult.Flush); #endif START_CRIT_SECTION(); @@ -2913,9 +2913,9 @@ XLogFlush(XLogRecPtr record) */ if (LogwrtResult.Flush < record) elog(ERROR, - "xlog flush request %X/%X is not satisfied --- flushed only to %X/%X", + "xlog flush request %X/%X is not satisfied --- flushed only to %X/%X", (uint32) (record >> 32), (uint32) record, - (uint32) (LogwrtResult.Flush >> 32), (uint32) LogwrtResult.Flush); + (uint32) (LogwrtResult.Flush >> 32), (uint32) LogwrtResult.Flush); } /* @@ -3032,7 +3032,7 @@ XLogBackgroundFlush(void) (uint32) (WriteRqst.Write >> 32), (uint32) WriteRqst.Write, (uint32) (WriteRqst.Flush >> 32), (uint32) WriteRqst.Flush, (uint32) (LogwrtResult.Write >> 32), (uint32) LogwrtResult.Write, - (uint32) (LogwrtResult.Flush >> 32), (uint32) LogwrtResult.Flush); + (uint32) (LogwrtResult.Flush >> 32), (uint32) LogwrtResult.Flush); #endif START_CRIT_SECTION(); @@ -3531,7 +3531,7 @@ XLogFileOpen(XLogSegNo segno) if (fd < 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("could not open write-ahead log file \"%s\": %m", path))); + errmsg("could not open write-ahead log file \"%s\": %m", path))); return fd; } @@ -4025,8 +4025,8 @@ RemoveXlogFile(const char *segname, XLogRecPtr PriorRedoPtr, XLogRecPtr endptr) { ereport(LOG, (errcode_for_file_access(), - errmsg("could not rename old write-ahead log file \"%s\": %m", - path))); + errmsg("could not rename old write-ahead log file \"%s\": %m", + path))); return; } rc = durable_unlink(newpath, LOG); @@ -4180,7 +4180,7 @@ ReadRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr, int emode, if (errormsg) ereport(emode_for_corrupt_record(emode, RecPtr ? RecPtr : EndRecPtr), - (errmsg_internal("%s", errormsg) /* already translated */ )); + (errmsg_internal("%s", errormsg) /* already translated */ )); } /* @@ -4197,10 +4197,10 @@ ReadRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr, int emode, XLogFileName(fname, xlogreader->readPageTLI, segno); ereport(emode_for_corrupt_record(emode, RecPtr ? RecPtr : EndRecPtr), - (errmsg("unexpected timeline ID %u in log segment %s, offset %u", - xlogreader->latestPageTLI, - fname, - offset))); + (errmsg("unexpected timeline ID %u in log segment %s, offset %u", + xlogreader->latestPageTLI, + fname, + offset))); record = NULL; } @@ -4494,8 +4494,8 @@ ReadControlFile(void) ereport(FATAL, (errmsg("database files are incompatible with server"), errdetail("The database cluster was initialized with PG_CONTROL_VERSION %d (0x%08x)," - " but the server was compiled with PG_CONTROL_VERSION %d (0x%08x).", - ControlFile->pg_control_version, ControlFile->pg_control_version, + " but the server was compiled with PG_CONTROL_VERSION %d (0x%08x).", + ControlFile->pg_control_version, ControlFile->pg_control_version, PG_CONTROL_VERSION, PG_CONTROL_VERSION), errhint("This could be a problem of mismatched byte ordering. It looks like you need to initdb."))); @@ -4503,8 +4503,8 @@ ReadControlFile(void) ereport(FATAL, (errmsg("database files are incompatible with server"), errdetail("The database cluster was initialized with PG_CONTROL_VERSION %d," - " but the server was compiled with PG_CONTROL_VERSION %d.", - ControlFile->pg_control_version, PG_CONTROL_VERSION), + " but the server was compiled with PG_CONTROL_VERSION %d.", + ControlFile->pg_control_version, PG_CONTROL_VERSION), errhint("It looks like you need to initdb."))); /* Now check the CRC. */ @@ -4527,15 +4527,15 @@ ReadControlFile(void) ereport(FATAL, (errmsg("database files are incompatible with server"), errdetail("The database cluster was initialized with CATALOG_VERSION_NO %d," - " but the server was compiled with CATALOG_VERSION_NO %d.", - ControlFile->catalog_version_no, CATALOG_VERSION_NO), + " but the server was compiled with CATALOG_VERSION_NO %d.", + ControlFile->catalog_version_no, CATALOG_VERSION_NO), errhint("It looks like you need to initdb."))); if (ControlFile->maxAlign != MAXIMUM_ALIGNOF) ereport(FATAL, (errmsg("database files are incompatible with server"), - errdetail("The database cluster was initialized with MAXALIGN %d," - " but the server was compiled with MAXALIGN %d.", - ControlFile->maxAlign, MAXIMUM_ALIGNOF), + errdetail("The database cluster was initialized with MAXALIGN %d," + " but the server was compiled with MAXALIGN %d.", + ControlFile->maxAlign, MAXIMUM_ALIGNOF), errhint("It looks like you need to initdb."))); if (ControlFile->floatFormat != FLOATFORMAT_VALUE) ereport(FATAL, @@ -4545,58 +4545,58 @@ ReadControlFile(void) if (ControlFile->blcksz != BLCKSZ) ereport(FATAL, (errmsg("database files are incompatible with server"), - errdetail("The database cluster was initialized with BLCKSZ %d," - " but the server was compiled with BLCKSZ %d.", - ControlFile->blcksz, BLCKSZ), + errdetail("The database cluster was initialized with BLCKSZ %d," + " but the server was compiled with BLCKSZ %d.", + ControlFile->blcksz, BLCKSZ), errhint("It looks like you need to recompile or initdb."))); if (ControlFile->relseg_size != RELSEG_SIZE) ereport(FATAL, (errmsg("database files are incompatible with server"), - errdetail("The database cluster was initialized with RELSEG_SIZE %d," - " but the server was compiled with RELSEG_SIZE %d.", - ControlFile->relseg_size, RELSEG_SIZE), + errdetail("The database cluster was initialized with RELSEG_SIZE %d," + " but the server was compiled with RELSEG_SIZE %d.", + ControlFile->relseg_size, RELSEG_SIZE), errhint("It looks like you need to recompile or initdb."))); if (ControlFile->xlog_blcksz != XLOG_BLCKSZ) ereport(FATAL, (errmsg("database files are incompatible with server"), - errdetail("The database cluster was initialized with XLOG_BLCKSZ %d," - " but the server was compiled with XLOG_BLCKSZ %d.", - ControlFile->xlog_blcksz, XLOG_BLCKSZ), + errdetail("The database cluster was initialized with XLOG_BLCKSZ %d," + " but the server was compiled with XLOG_BLCKSZ %d.", + ControlFile->xlog_blcksz, XLOG_BLCKSZ), errhint("It looks like you need to recompile or initdb."))); if (ControlFile->xlog_seg_size != XLOG_SEG_SIZE) ereport(FATAL, (errmsg("database files are incompatible with server"), errdetail("The database cluster was initialized with XLOG_SEG_SIZE %d," - " but the server was compiled with XLOG_SEG_SIZE %d.", + " but the server was compiled with XLOG_SEG_SIZE %d.", ControlFile->xlog_seg_size, XLOG_SEG_SIZE), errhint("It looks like you need to recompile or initdb."))); if (ControlFile->nameDataLen != NAMEDATALEN) ereport(FATAL, (errmsg("database files are incompatible with server"), - errdetail("The database cluster was initialized with NAMEDATALEN %d," - " but the server was compiled with NAMEDATALEN %d.", - ControlFile->nameDataLen, NAMEDATALEN), + errdetail("The database cluster was initialized with NAMEDATALEN %d," + " but the server was compiled with NAMEDATALEN %d.", + ControlFile->nameDataLen, NAMEDATALEN), errhint("It looks like you need to recompile or initdb."))); if (ControlFile->indexMaxKeys != INDEX_MAX_KEYS) ereport(FATAL, (errmsg("database files are incompatible with server"), errdetail("The database cluster was initialized with INDEX_MAX_KEYS %d," - " but the server was compiled with INDEX_MAX_KEYS %d.", + " but the server was compiled with INDEX_MAX_KEYS %d.", ControlFile->indexMaxKeys, INDEX_MAX_KEYS), errhint("It looks like you need to recompile or initdb."))); if (ControlFile->toast_max_chunk_size != TOAST_MAX_CHUNK_SIZE) ereport(FATAL, (errmsg("database files are incompatible with server"), errdetail("The database cluster was initialized with TOAST_MAX_CHUNK_SIZE %d," - " but the server was compiled with TOAST_MAX_CHUNK_SIZE %d.", - ControlFile->toast_max_chunk_size, (int) TOAST_MAX_CHUNK_SIZE), + " but the server was compiled with TOAST_MAX_CHUNK_SIZE %d.", + ControlFile->toast_max_chunk_size, (int) TOAST_MAX_CHUNK_SIZE), errhint("It looks like you need to recompile or initdb."))); if (ControlFile->loblksize != LOBLKSIZE) ereport(FATAL, (errmsg("database files are incompatible with server"), - errdetail("The database cluster was initialized with LOBLKSIZE %d," - " but the server was compiled with LOBLKSIZE %d.", - ControlFile->loblksize, (int) LOBLKSIZE), + errdetail("The database cluster was initialized with LOBLKSIZE %d," + " but the server was compiled with LOBLKSIZE %d.", + ControlFile->loblksize, (int) LOBLKSIZE), errhint("It looks like you need to recompile or initdb."))); #ifdef USE_FLOAT4_BYVAL @@ -4604,14 +4604,14 @@ ReadControlFile(void) ereport(FATAL, (errmsg("database files are incompatible with server"), errdetail("The database cluster was initialized without USE_FLOAT4_BYVAL" - " but the server was compiled with USE_FLOAT4_BYVAL."), + " but the server was compiled with USE_FLOAT4_BYVAL."), errhint("It looks like you need to recompile or initdb."))); #else if (ControlFile->float4ByVal != false) ereport(FATAL, (errmsg("database files are incompatible with server"), - errdetail("The database cluster was initialized with USE_FLOAT4_BYVAL" - " but the server was compiled without USE_FLOAT4_BYVAL."), + errdetail("The database cluster was initialized with USE_FLOAT4_BYVAL" + " but the server was compiled without USE_FLOAT4_BYVAL."), errhint("It looks like you need to recompile or initdb."))); #endif @@ -4620,14 +4620,14 @@ ReadControlFile(void) ereport(FATAL, (errmsg("database files are incompatible with server"), errdetail("The database cluster was initialized without USE_FLOAT8_BYVAL" - " but the server was compiled with USE_FLOAT8_BYVAL."), + " but the server was compiled with USE_FLOAT8_BYVAL."), errhint("It looks like you need to recompile or initdb."))); #else if (ControlFile->float8ByVal != false) ereport(FATAL, (errmsg("database files are incompatible with server"), - errdetail("The database cluster was initialized with USE_FLOAT8_BYVAL" - " but the server was compiled without USE_FLOAT8_BYVAL."), + errdetail("The database cluster was initialized with USE_FLOAT8_BYVAL" + " but the server was compiled without USE_FLOAT8_BYVAL."), errhint("It looks like you need to recompile or initdb."))); #endif @@ -5072,7 +5072,7 @@ BootStrapXLOG(void) errno = ENOSPC; ereport(PANIC, (errcode_for_file_access(), - errmsg("could not write bootstrap write-ahead log file: %m"))); + errmsg("could not write bootstrap write-ahead log file: %m"))); } pgstat_report_wait_end(); @@ -5080,13 +5080,13 @@ BootStrapXLOG(void) if (pg_fsync(openLogFile) != 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("could not fsync bootstrap write-ahead log file: %m"))); + errmsg("could not fsync bootstrap write-ahead log file: %m"))); pgstat_report_wait_end(); if (close(openLogFile)) ereport(PANIC, (errcode_for_file_access(), - errmsg("could not close bootstrap write-ahead log file: %m"))); + errmsg("could not close bootstrap write-ahead log file: %m"))); openLogFile = -1; @@ -5208,9 +5208,9 @@ readRecoveryCommandFile(void) else ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid value for recovery parameter \"%s\": \"%s\"", - "recovery_target_action", - item->value), + errmsg("invalid value for recovery parameter \"%s\": \"%s\"", + "recovery_target_action", + item->value), errhint("Valid values are \"pause\", \"promote\", and \"shutdown\"."))); ereport(DEBUG2, @@ -5236,10 +5236,10 @@ readRecoveryCommandFile(void) } if (rtli) ereport(DEBUG2, - (errmsg_internal("recovery_target_timeline = %u", rtli))); + (errmsg_internal("recovery_target_timeline = %u", rtli))); else ereport(DEBUG2, - (errmsg_internal("recovery_target_timeline = latest"))); + (errmsg_internal("recovery_target_timeline = latest"))); } else if (strcmp(item->name, "recovery_target_xid") == 0) { @@ -5248,8 +5248,8 @@ readRecoveryCommandFile(void) if (errno == EINVAL || errno == ERANGE) ereport(FATAL, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("recovery_target_xid is not a valid number: \"%s\"", - item->value))); + errmsg("recovery_target_xid is not a valid number: \"%s\"", + item->value))); ereport(DEBUG2, (errmsg_internal("recovery_target_xid = %u", recoveryTargetXid))); @@ -5264,12 +5264,12 @@ readRecoveryCommandFile(void) */ recoveryTargetTime = DatumGetTimestampTz(DirectFunctionCall3(timestamptz_in, - CStringGetDatum(item->value), - ObjectIdGetDatum(InvalidOid), + CStringGetDatum(item->value), + ObjectIdGetDatum(InvalidOid), Int32GetDatum(-1))); ereport(DEBUG2, (errmsg_internal("recovery_target_time = '%s'", - timestamptz_to_str(recoveryTargetTime)))); + timestamptz_to_str(recoveryTargetTime)))); } else if (strcmp(item->name, "recovery_target_name") == 0) { @@ -5310,10 +5310,10 @@ readRecoveryCommandFile(void) else ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid value for recovery parameter \"%s\": \"%s\"", - "recovery_target", - item->value), - errhint("The only allowed value is \"immediate\"."))); + errmsg("invalid value for recovery parameter \"%s\": \"%s\"", + "recovery_target", + item->value), + errhint("The only allowed value is \"immediate\"."))); ereport(DEBUG2, (errmsg_internal("recovery_target = '%s'", item->value))); @@ -5422,7 +5422,7 @@ readRecoveryCommandFile(void) if (StandbyModeRequested && !IsUnderPostmaster) ereport(FATAL, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("standby mode is not supported by single-user servers"))); + errmsg("standby mode is not supported by single-user servers"))); /* Enable fetching from archive recovery area */ ArchiveRecoveryRequested = true; @@ -5642,9 +5642,9 @@ recoveryStopsBefore(XLogReaderState *record) recoveryStopTime = 0; recoveryStopName[0] = '\0'; ereport(LOG, - (errmsg("recovery stopping before WAL location (LSN) \"%X/%X\"", - (uint32) (recoveryStopLSN >> 32), - (uint32) recoveryStopLSN))); + (errmsg("recovery stopping before WAL location (LSN) \"%X/%X\"", + (uint32) (recoveryStopLSN >> 32), + (uint32) recoveryStopLSN))); return true; } @@ -5781,9 +5781,9 @@ recoveryStopsAfter(XLogReaderState *record) strlcpy(recoveryStopName, recordRestorePointData->rp_name, MAXFNAMELEN); ereport(LOG, - (errmsg("recovery stopping at restore point \"%s\", time %s", - recoveryStopName, - timestamptz_to_str(recoveryStopTime)))); + (errmsg("recovery stopping at restore point \"%s\", time %s", + recoveryStopName, + timestamptz_to_str(recoveryStopTime)))); return true; } } @@ -5799,9 +5799,9 @@ recoveryStopsAfter(XLogReaderState *record) recoveryStopTime = 0; recoveryStopName[0] = '\0'; ereport(LOG, - (errmsg("recovery stopping after WAL location (LSN) \"%X/%X\"", - (uint32) (recoveryStopLSN >> 32), - (uint32) recoveryStopLSN))); + (errmsg("recovery stopping after WAL location (LSN) \"%X/%X\"", + (uint32) (recoveryStopLSN >> 32), + (uint32) recoveryStopLSN))); return true; } @@ -6239,20 +6239,20 @@ StartupXLOG(void) str_time(ControlFile->time)))); else if (ControlFile->state == DB_IN_CRASH_RECOVERY) ereport(LOG, - (errmsg("database system was interrupted while in recovery at %s", - str_time(ControlFile->time)), - errhint("This probably means that some data is corrupted and" - " you will have to use the last backup for recovery."))); + (errmsg("database system was interrupted while in recovery at %s", + str_time(ControlFile->time)), + errhint("This probably means that some data is corrupted and" + " you will have to use the last backup for recovery."))); else if (ControlFile->state == DB_IN_ARCHIVE_RECOVERY) ereport(LOG, (errmsg("database system was interrupted while in recovery at log time %s", str_time(ControlFile->checkPointCopy.time)), errhint("If this has occurred more than once some data might be corrupted" - " and you might need to choose an earlier recovery target."))); + " and you might need to choose an earlier recovery target."))); else if (ControlFile->state == DB_IN_PRODUCTION) ereport(LOG, - (errmsg("database system was interrupted; last known up at %s", - str_time(ControlFile->time)))); + (errmsg("database system was interrupted; last known up at %s", + str_time(ControlFile->time)))); /* This is just to allow attaching to startup process with a debugger */ #ifdef XLOG_REPLAY_DELAY @@ -6347,7 +6347,7 @@ StartupXLOG(void) ereport(ERROR, (errcode(ERRCODE_OUT_OF_MEMORY), errmsg("out of memory"), - errdetail("Failed while allocating a WAL reading processor."))); + errdetail("Failed while allocating a WAL reading processor."))); xlogreader->system_identifier = ControlFile->system_identifier; /* @@ -6382,7 +6382,7 @@ StartupXLOG(void) wasShutdown = ((record->xl_info & ~XLR_INFO_MASK) == XLOG_CHECKPOINT_SHUTDOWN); ereport(DEBUG1, (errmsg("checkpoint record is at %X/%X", - (uint32) (checkPointLoc >> 32), (uint32) checkPointLoc))); + (uint32) (checkPointLoc >> 32), (uint32) checkPointLoc))); InRecovery = true; /* force recovery even if SHUTDOWNED */ /* @@ -6428,8 +6428,8 @@ StartupXLOG(void) if (symlink(ti->path, linkloc) < 0) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not create symbolic link \"%s\": %m", - linkloc))); + errmsg("could not create symbolic link \"%s\": %m", + linkloc))); pfree(ti->oid); pfree(ti->path); @@ -6460,16 +6460,16 @@ StartupXLOG(void) unlink(TABLESPACE_MAP_OLD); if (durable_rename(TABLESPACE_MAP, TABLESPACE_MAP_OLD, DEBUG1) == 0) ereport(LOG, - (errmsg("ignoring file \"%s\" because no file \"%s\" exists", - TABLESPACE_MAP, BACKUP_LABEL_FILE), - errdetail("File \"%s\" was renamed to \"%s\".", - TABLESPACE_MAP, TABLESPACE_MAP_OLD))); + (errmsg("ignoring file \"%s\" because no file \"%s\" exists", + TABLESPACE_MAP, BACKUP_LABEL_FILE), + errdetail("File \"%s\" was renamed to \"%s\".", + TABLESPACE_MAP, TABLESPACE_MAP_OLD))); else ereport(LOG, - (errmsg("ignoring file \"%s\" because no file \"%s\" exists", - TABLESPACE_MAP, BACKUP_LABEL_FILE), - errdetail("Could not rename file \"%s\" to \"%s\": %m.", - TABLESPACE_MAP, TABLESPACE_MAP_OLD))); + (errmsg("ignoring file \"%s\" because no file \"%s\" exists", + TABLESPACE_MAP, BACKUP_LABEL_FILE), + errdetail("Could not rename file \"%s\" to \"%s\": %m.", + TABLESPACE_MAP, TABLESPACE_MAP_OLD))); } /* @@ -6510,7 +6510,7 @@ StartupXLOG(void) { ereport(DEBUG1, (errmsg("checkpoint record is at %X/%X", - (uint32) (checkPointLoc >> 32), (uint32) checkPointLoc))); + (uint32) (checkPointLoc >> 32), (uint32) checkPointLoc))); } else if (StandbyMode) { @@ -6529,12 +6529,12 @@ StartupXLOG(void) { ereport(LOG, (errmsg("using previous checkpoint record at %X/%X", - (uint32) (checkPointLoc >> 32), (uint32) checkPointLoc))); + (uint32) (checkPointLoc >> 32), (uint32) checkPointLoc))); InRecovery = true; /* force recovery even if SHUTDOWNED */ } else ereport(PANIC, - (errmsg("could not locate a valid checkpoint record"))); + (errmsg("could not locate a valid checkpoint record"))); } memcpy(&checkPoint, XLogRecGetData(xlogreader), sizeof(CheckPoint)); wasShutdown = ((record->xl_info & ~XLR_INFO_MASK) == XLOG_CHECKPOINT_SHUTDOWN); @@ -6587,7 +6587,7 @@ StartupXLOG(void) * history, too. */ if (!XLogRecPtrIsInvalid(ControlFile->minRecoveryPoint) && - tliOfPointInHistory(ControlFile->minRecoveryPoint - 1, expectedTLEs) != + tliOfPointInHistory(ControlFile->minRecoveryPoint - 1, expectedTLEs) != ControlFile->minRecoveryPointTLI) ereport(FATAL, (errmsg("requested timeline %u does not contain minimum recovery point %X/%X on timeline %u", @@ -6600,7 +6600,7 @@ StartupXLOG(void) ereport(DEBUG1, (errmsg_internal("redo record is at %X/%X; shutdown %s", - (uint32) (checkPoint.redo >> 32), (uint32) checkPoint.redo, + (uint32) (checkPoint.redo >> 32), (uint32) checkPoint.redo, wasShutdown ? "TRUE" : "FALSE"))); ereport(DEBUG1, (errmsg_internal("next transaction ID: %u:%u; next OID: %u", @@ -6608,13 +6608,13 @@ StartupXLOG(void) checkPoint.nextOid))); ereport(DEBUG1, (errmsg_internal("next MultiXactId: %u; next MultiXactOffset: %u", - checkPoint.nextMulti, checkPoint.nextMultiOffset))); + checkPoint.nextMulti, checkPoint.nextMultiOffset))); ereport(DEBUG1, - (errmsg_internal("oldest unfrozen transaction ID: %u, in database %u", - checkPoint.oldestXid, checkPoint.oldestXidDB))); + (errmsg_internal("oldest unfrozen transaction ID: %u, in database %u", + checkPoint.oldestXid, checkPoint.oldestXidDB))); ereport(DEBUG1, (errmsg_internal("oldest MultiXactId: %u, in database %u", - checkPoint.oldestMulti, checkPoint.oldestMultiDB))); + checkPoint.oldestMulti, checkPoint.oldestMultiDB))); ereport(DEBUG1, (errmsg_internal("commit timestamp Xid oldest/newest: %u/%u", checkPoint.oldestCommitTsXid, @@ -6804,7 +6804,7 @@ StartupXLOG(void) ereport(FATAL, (errmsg("backup_label contains data inconsistent with control file"), errhint("This means that the backup is corrupted and you will " - "have to use another backup for recovery."))); + "have to use another backup for recovery."))); ControlFile->backupEndPoint = ControlFile->minRecoveryPoint; } } @@ -7010,7 +7010,7 @@ StartupXLOG(void) ereport(LOG, (errmsg("redo starts at %X/%X", - (uint32) (ReadRecPtr >> 32), (uint32) ReadRecPtr))); + (uint32) (ReadRecPtr >> 32), (uint32) ReadRecPtr))); /* * main redo apply loop @@ -7021,15 +7021,15 @@ StartupXLOG(void) #ifdef WAL_DEBUG if (XLOG_DEBUG || - (rmid == RM_XACT_ID && trace_recovery_messages <= DEBUG2) || + (rmid == RM_XACT_ID && trace_recovery_messages <= DEBUG2) || (rmid != RM_XACT_ID && trace_recovery_messages <= DEBUG3)) { StringInfoData buf; initStringInfo(&buf); appendStringInfo(&buf, "REDO @ %X/%X; LSN %X/%X: ", - (uint32) (ReadRecPtr >> 32), (uint32) ReadRecPtr, - (uint32) (EndRecPtr >> 32), (uint32) EndRecPtr); + (uint32) (ReadRecPtr >> 32), (uint32) ReadRecPtr, + (uint32) (EndRecPtr >> 32), (uint32) EndRecPtr); xlog_outrec(&buf, xlogreader); appendStringInfoString(&buf, " - "); xlog_outdesc(&buf, xlogreader); @@ -7282,12 +7282,12 @@ StartupXLOG(void) ereport(LOG, (errmsg("redo done at %X/%X", - (uint32) (ReadRecPtr >> 32), (uint32) ReadRecPtr))); + (uint32) (ReadRecPtr >> 32), (uint32) ReadRecPtr))); xtime = GetLatestXTime(); if (xtime) ereport(LOG, - (errmsg("last completed transaction was at log time %s", - timestamptz_to_str(xtime)))); + (errmsg("last completed transaction was at log time %s", + timestamptz_to_str(xtime)))); InRedo = false; } @@ -7378,7 +7378,7 @@ StartupXLOG(void) errhint("Online backup started with pg_start_backup() must be ended with pg_stop_backup(), and all WAL up to that point must be available at recovery."))); else ereport(FATAL, - (errmsg("WAL ends before consistent recovery point"))); + (errmsg("WAL ends before consistent recovery point"))); } } @@ -8026,7 +8026,7 @@ ReadCheckpointRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr, { case 1: ereport(LOG, - (errmsg("invalid primary checkpoint link in control file"))); + (errmsg("invalid primary checkpoint link in control file"))); break; case 2: ereport(LOG, @@ -8034,7 +8034,7 @@ ReadCheckpointRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr, break; default: ereport(LOG, - (errmsg("invalid checkpoint link in backup_label file"))); + (errmsg("invalid checkpoint link in backup_label file"))); break; } return NULL; @@ -8078,7 +8078,7 @@ ReadCheckpointRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr, break; default: ereport(LOG, - (errmsg("invalid resource manager ID in checkpoint record"))); + (errmsg("invalid resource manager ID in checkpoint record"))); break; } return NULL; @@ -8091,11 +8091,11 @@ ReadCheckpointRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr, { case 1: ereport(LOG, - (errmsg("invalid xl_info in primary checkpoint record"))); + (errmsg("invalid xl_info in primary checkpoint record"))); break; case 2: ereport(LOG, - (errmsg("invalid xl_info in secondary checkpoint record"))); + (errmsg("invalid xl_info in secondary checkpoint record"))); break; default: ereport(LOG, @@ -8110,11 +8110,11 @@ ReadCheckpointRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr, { case 1: ereport(LOG, - (errmsg("invalid length of primary checkpoint record"))); + (errmsg("invalid length of primary checkpoint record"))); break; case 2: ereport(LOG, - (errmsg("invalid length of secondary checkpoint record"))); + (errmsg("invalid length of secondary checkpoint record"))); break; default: ereport(LOG, @@ -9099,7 +9099,7 @@ CreateRestartPoint(int flags) if (!RecoveryInProgress()) { ereport(DEBUG2, - (errmsg("skipping restartpoint, recovery has already ended"))); + (errmsg("skipping restartpoint, recovery has already ended"))); LWLockRelease(CheckpointLock); return false; } @@ -9299,9 +9299,9 @@ CreateRestartPoint(int flags) xtime = GetLatestXTime(); ereport((log_checkpoints ? LOG : DEBUG2), (errmsg("recovery restart point at %X/%X", - (uint32) (lastCheckPoint.redo >> 32), (uint32) lastCheckPoint.redo), - xtime ? errdetail("last completed transaction was at log time %s", - timestamptz_to_str(xtime)) : 0)); + (uint32) (lastCheckPoint.redo >> 32), (uint32) lastCheckPoint.redo), + xtime ? errdetail("last completed transaction was at log time %s", + timestamptz_to_str(xtime)) : 0)); LWLockRelease(CheckpointLock); @@ -9573,8 +9573,8 @@ checkTimeLineSwitch(XLogRecPtr lsn, TimeLineID newTLI, TimeLineID prevTLI) */ if (newTLI < ThisTimeLineID || !tliInHistory(newTLI, expectedTLEs)) ereport(PANIC, - (errmsg("unexpected timeline ID %u (after %u) in checkpoint record", - newTLI, ThisTimeLineID))); + (errmsg("unexpected timeline ID %u (after %u) in checkpoint record", + newTLI, ThisTimeLineID))); /* * If we have not yet reached min recovery point, and we're about to @@ -9665,7 +9665,7 @@ xlog_redo(XLogReaderState *record) !XLogRecPtrIsInvalid(ControlFile->backupStartPoint) && XLogRecPtrIsInvalid(ControlFile->backupEndPoint)) ereport(PANIC, - (errmsg("online backup was canceled, recovery cannot continue"))); + (errmsg("online backup was canceled, recovery cannot continue"))); /* * If we see a shutdown checkpoint, we know that nothing was running @@ -10068,7 +10068,7 @@ assign_xlog_sync_method(int new_sync_method, void *extra) ereport(PANIC, (errcode_for_file_access(), errmsg("could not fsync log segment %s: %m", - XLogFileNameP(ThisTimeLineID, openLogSegNo)))); + XLogFileNameP(ThisTimeLineID, openLogSegNo)))); pgstat_report_wait_end(); if (get_sync_bit(sync_method) != get_sync_bit(new_sync_method)) XLogFileClose(); @@ -10100,8 +10100,8 @@ issue_xlog_fsync(int fd, XLogSegNo segno) if (pg_fsync_writethrough(fd) != 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("could not fsync write-through log file %s: %m", - XLogFileNameP(ThisTimeLineID, segno)))); + errmsg("could not fsync write-through log file %s: %m", + XLogFileNameP(ThisTimeLineID, segno)))); break; #endif #ifdef HAVE_FDATASYNC @@ -10209,7 +10209,7 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p, if (!backup_started_in_recovery && !XLogIsNeeded()) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("WAL level not sufficient for making an online backup"), + errmsg("WAL level not sufficient for making an online backup"), errhint("wal_level must be set to \"replica\" or \"logical\" at server start."))); if (strlen(backupidstr) > MAXPGPATH) @@ -10347,13 +10347,13 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p, if (!checkpointfpw || startpoint <= recptr) ereport(ERROR, - (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("WAL generated with full_page_writes=off was replayed " - "since last restartpoint"), - errhint("This means that the backup being taken on the standby " - "is corrupt and should not be used. " - "Enable full_page_writes and run CHECKPOINT on the master, " - "and then try an online backup again."))); + (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), + errmsg("WAL generated with full_page_writes=off was replayed " + "since last restartpoint"), + errhint("This means that the backup being taken on the standby " + "is corrupt and should not be used. " + "Enable full_page_writes and run CHECKPOINT on the master, " + "and then try an online backup again."))); /* * During recovery, since we don't use the end-of-backup WAL @@ -10477,7 +10477,7 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p, */ ereport(WARNING, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("tablespaces are not supported on this platform"))); + errmsg("tablespaces are not supported on this platform"))); #endif } @@ -10493,9 +10493,9 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p, "%Y-%m-%d %H:%M:%S %Z", pg_localtime(&stamp_time, log_timezone)); appendStringInfo(labelfile, "START WAL LOCATION: %X/%X (file %s)\n", - (uint32) (startpoint >> 32), (uint32) startpoint, xlogfilename); + (uint32) (startpoint >> 32), (uint32) startpoint, xlogfilename); appendStringInfo(labelfile, "CHECKPOINT LOCATION: %X/%X\n", - (uint32) (checkpointloc >> 32), (uint32) checkpointloc); + (uint32) (checkpointloc >> 32), (uint32) checkpointloc); appendStringInfo(labelfile, "BACKUP METHOD: %s\n", exclusive ? "pg_start_backup" : "streamed"); appendStringInfo(labelfile, "BACKUP FROM: %s\n", @@ -10562,10 +10562,10 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p, } else ereport(ERROR, - (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("a backup is already in progress"), - errhint("If you're sure there is no backup in progress, remove file \"%s\" and try again.", - TABLESPACE_MAP))); + (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), + errmsg("a backup is already in progress"), + errhint("If you're sure there is no backup in progress, remove file \"%s\" and try again.", + TABLESPACE_MAP))); fp = AllocateFile(TABLESPACE_MAP, "w"); @@ -10727,7 +10727,7 @@ do_pg_stop_backup(char *labelfile, bool waitforarchive, TimeLineID *stoptli_p) if (!backup_started_in_recovery && !XLogIsNeeded()) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("WAL level not sufficient for making an online backup"), + errmsg("WAL level not sufficient for making an online backup"), errhint("wal_level must be set to \"replica\" or \"logical\" at server start."))); if (exclusive) @@ -10906,12 +10906,12 @@ do_pg_stop_backup(char *labelfile, bool waitforarchive, TimeLineID *stoptli_p) if (startpoint <= recptr) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("WAL generated with full_page_writes=off was replayed " - "during online backup"), - errhint("This means that the backup being taken on the standby " - "is corrupt and should not be used. " - "Enable full_page_writes and run CHECKPOINT on the master, " - "and then try an online backup again."))); + errmsg("WAL generated with full_page_writes=off was replayed " + "during online backup"), + errhint("This means that the backup being taken on the standby " + "is corrupt and should not be used. " + "Enable full_page_writes and run CHECKPOINT on the master, " + "and then try an online backup again."))); LWLockAcquire(ControlFileLock, LW_SHARED); @@ -10960,7 +10960,7 @@ do_pg_stop_backup(char *labelfile, bool waitforarchive, TimeLineID *stoptli_p) errmsg("could not create file \"%s\": %m", histfilepath))); fprintf(fp, "START WAL LOCATION: %X/%X (file %s)\n", - (uint32) (startpoint >> 32), (uint32) startpoint, startxlogfilename); + (uint32) (startpoint >> 32), (uint32) startpoint, startxlogfilename); fprintf(fp, "STOP WAL LOCATION: %X/%X (file %s)\n", (uint32) (stoppoint >> 32), (uint32) stoppoint, stopxlogfilename); /* transfer remaining lines from label to history file */ @@ -11287,7 +11287,7 @@ read_tablespace_map(List **tablespaces) if (sscanf(str, "%s %n", tbsoid, &n) != 1) ereport(FATAL, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("invalid data in file \"%s\"", TABLESPACE_MAP))); + errmsg("invalid data in file \"%s\"", TABLESPACE_MAP))); tbslinkpath = str + n; i = 0; @@ -11760,7 +11760,7 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess, */ now = GetCurrentTimestamp(); if (!TimestampDifferenceExceeds(last_fail_time, now, - wal_retrieve_retry_interval)) + wal_retrieve_retry_interval)) { long secs, wait_time; @@ -11771,7 +11771,7 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess, (secs * 1000 + usecs / 1000); WaitLatch(&XLogCtl->recoveryWakeupLatch, - WL_LATCH_SET | WL_TIMEOUT | WL_POSTMASTER_DEATH, + WL_LATCH_SET | WL_TIMEOUT | WL_POSTMASTER_DEATH, wait_time, WAIT_EVENT_RECOVERY_WAL_STREAM); ResetLatch(&XLogCtl->recoveryWakeupLatch); now = GetCurrentTimestamp(); @@ -11825,7 +11825,7 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess, * file from pg_wal. */ readFile = XLogFileReadAnyTLI(readSegNo, DEBUG2, - currentSource == XLOG_FROM_ARCHIVE ? XLOG_FROM_ANY : + currentSource == XLOG_FROM_ARCHIVE ? XLOG_FROM_ANY : currentSource); if (readFile >= 0) return true; /* success! */ diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c index c46325dfaf..f9b49ba498 100644 --- a/src/backend/access/transam/xlogfuncs.c +++ b/src/backend/access/transam/xlogfuncs.c @@ -110,7 +110,7 @@ pg_start_backup(PG_FUNCTION_ARGS) MemoryContextSwitchTo(oldcontext); startpoint = do_pg_start_backup(backupidstr, fast, NULL, label_file, - dir, NULL, tblspc_map_file, false, true); + dir, NULL, tblspc_map_file, false, true); before_shmem_exit(nonexclusive_base_backup_cleanup, (Datum) 0); } @@ -326,7 +326,7 @@ pg_create_restore_point(PG_FUNCTION_ARGS) if (!XLogIsNeeded()) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("WAL level not sufficient for creating a restore point"), + errmsg("WAL level not sufficient for creating a restore point"), errhint("wal_level must be set to \"replica\" or \"logical\" at server start."))); restore_name_str = text_to_cstring(restore_name); @@ -528,7 +528,7 @@ pg_walfile_name(PG_FUNCTION_ARGS) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("recovery is in progress"), - errhint("pg_walfile_name() cannot be executed during recovery."))); + errhint("pg_walfile_name() cannot be executed during recovery."))); XLByteToPrevSeg(locationpoint, xlogsegno); XLogFileName(xlogfilename, ThisTimeLineID, xlogsegno); @@ -684,13 +684,13 @@ pg_backup_start_time(PG_FUNCTION_ARGS) if (ferror(lfp)) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not read file \"%s\": %m", BACKUP_LABEL_FILE))); + errmsg("could not read file \"%s\": %m", BACKUP_LABEL_FILE))); /* Close the backup label file. */ if (FreeFile(lfp)) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not close file \"%s\": %m", BACKUP_LABEL_FILE))); + errmsg("could not close file \"%s\": %m", BACKUP_LABEL_FILE))); if (strlen(backup_start_time) == 0) ereport(ERROR, diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c index c9cc6636d3..3af03ecdb1 100644 --- a/src/backend/access/transam/xloginsert.c +++ b/src/backend/access/transam/xloginsert.c @@ -175,7 +175,7 @@ XLogEnsureRecordSpace(int max_block_id, int ndatas) * they are included in WAL data, but initialize it all for tidiness. */ MemSet(®istered_buffers[max_registered_buffers], 0, - (nbuffers - max_registered_buffers) * sizeof(registered_buffer)); + (nbuffers - max_registered_buffers) * sizeof(registered_buffer)); max_registered_buffers = nbuffers; } @@ -1039,7 +1039,7 @@ InitXLogInsert(void) { registered_buffers = (registered_buffer *) MemoryContextAllocZero(xloginsert_cxt, - sizeof(registered_buffer) * (XLR_NORMAL_MAX_BLOCK_ID + 1)); + sizeof(registered_buffer) * (XLR_NORMAL_MAX_BLOCK_ID + 1)); max_registered_buffers = XLR_NORMAL_MAX_BLOCK_ID + 1; } if (rdatas == NULL) diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c index d6b857f109..0781a7b9de 100644 --- a/src/backend/access/transam/xlogreader.c +++ b/src/backend/access/transam/xlogreader.c @@ -30,7 +30,7 @@ static bool allocate_recordbuf(XLogReaderState *state, uint32 reclength); static bool ValidXLogPageHeader(XLogReaderState *state, XLogRecPtr recptr, XLogPageHeader hdr); static bool ValidXLogRecordHeader(XLogReaderState *state, XLogRecPtr RecPtr, - XLogRecPtr PrevRecPtr, XLogRecord *record, bool randAccess); + XLogRecPtr PrevRecPtr, XLogRecord *record, bool randAccess); static bool ValidXLogRecord(XLogReaderState *state, XLogRecord *record, XLogRecPtr recptr); static int ReadPageInternal(XLogReaderState *state, XLogRecPtr pageptr, @@ -254,7 +254,7 @@ XLogReadRecord(XLogReaderState *state, XLogRecPtr RecPtr, char **errormsg) */ readOff = ReadPageInternal(state, targetPagePtr, - Min(targetRecOff + SizeOfXLogRecord, XLOG_BLCKSZ)); + Min(targetRecOff + SizeOfXLogRecord, XLOG_BLCKSZ)); if (readOff < 0) goto err; @@ -322,7 +322,7 @@ XLogReadRecord(XLogReaderState *state, XLogRecPtr RecPtr, char **errormsg) if (total_len < SizeOfXLogRecord) { report_invalid_record(state, - "invalid record length at %X/%X: wanted %u, got %u", + "invalid record length at %X/%X: wanted %u, got %u", (uint32) (RecPtr >> 32), (uint32) RecPtr, (uint32) SizeOfXLogRecord, total_len); goto err; @@ -365,8 +365,8 @@ XLogReadRecord(XLogReaderState *state, XLogRecPtr RecPtr, char **errormsg) /* Wait for the next page to become available */ readOff = ReadPageInternal(state, targetPagePtr, - Min(total_len - gotlen + SizeOfXLogShortPHD, - XLOG_BLCKSZ)); + Min(total_len - gotlen + SizeOfXLogShortPHD, + XLOG_BLCKSZ)); if (readOff < 0) goto err; @@ -379,7 +379,7 @@ XLogReadRecord(XLogReaderState *state, XLogRecPtr RecPtr, char **errormsg) { report_invalid_record(state, "there is no contrecord flag at %X/%X", - (uint32) (RecPtr >> 32), (uint32) RecPtr); + (uint32) (RecPtr >> 32), (uint32) RecPtr); goto err; } @@ -393,7 +393,7 @@ XLogReadRecord(XLogReaderState *state, XLogRecPtr RecPtr, char **errormsg) report_invalid_record(state, "invalid contrecord length %u at %X/%X", pageHeader->xlp_rem_len, - (uint32) (RecPtr >> 32), (uint32) RecPtr); + (uint32) (RecPtr >> 32), (uint32) RecPtr); goto err; } @@ -445,7 +445,7 @@ XLogReadRecord(XLogReaderState *state, XLogRecPtr RecPtr, char **errormsg) { /* Wait for the record data to become available */ readOff = ReadPageInternal(state, targetPagePtr, - Min(targetRecOff + total_len, XLOG_BLCKSZ)); + Min(targetRecOff + total_len, XLOG_BLCKSZ)); if (readOff < 0) goto err; @@ -622,7 +622,7 @@ ValidXLogRecordHeader(XLogReaderState *state, XLogRecPtr RecPtr, if (record->xl_tot_len < SizeOfXLogRecord) { report_invalid_record(state, - "invalid record length at %X/%X: wanted %u, got %u", + "invalid record length at %X/%X: wanted %u, got %u", (uint32) (RecPtr >> 32), (uint32) RecPtr, (uint32) SizeOfXLogRecord, record->xl_tot_len); return false; @@ -644,7 +644,7 @@ ValidXLogRecordHeader(XLogReaderState *state, XLogRecPtr RecPtr, if (!(record->xl_prev < RecPtr)) { report_invalid_record(state, - "record with incorrect prev-link %X/%X at %X/%X", + "record with incorrect prev-link %X/%X at %X/%X", (uint32) (record->xl_prev >> 32), (uint32) record->xl_prev, (uint32) (RecPtr >> 32), (uint32) RecPtr); @@ -661,7 +661,7 @@ ValidXLogRecordHeader(XLogReaderState *state, XLogRecPtr RecPtr, if (record->xl_prev != PrevRecPtr) { report_invalid_record(state, - "record with incorrect prev-link %X/%X at %X/%X", + "record with incorrect prev-link %X/%X at %X/%X", (uint32) (record->xl_prev >> 32), (uint32) record->xl_prev, (uint32) (RecPtr >> 32), (uint32) RecPtr); @@ -698,7 +698,7 @@ ValidXLogRecord(XLogReaderState *state, XLogRecord *record, XLogRecPtr recptr) if (!EQ_CRC32C(record->xl_crc, crc)) { report_invalid_record(state, - "incorrect resource manager data checksum in record at %X/%X", + "incorrect resource manager data checksum in record at %X/%X", (uint32) (recptr >> 32), (uint32) recptr); return false; } @@ -731,7 +731,7 @@ ValidXLogPageHeader(XLogReaderState *state, XLogRecPtr recptr, XLogFileName(fname, state->readPageTLI, segno); report_invalid_record(state, - "invalid magic number %04X in log segment %s, offset %u", + "invalid magic number %04X in log segment %s, offset %u", hdr->xlp_magic, fname, offset); @@ -745,7 +745,7 @@ ValidXLogPageHeader(XLogReaderState *state, XLogRecPtr recptr, XLogFileName(fname, state->readPageTLI, segno); report_invalid_record(state, - "invalid info bits %04X in log segment %s, offset %u", + "invalid info bits %04X in log segment %s, offset %u", hdr->xlp_info, fname, offset); @@ -796,7 +796,7 @@ ValidXLogPageHeader(XLogReaderState *state, XLogRecPtr recptr, /* hmm, first page of file doesn't have a long header? */ report_invalid_record(state, - "invalid info bits %04X in log segment %s, offset %u", + "invalid info bits %04X in log segment %s, offset %u", hdr->xlp_info, fname, offset); @@ -810,8 +810,8 @@ ValidXLogPageHeader(XLogReaderState *state, XLogRecPtr recptr, XLogFileName(fname, state->readPageTLI, segno); report_invalid_record(state, - "unexpected pageaddr %X/%X in log segment %s, offset %u", - (uint32) (hdr->xlp_pageaddr >> 32), (uint32) hdr->xlp_pageaddr, + "unexpected pageaddr %X/%X in log segment %s, offset %u", + (uint32) (hdr->xlp_pageaddr >> 32), (uint32) hdr->xlp_pageaddr, fname, offset); return false; @@ -1103,14 +1103,14 @@ DecodeXLogRecord(XLogReaderState *state, XLogRecord *record, char **errormsg) if (blk->has_data && blk->data_len == 0) { report_invalid_record(state, - "BKPBLOCK_HAS_DATA set, but no data included at %X/%X", + "BKPBLOCK_HAS_DATA set, but no data included at %X/%X", (uint32) (state->ReadRecPtr >> 32), (uint32) state->ReadRecPtr); goto err; } if (!blk->has_data && blk->data_len != 0) { report_invalid_record(state, - "BKPBLOCK_HAS_DATA not set, but data length is %u at %X/%X", + "BKPBLOCK_HAS_DATA not set, but data length is %u at %X/%X", (unsigned int) blk->data_len, (uint32) (state->ReadRecPtr >> 32), (uint32) state->ReadRecPtr); goto err; @@ -1208,7 +1208,7 @@ DecodeXLogRecord(XLogReaderState *state, XLogRecord *record, char **errormsg) if (rnode == NULL) { report_invalid_record(state, - "BKPBLOCK_SAME_REL set but no previous rel at %X/%X", + "BKPBLOCK_SAME_REL set but no previous rel at %X/%X", (uint32) (state->ReadRecPtr >> 32), (uint32) state->ReadRecPtr); goto err; } @@ -1289,7 +1289,7 @@ DecodeXLogRecord(XLogReaderState *state, XLogRecord *record, char **errormsg) shortdata_err: report_invalid_record(state, "record with invalid length at %X/%X", - (uint32) (state->ReadRecPtr >> 32), (uint32) state->ReadRecPtr); + (uint32) (state->ReadRecPtr >> 32), (uint32) state->ReadRecPtr); err: *errormsg = state->errormsg_buf; @@ -1305,7 +1305,7 @@ err: */ bool XLogRecGetBlockTag(XLogReaderState *record, uint8 block_id, - RelFileNode *rnode, ForkNumber *forknum, BlockNumber *blknum) + RelFileNode *rnode, ForkNumber *forknum, BlockNumber *blknum) { DecodedBkpBlock *bkpb; diff --git a/src/backend/access/transam/xlogutils.c b/src/backend/access/transam/xlogutils.c index 7430a1f77b..bbae733d65 100644 --- a/src/backend/access/transam/xlogutils.c +++ b/src/backend/access/transam/xlogutils.c @@ -359,7 +359,7 @@ XLogReadBufferForRedoExtended(XLogReaderState *record, { Assert(XLogRecHasBlockImage(record, block_id)); *buf = XLogReadBufferExtended(rnode, forknum, blkno, - get_cleanup_lock ? RBM_ZERO_AND_CLEANUP_LOCK : RBM_ZERO_AND_LOCK); + get_cleanup_lock ? RBM_ZERO_AND_CLEANUP_LOCK : RBM_ZERO_AND_LOCK); page = BufferGetPage(*buf); if (!RestoreBlockImage(record, block_id, page)) elog(ERROR, "failed to restore block image"); @@ -721,8 +721,8 @@ XLogRead(char *buf, TimeLineID tli, XLogRecPtr startptr, Size count) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not seek in log segment %s to offset %u: %m", - path, startoff))); + errmsg("could not seek in log segment %s to offset %u: %m", + path, startoff))); } sendOff = startoff; } diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index b9573973d2..b3f0b3cc92 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -845,7 +845,7 @@ InsertOneNull(int i) Assert(i >= 0 && i < MAXATTR); if (boot_reldesc->rd_att->attrs[i]->attnotnull) elog(ERROR, - "NULL value specified for not-null column \"%s\" of relation \"%s\"", + "NULL value specified for not-null column \"%s\" of relation \"%s\"", NameStr(boot_reldesc->rd_att->attrs[i]->attname), RelationGetRelationName(boot_reldesc)); values[i] = PointerGetDatum(NULL); diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c index de0a1ba833..b7b5e49c9f 100644 --- a/src/backend/catalog/aclchk.c +++ b/src/backend/catalog/aclchk.c @@ -212,8 +212,8 @@ merge_acl_with_grant(Acl *old_acl, bool is_grant, * option, while REVOKE GRANT OPTION revokes only the option. */ ACLITEM_SET_PRIVS_GOPTIONS(aclitem, - (is_grant || !grant_option) ? privileges : ACL_NO_RIGHTS, - (!is_grant || grant_option) ? privileges : ACL_NO_RIGHTS); + (is_grant || !grant_option) ? privileges : ACL_NO_RIGHTS, + (!is_grant || grant_option) ? privileges : ACL_NO_RIGHTS); newer_acl = aclupdate(new_acl, &aclitem, modechg, ownerId, behavior); @@ -370,8 +370,8 @@ restrict_and_check_grant(bool is_grant, AclMode avail_goptions, bool all_privs, else ereport(WARNING, (errcode(ERRCODE_WARNING_PRIVILEGE_NOT_REVOKED), - errmsg("not all privileges could be revoked for \"%s\"", - objname))); + errmsg("not all privileges could be revoked for \"%s\"", + objname))); } } @@ -994,7 +994,7 @@ ExecAlterDefaultPrivilegesStmt(ParseState *pstate, AlterDefaultPrivilegesStmt *s if (privnode->cols) ereport(ERROR, (errcode(ERRCODE_INVALID_GRANT_OPERATION), - errmsg("default privileges cannot be set for columns"))); + errmsg("default privileges cannot be set for columns"))); if (privnode->priv_name == NULL) /* parser mistake? */ elog(ERROR, "AccessPriv node must specify privilege"); @@ -2383,7 +2383,7 @@ ExecGrant_ForeignServer(InternalGrant *istmt) this_privileges = restrict_and_check_grant(istmt->is_grant, avail_goptions, istmt->all_privs, istmt->privileges, - srvid, grantorId, ACL_KIND_FOREIGN_SERVER, + srvid, grantorId, ACL_KIND_FOREIGN_SERVER, NameStr(pg_server_tuple->srvname), 0, NULL); @@ -2603,7 +2603,7 @@ ExecGrant_Language(InternalGrant *istmt) errmsg("language \"%s\" is not trusted", NameStr(pg_language_tuple->lanname)), errdetail("GRANT and REVOKE are not allowed on untrusted languages, " - "because only superusers can use untrusted languages."))); + "because only superusers can use untrusted languages."))); /* * Get owner ID and working copy of existing ACL. If there's no ACL, @@ -3117,7 +3117,7 @@ ExecGrant_Type(InternalGrant *istmt) ereport(ERROR, (errcode(ERRCODE_INVALID_GRANT_OPERATION), errmsg("cannot set privileges of array types"), - errhint("Set the privileges of the element type instead."))); + errhint("Set the privileges of the element type instead."))); /* Used GRANT DOMAIN on a non-domain? */ if (istmt->objtype == ACL_OBJECT_DOMAIN && @@ -3433,8 +3433,8 @@ aclcheck_error_col(AclResult aclerr, AclObjectKind objectkind, case ACLCHECK_NO_PRIV: ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("permission denied for column \"%s\" of relation \"%s\"", - colname, objectname))); + errmsg("permission denied for column \"%s\" of relation \"%s\"", + colname, objectname))); break; case ACLCHECK_NOT_OWNER: /* relation msg is OK since columns don't have separate owners */ @@ -4866,8 +4866,8 @@ pg_ts_config_ownercheck(Oid cfg_oid, Oid roleid) if (!HeapTupleIsValid(tuple)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("text search configuration with OID %u does not exist", - cfg_oid))); + errmsg("text search configuration with OID %u does not exist", + cfg_oid))); ownerId = ((Form_pg_ts_config) GETSTRUCT(tuple))->cfgowner; diff --git a/src/backend/catalog/dependency.c b/src/backend/catalog/dependency.c index b12b36ed34..1a7645d341 100644 --- a/src/backend/catalog/dependency.c +++ b/src/backend/catalog/dependency.c @@ -956,8 +956,8 @@ reportDependentObjects(const ObjectAddresses *targetObjects, if (origObject) ereport(ERROR, (errcode(ERRCODE_DEPENDENT_OBJECTS_STILL_EXIST), - errmsg("cannot drop %s because other objects depend on it", - getObjectDescription(origObject)), + errmsg("cannot drop %s because other objects depend on it", + getObjectDescription(origObject)), errdetail("%s", clientdetail.data), errdetail_log("%s", logdetail.data), errhint("Use DROP ... CASCADE to drop the dependent objects too."))); @@ -1632,8 +1632,8 @@ find_expr_references_walker(Node *node, case REGROLEOID: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("constant of the type %s cannot be used here", - "regrole"))); + errmsg("constant of the type %s cannot be used here", + "regrole"))); break; } } diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index 8052dcc288..a376b99f1e 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -282,7 +282,7 @@ heap_create(const char *relname, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), errmsg("permission denied to create \"%s.%s\"", get_namespace_name(relnamespace), relname), - errdetail("System catalog modifications are currently disallowed."))); + errdetail("System catalog modifications are currently disallowed."))); /* * Decide if we need storage or not, and handle a couple other special @@ -534,8 +534,8 @@ CheckAttributeType(const char *attname, if (list_member_oid(containing_rowtypes, atttypid)) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("composite type %s cannot be made a member of itself", - format_type_be(atttypid)))); + errmsg("composite type %s cannot be made a member of itself", + format_type_be(atttypid)))); containing_rowtypes = lcons_oid(atttypid, containing_rowtypes); @@ -578,7 +578,7 @@ CheckAttributeType(const char *attname, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), errmsg("no collation was derived for column \"%s\" with collatable type %s", attname, format_type_be(atttypid)), - errhint("Use the COLLATE clause to set the collation explicitly."))); + errhint("Use the COLLATE clause to set the collation explicitly."))); } /* @@ -1081,9 +1081,9 @@ heap_create_with_catalog(const char *relname, ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), errmsg("type \"%s\" already exists", relname), - errhint("A relation has an associated type of the same name, " - "so you must use a name that doesn't conflict " - "with any existing type."))); + errhint("A relation has an associated type of the same name, " + "so you must use a name that doesn't conflict " + "with any existing type."))); } /* @@ -1923,8 +1923,8 @@ StoreAttrDefault(Relation rel, AttrNumber attnum, * Also deparse it to form the mostly-obsolete adsrc field. */ adsrc = deparse_expression(expr, - deparse_context_for(RelationGetRelationName(rel), - RelationGetRelid(rel)), + deparse_context_for(RelationGetRelationName(rel), + RelationGetRelid(rel)), false, false); /* @@ -2031,8 +2031,8 @@ StoreRelCheck(Relation rel, char *ccname, Node *expr, * Also deparse it to form the mostly-obsolete consrc field. */ ccsrc = deparse_expression(expr, - deparse_context_for(RelationGetRelationName(rel), - RelationGetRelid(rel)), + deparse_context_for(RelationGetRelationName(rel), + RelationGetRelid(rel)), false, false); /* @@ -2075,8 +2075,8 @@ StoreRelCheck(Relation rel, char *ccname, Node *expr, rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("cannot add NO INHERIT constraint to partitioned table \"%s\"", - RelationGetRelationName(rel)))); + errmsg("cannot add NO INHERIT constraint to partitioned table \"%s\"", + RelationGetRelationName(rel)))); /* * Create the Check Constraint @@ -2501,8 +2501,8 @@ MergeWithExistingConstraint(Relation rel, char *ccname, Node *expr, if (!found || !allow_merge) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("constraint \"%s\" for relation \"%s\" already exists", - ccname, RelationGetRelationName(rel)))); + errmsg("constraint \"%s\" for relation \"%s\" already exists", + ccname, RelationGetRelationName(rel)))); /* If the child constraint is "no inherit" then cannot merge */ if (con->connoinherit) @@ -2534,8 +2534,8 @@ MergeWithExistingConstraint(Relation rel, char *ccname, Node *expr, /* OK to update the tuple */ ereport(NOTICE, - (errmsg("merging constraint \"%s\" with inherited definition", - ccname))); + (errmsg("merging constraint \"%s\" with inherited definition", + ccname))); tup = heap_copytuple(tup); con = (Form_pg_constraint) GETSTRUCT(tup); @@ -2650,7 +2650,7 @@ cookDefault(ParseState *pstate, if (contain_var_clause(expr)) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("cannot use column references in default expression"))); + errmsg("cannot use column references in default expression"))); /* * transformExpr() should have already rejected subqueries, aggregates, @@ -2680,7 +2680,7 @@ cookDefault(ParseState *pstate, attname, format_type_be(atttypid), format_type_be(type_id)), - errhint("You will need to rewrite or cast the expression."))); + errhint("You will need to rewrite or cast the expression."))); } /* @@ -2727,8 +2727,8 @@ cookConstraint(ParseState *pstate, if (list_length(pstate->p_rtable) != 1) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("only table \"%s\" can be referenced in check constraint", - relname))); + errmsg("only table \"%s\" can be referenced in check constraint", + relname))); return expr; } @@ -2976,9 +2976,9 @@ heap_truncate_check_FKs(List *relations, bool tempTables) errmsg("cannot truncate a table referenced in a foreign key constraint"), errdetail("Table \"%s\" references \"%s\".", relname2, relname), - errhint("Truncate table \"%s\" at the same time, " - "or use TRUNCATE ... CASCADE.", - relname2))); + errhint("Truncate table \"%s\" at the same time, " + "or use TRUNCATE ... CASCADE.", + relname2))); } } } diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index 549a2d19c6..027abd56b0 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -207,8 +207,8 @@ index_check_primary_key(Relation heapRel, { ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("multiple primary keys for table \"%s\" are not allowed", - RelationGetRelationName(heapRel)))); + errmsg("multiple primary keys for table \"%s\" are not allowed", + RelationGetRelationName(heapRel)))); } /* @@ -232,7 +232,7 @@ index_check_primary_key(Relation heapRel, continue; atttuple = SearchSysCache2(ATTNUM, - ObjectIdGetDatum(RelationGetRelid(heapRel)), + ObjectIdGetDatum(RelationGetRelid(heapRel)), Int16GetDatum(attnum)); if (!HeapTupleIsValid(atttuple)) elog(ERROR, "cache lookup failed for attribute %d of relation %u", @@ -325,7 +325,7 @@ ConstructTupleDescriptor(Relation heapRelation, * here we are indexing on a system attribute (-1...-n) */ from = SystemAttributeDefinition(atnum, - heapRelation->rd_rel->relhasoids); + heapRelation->rd_rel->relhasoids); } else { @@ -1038,7 +1038,7 @@ index_create(Relation heapRelation, if (indexInfo->ii_Expressions) { recordDependencyOnSingleRelExpr(&myself, - (Node *) indexInfo->ii_Expressions, + (Node *) indexInfo->ii_Expressions, heapRelationId, DEPENDENCY_NORMAL, DEPENDENCY_AUTO, false); @@ -3329,7 +3329,7 @@ reindex_index(Oid indexId, bool skip_constraint_checks, char persistence, if (RELATION_IS_OTHER_TEMP(iRel)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot reindex temporary tables of other sessions"))); + errmsg("cannot reindex temporary tables of other sessions"))); /* * Also check for active uses of the index in the current transaction; we diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c index 2938501917..64f6feef9d 100644 --- a/src/backend/catalog/namespace.c +++ b/src/backend/catalog/namespace.c @@ -217,7 +217,7 @@ static bool MatchNamedCall(HeapTuple proctup, int nargs, List *argnames, Oid RangeVarGetRelidExtended(const RangeVar *relation, LOCKMODE lockmode, bool missing_ok, bool nowait, - RangeVarGetRelidCallback callback, void *callback_arg) + RangeVarGetRelidCallback callback, void *callback_arg) { uint64 inval_count; Oid relId; @@ -2751,14 +2751,14 @@ DeconstructQualifiedName(List *names, if (strcmp(catalogname, get_database_name(MyDatabaseId)) != 0) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cross-database references are not implemented: %s", - NameListToString(names)))); + errmsg("cross-database references are not implemented: %s", + NameListToString(names)))); break; default: ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("improper qualified name (too many dotted names): %s", - NameListToString(names)))); + errmsg("improper qualified name (too many dotted names): %s", + NameListToString(names)))); break; } @@ -2888,7 +2888,7 @@ CheckSetNamespace(Oid oldNspOid, Oid nspOid) if (isAnyTempNamespace(nspOid) || isAnyTempNamespace(oldNspOid)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot move objects into or out of temporary schemas"))); + errmsg("cannot move objects into or out of temporary schemas"))); /* same for TOAST schema */ if (nspOid == PG_TOAST_NAMESPACE || oldNspOid == PG_TOAST_NAMESPACE) @@ -2998,8 +2998,8 @@ makeRangeVarFromNameList(List *names) default: ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("improper relation name (too many dotted names): %s", - NameListToString(names)))); + errmsg("improper relation name (too many dotted names): %s", + NameListToString(names)))); break; } @@ -3099,7 +3099,7 @@ bool isTempOrTempToastNamespace(Oid namespaceId) { if (OidIsValid(myTempNamespace) && - (myTempNamespace == namespaceId || myTempToastNamespace == namespaceId)) + (myTempNamespace == namespaceId || myTempToastNamespace == namespaceId)) return true; return false; } diff --git a/src/backend/catalog/objectaddress.c b/src/backend/catalog/objectaddress.c index b882d5f0e1..6cac2dfd1d 100644 --- a/src/backend/catalog/objectaddress.c +++ b/src/backend/catalog/objectaddress.c @@ -853,13 +853,13 @@ get_object_address(ObjectType objtype, Node *object, objlist = castNode(List, object); domaddr = get_object_address_type(OBJECT_DOMAIN, - linitial_node(TypeName, objlist), + linitial_node(TypeName, objlist), missing_ok); constrname = strVal(lsecond(objlist)); address.classId = ConstraintRelationId; address.objectId = get_domain_constraint_oid(domaddr.objectId, - constrname, missing_ok); + constrname, missing_ok); address.objectSubId = 0; } @@ -877,7 +877,7 @@ get_object_address(ObjectType objtype, Node *object, case OBJECT_PUBLICATION: case OBJECT_SUBSCRIPTION: address = get_object_address_unqualified(objtype, - (Value *) object, missing_ok); + (Value *) object, missing_ok); break; case OBJECT_TYPE: case OBJECT_DOMAIN: @@ -1622,11 +1622,11 @@ get_object_address_opf_member(ObjectType objtype, if (!missing_ok) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("operator %d (%s, %s) of %s does not exist", - membernum, - TypeNameToString(typenames[0]), - TypeNameToString(typenames[1]), - getObjectDescription(&famaddr)))); + errmsg("operator %d (%s, %s) of %s does not exist", + membernum, + TypeNameToString(typenames[0]), + TypeNameToString(typenames[1]), + getObjectDescription(&famaddr)))); } else { @@ -1653,11 +1653,11 @@ get_object_address_opf_member(ObjectType objtype, if (!missing_ok) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("function %d (%s, %s) of %s does not exist", - membernum, - TypeNameToString(typenames[0]), - TypeNameToString(typenames[1]), - getObjectDescription(&famaddr)))); + errmsg("function %d (%s, %s) of %s does not exist", + membernum, + TypeNameToString(typenames[0]), + TypeNameToString(typenames[1]), + getObjectDescription(&famaddr)))); } else { @@ -1848,7 +1848,7 @@ get_object_address_defacl(List *object, bool missing_ok) default: ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("unrecognized default ACL object type \"%c\"", objtype), + errmsg("unrecognized default ACL object type \"%c\"", objtype), errhint("Valid object types are \"%c\", \"%c\", \"%c\", \"%c\", \"%c\".", DEFACLOBJ_RELATION, DEFACLOBJ_SEQUENCE, @@ -1905,8 +1905,8 @@ not_found: else ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("default ACL for user \"%s\" on %s does not exist", - username, objtype_str))); + errmsg("default ACL for user \"%s\" on %s does not exist", + username, objtype_str))); } return address; } @@ -2045,9 +2045,9 @@ pg_get_object_address(PG_FUNCTION_ARGS) if (nulls[i]) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("name or argument lists may not contain nulls"))); + errmsg("name or argument lists may not contain nulls"))); args = lappend(args, - typeStringToTypeName(TextDatumGetCString(elems[i]))); + typeStringToTypeName(TextDatumGetCString(elems[i]))); } } else @@ -2071,7 +2071,7 @@ pg_get_object_address(PG_FUNCTION_ARGS) if (list_length(args) != 1) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("argument list length must be exactly %d", 1))); + errmsg("argument list length must be exactly %d", 1))); break; case OBJECT_OPFAMILY: case OBJECT_OPCLASS: @@ -2091,7 +2091,7 @@ pg_get_object_address(PG_FUNCTION_ARGS) if (list_length(args) != 2) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("argument list length must be exactly %d", 2))); + errmsg("argument list length must be exactly %d", 2))); break; default: break; @@ -2665,7 +2665,7 @@ getObjectDescription(const ObjectAddress *object) if (object->objectSubId != 0) appendStringInfo(&buffer, _(" column %s"), get_relid_attribute_name(object->objectId, - object->objectSubId)); + object->objectSubId)); break; case OCLASS_PROC: @@ -2772,7 +2772,7 @@ getObjectDescription(const ObjectAddress *object) elog(ERROR, "cache lookup failed for conversion %u", object->objectId); appendStringInfo(&buffer, _("conversion %s"), - NameStr(((Form_pg_conversion) GETSTRUCT(conTup))->conname)); + NameStr(((Form_pg_conversion) GETSTRUCT(conTup))->conname)); ReleaseSysCache(conTup); break; } @@ -2861,7 +2861,7 @@ getObjectDescription(const ObjectAddress *object) appendStringInfo(&buffer, _("operator class %s for access method %s"), quote_qualified_identifier(nspname, - NameStr(opcForm->opcname)), + NameStr(opcForm->opcname)), NameStr(amForm->amname)); ReleaseSysCache(amTup); @@ -2883,7 +2883,7 @@ getObjectDescription(const ObjectAddress *object) elog(ERROR, "cache lookup failed for access method %u", object->objectId); appendStringInfo(&buffer, _("access method %s"), - NameStr(((Form_pg_am) GETSTRUCT(tup))->amname)); + NameStr(((Form_pg_am) GETSTRUCT(tup))->amname)); ReleaseSysCache(tup); break; } @@ -3100,7 +3100,7 @@ getObjectDescription(const ObjectAddress *object) elog(ERROR, "cache lookup failed for text search parser %u", object->objectId); appendStringInfo(&buffer, _("text search parser %s"), - NameStr(((Form_pg_ts_parser) GETSTRUCT(tup))->prsname)); + NameStr(((Form_pg_ts_parser) GETSTRUCT(tup))->prsname)); ReleaseSysCache(tup); break; } @@ -3115,7 +3115,7 @@ getObjectDescription(const ObjectAddress *object) elog(ERROR, "cache lookup failed for text search dictionary %u", object->objectId); appendStringInfo(&buffer, _("text search dictionary %s"), - NameStr(((Form_pg_ts_dict) GETSTRUCT(tup))->dictname)); + NameStr(((Form_pg_ts_dict) GETSTRUCT(tup))->dictname)); ReleaseSysCache(tup); break; } @@ -3130,7 +3130,7 @@ getObjectDescription(const ObjectAddress *object) elog(ERROR, "cache lookup failed for text search template %u", object->objectId); appendStringInfo(&buffer, _("text search template %s"), - NameStr(((Form_pg_ts_template) GETSTRUCT(tup))->tmplname)); + NameStr(((Form_pg_ts_template) GETSTRUCT(tup))->tmplname)); ReleaseSysCache(tup); break; } @@ -3145,7 +3145,7 @@ getObjectDescription(const ObjectAddress *object) elog(ERROR, "cache lookup failed for text search configuration %u", object->objectId); appendStringInfo(&buffer, _("text search configuration %s"), - NameStr(((Form_pg_ts_config) GETSTRUCT(tup))->cfgname)); + NameStr(((Form_pg_ts_config) GETSTRUCT(tup))->cfgname)); ReleaseSysCache(tup); break; } @@ -3259,33 +3259,33 @@ getObjectDescription(const ObjectAddress *object) case DEFACLOBJ_RELATION: appendStringInfo(&buffer, _("default privileges on new relations belonging to role %s"), - GetUserNameFromId(defacl->defaclrole, false)); + GetUserNameFromId(defacl->defaclrole, false)); break; case DEFACLOBJ_SEQUENCE: appendStringInfo(&buffer, _("default privileges on new sequences belonging to role %s"), - GetUserNameFromId(defacl->defaclrole, false)); + GetUserNameFromId(defacl->defaclrole, false)); break; case DEFACLOBJ_FUNCTION: appendStringInfo(&buffer, _("default privileges on new functions belonging to role %s"), - GetUserNameFromId(defacl->defaclrole, false)); + GetUserNameFromId(defacl->defaclrole, false)); break; case DEFACLOBJ_TYPE: appendStringInfo(&buffer, _("default privileges on new types belonging to role %s"), - GetUserNameFromId(defacl->defaclrole, false)); + GetUserNameFromId(defacl->defaclrole, false)); break; case DEFACLOBJ_NAMESPACE: appendStringInfo(&buffer, _("default privileges on new schemas belonging to role %s"), - GetUserNameFromId(defacl->defaclrole, false)); + GetUserNameFromId(defacl->defaclrole, false)); break; default: /* shouldn't get here */ appendStringInfo(&buffer, - _("default privileges belonging to role %s"), - GetUserNameFromId(defacl->defaclrole, false)); + _("default privileges belonging to role %s"), + GetUserNameFromId(defacl->defaclrole, false)); break; } @@ -3293,7 +3293,7 @@ getObjectDescription(const ObjectAddress *object) { appendStringInfo(&buffer, _(" in schema %s"), - get_namespace_name(defacl->defaclnamespace)); + get_namespace_name(defacl->defaclnamespace)); } systable_endscan(rcscan); @@ -3323,7 +3323,7 @@ getObjectDescription(const ObjectAddress *object) elog(ERROR, "cache lookup failed for event trigger %u", object->objectId); appendStringInfo(&buffer, _("event trigger %s"), - NameStr(((Form_pg_event_trigger) GETSTRUCT(tup))->evtname)); + NameStr(((Form_pg_event_trigger) GETSTRUCT(tup))->evtname)); ReleaseSysCache(tup); break; } @@ -3631,7 +3631,7 @@ pg_identify_object(PG_FUNCTION_ARGS) RelationGetDescr(catalog), &isnull); if (isnull) elog(ERROR, "invalid null namespace in object %u/%u/%d", - address.classId, address.objectId, address.objectSubId); + address.classId, address.objectId, address.objectSubId); } /* @@ -3646,7 +3646,7 @@ pg_identify_object(PG_FUNCTION_ARGS) Datum nameDatum; nameDatum = heap_getattr(objtup, nameAttnum, - RelationGetDescr(catalog), &isnull); + RelationGetDescr(catalog), &isnull); if (isnull) elog(ERROR, "invalid null name in object %u/%u/%d", address.classId, address.objectId, address.objectSubId); @@ -4091,7 +4091,7 @@ getObjectIdentityParts(const ObjectAddress *object, case OCLASS_PROC: appendStringInfoString(&buffer, - format_procedure_qualified(object->objectId)); + format_procedure_qualified(object->objectId)); if (objname) format_procedure_parts(object->objectId, objname, objargs); break; @@ -4124,8 +4124,8 @@ getObjectIdentityParts(const ObjectAddress *object, castForm = (Form_pg_cast) GETSTRUCT(tup); appendStringInfo(&buffer, "(%s AS %s)", - format_type_be_qualified(castForm->castsource), - format_type_be_qualified(castForm->casttarget)); + format_type_be_qualified(castForm->castsource), + format_type_be_qualified(castForm->casttarget)); if (objname) { @@ -4152,7 +4152,7 @@ getObjectIdentityParts(const ObjectAddress *object, schema = get_namespace_name_or_temp(coll->collnamespace); appendStringInfoString(&buffer, quote_qualified_identifier(schema, - NameStr(coll->collname))); + NameStr(coll->collname))); if (objname) *objname = list_make2(schema, pstrdup(NameStr(coll->collname))); @@ -4191,7 +4191,7 @@ getObjectIdentityParts(const ObjectAddress *object, appendStringInfo(&buffer, "%s on %s", quote_identifier(NameStr(con->conname)), - getObjectIdentityParts(&domain, objname, objargs)); + getObjectIdentityParts(&domain, objname, objargs)); if (objname) *objargs = lappend(*objargs, pstrdup(NameStr(con->conname))); @@ -4216,7 +4216,7 @@ getObjectIdentityParts(const ObjectAddress *object, schema = get_namespace_name_or_temp(conForm->connamespace); appendStringInfoString(&buffer, quote_qualified_identifier(schema, - NameStr(conForm->conname))); + NameStr(conForm->conname))); if (objname) *objname = list_make2(schema, pstrdup(NameStr(conForm->conname))); @@ -4277,7 +4277,7 @@ getObjectIdentityParts(const ObjectAddress *object, object->objectId); langForm = (Form_pg_language) GETSTRUCT(langTup); appendStringInfoString(&buffer, - quote_identifier(NameStr(langForm->lanname))); + quote_identifier(NameStr(langForm->lanname))); if (objname) *objname = list_make1(pstrdup(NameStr(langForm->lanname))); ReleaseSysCache(langTup); @@ -4292,7 +4292,7 @@ getObjectIdentityParts(const ObjectAddress *object, case OCLASS_OPERATOR: appendStringInfoString(&buffer, - format_operator_qualified(object->objectId)); + format_operator_qualified(object->objectId)); if (objname) format_operator_parts(object->objectId, objname, objargs); break; @@ -4322,7 +4322,7 @@ getObjectIdentityParts(const ObjectAddress *object, appendStringInfo(&buffer, "%s USING %s", quote_qualified_identifier(schema, - NameStr(opcForm->opcname)), + NameStr(opcForm->opcname)), quote_identifier(NameStr(amForm->amname))); if (objname) *objname = list_make3(pstrdup(NameStr(amForm->amname)), @@ -4391,7 +4391,7 @@ getObjectIdentityParts(const ObjectAddress *object, if (objname) { *objname = lappend(*objname, - psprintf("%d", amopForm->amopstrategy)); + psprintf("%d", amopForm->amopstrategy)); *objargs = list_make2(ltype, rtype); } @@ -4542,10 +4542,10 @@ getObjectIdentityParts(const ObjectAddress *object, schema = get_namespace_name_or_temp(formStatistic->stxnamespace); appendStringInfoString(&buffer, quote_qualified_identifier(schema, - NameStr(formStatistic->stxname))); + NameStr(formStatistic->stxname))); if (objname) *objname = list_make2(schema, - pstrdup(NameStr(formStatistic->stxname))); + pstrdup(NameStr(formStatistic->stxname))); ReleaseSysCache(tup); } break; @@ -4565,10 +4565,10 @@ getObjectIdentityParts(const ObjectAddress *object, schema = get_namespace_name_or_temp(formParser->prsnamespace); appendStringInfoString(&buffer, quote_qualified_identifier(schema, - NameStr(formParser->prsname))); + NameStr(formParser->prsname))); if (objname) *objname = list_make2(schema, - pstrdup(NameStr(formParser->prsname))); + pstrdup(NameStr(formParser->prsname))); ReleaseSysCache(tup); break; } @@ -4588,10 +4588,10 @@ getObjectIdentityParts(const ObjectAddress *object, schema = get_namespace_name_or_temp(formDict->dictnamespace); appendStringInfoString(&buffer, quote_qualified_identifier(schema, - NameStr(formDict->dictname))); + NameStr(formDict->dictname))); if (objname) *objname = list_make2(schema, - pstrdup(NameStr(formDict->dictname))); + pstrdup(NameStr(formDict->dictname))); ReleaseSysCache(tup); break; } @@ -4611,10 +4611,10 @@ getObjectIdentityParts(const ObjectAddress *object, schema = get_namespace_name_or_temp(formTmpl->tmplnamespace); appendStringInfoString(&buffer, quote_qualified_identifier(schema, - NameStr(formTmpl->tmplname))); + NameStr(formTmpl->tmplname))); if (objname) *objname = list_make2(schema, - pstrdup(NameStr(formTmpl->tmplname))); + pstrdup(NameStr(formTmpl->tmplname))); ReleaseSysCache(tup); break; } @@ -4634,7 +4634,7 @@ getObjectIdentityParts(const ObjectAddress *object, schema = get_namespace_name_or_temp(formCfg->cfgnamespace); appendStringInfoString(&buffer, quote_qualified_identifier(schema, - NameStr(formCfg->cfgname))); + NameStr(formCfg->cfgname))); if (objname) *objname = list_make2(schema, pstrdup(NameStr(formCfg->cfgname))); @@ -4853,7 +4853,7 @@ getObjectIdentityParts(const ObjectAddress *object, object->objectId); trigForm = (Form_pg_event_trigger) GETSTRUCT(tup); appendStringInfoString(&buffer, - quote_identifier(NameStr(trigForm->evtname))); + quote_identifier(NameStr(trigForm->evtname))); ReleaseSysCache(tup); break; } @@ -5043,7 +5043,7 @@ getRelationIdentity(StringInfo buffer, Oid relid, List **object) schema = get_namespace_name_or_temp(relForm->relnamespace); appendStringInfoString(buffer, quote_qualified_identifier(schema, - NameStr(relForm->relname))); + NameStr(relForm->relname))); if (object) *object = list_make2(schema, pstrdup(NameStr(relForm->relname))); diff --git a/src/backend/catalog/partition.c b/src/backend/catalog/partition.c index e563b8548b..9e99cd5d80 100644 --- a/src/backend/catalog/partition.c +++ b/src/backend/catalog/partition.c @@ -293,7 +293,7 @@ RelationBuildPartitionDesc(Relation rel) * also save the index of partition the value comes from. */ all_values = (PartitionListValue **) palloc(ndatums * - sizeof(PartitionListValue *)); + sizeof(PartitionListValue *)); i = 0; foreach(cell, non_null_values) { @@ -318,7 +318,7 @@ RelationBuildPartitionDesc(Relation rel) bool *distinct_indexes; all_bounds = (PartitionRangeBound **) palloc0(2 * nparts * - sizeof(PartitionRangeBound *)); + sizeof(PartitionRangeBound *)); distinct_indexes = (bool *) palloc(2 * nparts * sizeof(bool)); /* @@ -420,7 +420,7 @@ RelationBuildPartitionDesc(Relation rel) * into the relcache. */ rbounds = (PartitionRangeBound **) palloc(ndatums * - sizeof(PartitionRangeBound *)); + sizeof(PartitionRangeBound *)); k = 0; for (i = 0; i < 2 * nparts; i++) { @@ -481,8 +481,8 @@ RelationBuildPartitionDesc(Relation rel) { boundinfo->datums[i] = (Datum *) palloc(sizeof(Datum)); boundinfo->datums[i][0] = datumCopy(all_values[i]->value, - key->parttypbyval[0], - key->parttyplen[0]); + key->parttypbyval[0], + key->parttyplen[0]); /* If the old index has no mapping, assign one */ if (mapping[all_values[i]->index] == -1) @@ -513,7 +513,7 @@ RelationBuildPartitionDesc(Relation rel) case PARTITION_STRATEGY_RANGE: { boundinfo->content = (RangeDatumContent **) palloc(ndatums * - sizeof(RangeDatumContent *)); + sizeof(RangeDatumContent *)); boundinfo->indexes = (int *) palloc((ndatums + 1) * sizeof(int)); @@ -522,7 +522,7 @@ RelationBuildPartitionDesc(Relation rel) int j; boundinfo->datums[i] = (Datum *) palloc(key->partnatts * - sizeof(Datum)); + sizeof(Datum)); boundinfo->content[i] = (RangeDatumContent *) palloc(key->partnatts * sizeof(RangeDatumContent)); @@ -739,7 +739,7 @@ check_new_partition_bound(char *relname, Relation parent, upper) >= 0) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("cannot create range partition with empty range"), + errmsg("cannot create range partition with empty range"), parser_errposition(pstate, spec->location))); if (partdesc->nparts > 0) @@ -942,7 +942,7 @@ map_partition_varattnos(List *expr, int target_varno, part_attnos = convert_tuples_by_name_map(RelationGetDescr(partrel), RelationGetDescr(parent), - gettext_noop("could not convert row type")); + gettext_noop("could not convert row type")); expr = (List *) map_variable_attnos((Node *) expr, target_varno, 0, part_attnos, @@ -1120,7 +1120,7 @@ RelationGetPartitionDispatchInfo(Relation rel, int lockmode, pd[i]->tupslot = MakeSingleTupleTableSlot(tupdesc); pd[i]->tupmap = convert_tuples_by_name(RelationGetDescr(parent), tupdesc, - gettext_noop("could not convert row type")); + gettext_noop("could not convert row type")); } else { @@ -1595,7 +1595,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec) fix_opfuncids((Node *) test_expr); test_exprstate = ExecInitExpr(test_expr, NULL); test_result = ExecEvalExprSwitchContext(test_exprstate, - GetPerTupleExprContext(estate), + GetPerTupleExprContext(estate), &isNull); MemoryContextSwitchTo(oldcxt); FreeExecutorState(estate); @@ -1676,7 +1676,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec) make_partition_op_expr(key, j, strategy, keyCol, - (Expr *) lower_val)); + (Expr *) lower_val)); } if (need_next_upper_arm && upper_val) @@ -1698,7 +1698,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec) make_partition_op_expr(key, j, strategy, keyCol, - (Expr *) upper_val)); + (Expr *) upper_val)); } /* @@ -1722,13 +1722,13 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec) if (lower_or_arm_args != NIL) lower_or_arms = lappend(lower_or_arms, list_length(lower_or_arm_args) > 1 - ? makeBoolExpr(AND_EXPR, lower_or_arm_args, -1) + ? makeBoolExpr(AND_EXPR, lower_or_arm_args, -1) : linitial(lower_or_arm_args)); if (upper_or_arm_args != NIL) upper_or_arms = lappend(upper_or_arms, list_length(upper_or_arm_args) > 1 - ? makeBoolExpr(AND_EXPR, upper_or_arm_args, -1) + ? makeBoolExpr(AND_EXPR, upper_or_arm_args, -1) : linitial(upper_or_arm_args)); /* If no work to do in the next iteration, break away. */ @@ -2250,8 +2250,8 @@ partition_bound_cmp(PartitionKey key, PartitionBoundInfo boundinfo, bool lower = boundinfo->indexes[offset] < 0; cmpval = partition_rbound_cmp(key, - bound_datums, content, lower, - (PartitionRangeBound *) probe); + bound_datums, content, lower, + (PartitionRangeBound *) probe); } else cmpval = partition_rbound_datum_cmp(key, diff --git a/src/backend/catalog/pg_aggregate.c b/src/backend/catalog/pg_aggregate.c index aa45c141a4..a9204503d3 100644 --- a/src/backend/catalog/pg_aggregate.c +++ b/src/backend/catalog/pg_aggregate.c @@ -123,7 +123,7 @@ AggregateCreate(const char *aggName, ereport(ERROR, (errcode(ERRCODE_TOO_MANY_ARGUMENTS), errmsg_plural("aggregates cannot have more than %d argument", - "aggregates cannot have more than %d arguments", + "aggregates cannot have more than %d arguments", FUNC_MAX_ARGS - 1, FUNC_MAX_ARGS - 1))); @@ -331,9 +331,9 @@ AggregateCreate(const char *aggName, if (rettype != aggmTransType) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("return type of inverse transition function %s is not %s", - NameListToString(aggminvtransfnName), - format_type_be(aggmTransType)))); + errmsg("return type of inverse transition function %s is not %s", + NameListToString(aggminvtransfnName), + format_type_be(aggmTransType)))); tup = SearchSysCache1(PROCOID, ObjectIdGetDatum(minvtransfn)); if (!HeapTupleIsValid(tup)) @@ -452,9 +452,9 @@ AggregateCreate(const char *aggName, if (rettype != BYTEAOID) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("return type of serialization function %s is not %s", - NameListToString(aggserialfnName), - format_type_be(BYTEAOID)))); + errmsg("return type of serialization function %s is not %s", + NameListToString(aggserialfnName), + format_type_be(BYTEAOID)))); } /* @@ -472,9 +472,9 @@ AggregateCreate(const char *aggName, if (rettype != INTERNALOID) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("return type of deserialization function %s is not %s", - NameListToString(aggdeserialfnName), - format_type_be(INTERNALOID)))); + errmsg("return type of deserialization function %s is not %s", + NameListToString(aggdeserialfnName), + format_type_be(INTERNALOID)))); } /* diff --git a/src/backend/catalog/pg_collation.c b/src/backend/catalog/pg_collation.c index 30cd0cba19..6b1b72f245 100644 --- a/src/backend/catalog/pg_collation.c +++ b/src/backend/catalog/pg_collation.c @@ -94,8 +94,8 @@ CollationCreate(const char *collname, Oid collnamespace, collencoding == -1 ? errmsg("collation \"%s\" already exists", collname) - : errmsg("collation \"%s\" for encoding \"%s\" already exists", - collname, pg_encoding_to_char(collencoding)))); + : errmsg("collation \"%s\" for encoding \"%s\" already exists", + collname, pg_encoding_to_char(collencoding)))); } /* open pg_collation; see below about the lock level */ diff --git a/src/backend/catalog/pg_constraint.c b/src/backend/catalog/pg_constraint.c index 60ccaa08b0..1336c46d3f 100644 --- a/src/backend/catalog/pg_constraint.c +++ b/src/backend/catalog/pg_constraint.c @@ -646,8 +646,8 @@ RenameConstraintById(Oid conId, const char *newname) newname)) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("constraint \"%s\" for relation \"%s\" already exists", - newname, get_rel_name(con->conrelid)))); + errmsg("constraint \"%s\" for relation \"%s\" already exists", + newname, get_rel_name(con->conrelid)))); if (OidIsValid(con->contypid) && ConstraintNameIsUsed(CONSTRAINT_DOMAIN, con->contypid, @@ -678,7 +678,7 @@ RenameConstraintById(Oid conId, const char *newname) */ void AlterConstraintNamespaces(Oid ownerId, Oid oldNspId, - Oid newNspId, bool isType, ObjectAddresses *objsMoved) + Oid newNspId, bool isType, ObjectAddresses *objsMoved) { Relation conRel; ScanKeyData key[1]; @@ -785,8 +785,8 @@ get_relation_constraint_oid(Oid relid, const char *conname, bool missing_ok) if (OidIsValid(conOid)) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("table \"%s\" has multiple constraints named \"%s\"", - get_rel_name(relid), conname))); + errmsg("table \"%s\" has multiple constraints named \"%s\"", + get_rel_name(relid), conname))); conOid = HeapTupleGetOid(tuple); } } @@ -843,8 +843,8 @@ get_domain_constraint_oid(Oid typid, const char *conname, bool missing_ok) if (OidIsValid(conOid)) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("domain %s has multiple constraints named \"%s\"", - format_type_be(typid), conname))); + errmsg("domain %s has multiple constraints named \"%s\"", + format_type_be(typid), conname))); conOid = HeapTupleGetOid(tuple); } } @@ -941,7 +941,7 @@ get_primary_key_attnos(Oid relid, bool deferrableOk, Oid *constraintOid) for (i = 0; i < numkeys; i++) { pkattnos = bms_add_member(pkattnos, - attnums[i] - FirstLowInvalidHeapAttributeNumber); + attnums[i] - FirstLowInvalidHeapAttributeNumber); } *constraintOid = HeapTupleGetOid(tuple); @@ -997,7 +997,7 @@ check_functional_grouping(Oid relid, gvar->varno == varno && gvar->varlevelsup == varlevelsup) groupbyattnos = bms_add_member(groupbyattnos, - gvar->varattno - FirstLowInvalidHeapAttributeNumber); + gvar->varattno - FirstLowInvalidHeapAttributeNumber); } if (bms_is_subset(pkattnos, groupbyattnos)) diff --git a/src/backend/catalog/pg_depend.c b/src/backend/catalog/pg_depend.c index d616df62c1..dd6ca3e8f7 100644 --- a/src/backend/catalog/pg_depend.c +++ b/src/backend/catalog/pg_depend.c @@ -214,7 +214,7 @@ deleteDependencyRecordsFor(Oid classId, Oid objectId, while (HeapTupleIsValid(tup = systable_getnext(scan))) { if (skipExtensionDeps && - ((Form_pg_depend) GETSTRUCT(tup))->deptype == DEPENDENCY_EXTENSION) + ((Form_pg_depend) GETSTRUCT(tup))->deptype == DEPENDENCY_EXTENSION) continue; CatalogTupleDelete(depRel, &tup->t_self); @@ -319,8 +319,8 @@ changeDependencyFor(Oid classId, Oid objectId, if (isObjectPinned(&objAddr, depRel)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot remove dependency on %s because it is a system object", - getObjectDescription(&objAddr)))); + errmsg("cannot remove dependency on %s because it is a system object", + getObjectDescription(&objAddr)))); /* * We can handle adding a dependency on something pinned, though, since diff --git a/src/backend/catalog/pg_enum.c b/src/backend/catalog/pg_enum.c index 300f24d231..fe61d4dacc 100644 --- a/src/backend/catalog/pg_enum.c +++ b/src/backend/catalog/pg_enum.c @@ -347,7 +347,7 @@ restart: if (!OidIsValid(binary_upgrade_next_pg_enum_oid)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("pg_enum OID value not set when in binary upgrade mode"))); + errmsg("pg_enum OID value not set when in binary upgrade mode"))); /* * Use binary-upgrade override for pg_enum.oid, if supplied. During diff --git a/src/backend/catalog/pg_operator.c b/src/backend/catalog/pg_operator.c index 370683823f..ef81102150 100644 --- a/src/backend/catalog/pg_operator.c +++ b/src/backend/catalog/pg_operator.c @@ -368,7 +368,7 @@ OperatorCreate(const char *operatorName, if (OidIsValid(joinId)) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("only binary operators can have join selectivity"))); + errmsg("only binary operators can have join selectivity"))); if (canMerge) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), @@ -395,7 +395,7 @@ OperatorCreate(const char *operatorName, if (OidIsValid(joinId)) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("only boolean operators can have join selectivity"))); + errmsg("only boolean operators can have join selectivity"))); if (canMerge) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), @@ -609,7 +609,7 @@ get_other_operator(List *otherOp, Oid otherLeftTypeId, Oid otherRightTypeId, if (!isCommutator) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("operator cannot be its own negator or sort operator"))); + errmsg("operator cannot be its own negator or sort operator"))); return InvalidOid; } diff --git a/src/backend/catalog/pg_proc.c b/src/backend/catalog/pg_proc.c index eaeabf13d6..571856e525 100644 --- a/src/backend/catalog/pg_proc.c +++ b/src/backend/catalog/pg_proc.c @@ -397,8 +397,8 @@ ProcedureCreate(const char *procedureName, if (!replace) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_FUNCTION), - errmsg("function \"%s\" already exists with same argument types", - procedureName))); + errmsg("function \"%s\" already exists with same argument types", + procedureName))); if (!pg_proc_ownercheck(HeapTupleGetOid(oldtup), proowner)) aclcheck_error(ACLCHECK_NOT_OWNER, ACL_KIND_PROC, procedureName); @@ -434,8 +434,8 @@ ProcedureCreate(const char *procedureName, !equalTupleDescs(olddesc, newdesc)) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("cannot change return type of existing function"), - errdetail("Row type defined by OUT parameters is different."), + errmsg("cannot change return type of existing function"), + errdetail("Row type defined by OUT parameters is different."), errhint("Use DROP FUNCTION %s first.", format_procedure(HeapTupleGetOid(oldtup))))); } @@ -477,10 +477,10 @@ ProcedureCreate(const char *procedureName, strcmp(old_arg_names[j], new_arg_names[j]) != 0) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("cannot change name of input parameter \"%s\"", - old_arg_names[j]), + errmsg("cannot change name of input parameter \"%s\"", + old_arg_names[j]), errhint("Use DROP FUNCTION %s first.", - format_procedure(HeapTupleGetOid(oldtup))))); + format_procedure(HeapTupleGetOid(oldtup))))); } } @@ -530,7 +530,7 @@ ProcedureCreate(const char *procedureName, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), errmsg("cannot change data type of existing parameter default value"), errhint("Use DROP FUNCTION %s first.", - format_procedure(HeapTupleGetOid(oldtup))))); + format_procedure(HeapTupleGetOid(oldtup))))); newlc = lnext(newlc); } } @@ -546,8 +546,8 @@ ProcedureCreate(const char *procedureName, else ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("function \"%s\" is not an aggregate function", - procedureName))); + errmsg("function \"%s\" is not an aggregate function", + procedureName))); } if (oldproc->proiswindow != isWindowFunc) { @@ -878,8 +878,8 @@ fmgr_sql_validator(PG_FUNCTION_ARGS) else ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("SQL functions cannot have arguments of type %s", - format_type_be(proc->proargtypes.values[i])))); + errmsg("SQL functions cannot have arguments of type %s", + format_type_be(proc->proargtypes.values[i])))); } } @@ -933,7 +933,7 @@ fmgr_sql_validator(PG_FUNCTION_ARGS) querytree_sublist = pg_analyze_and_rewrite_params(parsetree, prosrc, - (ParserSetupHook) sql_fn_parser_setup, + (ParserSetupHook) sql_fn_parser_setup, pinfo, NULL); querytree_list = list_concat(querytree_list, diff --git a/src/backend/catalog/pg_publication.c b/src/backend/catalog/pg_publication.c index 17b2e8d649..3ef7ba8cd5 100644 --- a/src/backend/catalog/pg_publication.c +++ b/src/backend/catalog/pg_publication.c @@ -73,7 +73,7 @@ check_publication_add_relation(Relation targetrel) (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("\"%s\" is a system table", RelationGetRelationName(targetrel)), - errdetail("System tables cannot be added to publications."))); + errdetail("System tables cannot be added to publications."))); /* UNLOGGED and TEMP relations cannot be part of publication. */ if (!RelationNeedsWAL(targetrel)) @@ -81,7 +81,7 @@ check_publication_add_relation(Relation targetrel) (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("table \"%s\" cannot be replicated", RelationGetRelationName(targetrel)), - errdetail("Temporary and unlogged relations cannot be replicated."))); + errdetail("Temporary and unlogged relations cannot be replicated."))); } /* @@ -163,8 +163,8 @@ publication_add_relation(Oid pubid, Relation targetrel, ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("relation \"%s\" is already member of publication \"%s\"", - RelationGetRelationName(targetrel), pub->name))); + errmsg("relation \"%s\" is already member of publication \"%s\"", + RelationGetRelationName(targetrel), pub->name))); } check_publication_add_relation(targetrel); diff --git a/src/backend/catalog/pg_shdepend.c b/src/backend/catalog/pg_shdepend.c index d28a8afb47..31b09a1da5 100644 --- a/src/backend/catalog/pg_shdepend.c +++ b/src/backend/catalog/pg_shdepend.c @@ -239,7 +239,7 @@ shdepChangeDep(Relation sdepRel, /* Caller screwed up if multiple matches */ if (oldtup) elog(ERROR, - "multiple pg_shdepend entries for object %u/%u/%d deptype %c", + "multiple pg_shdepend entries for object %u/%u/%d deptype %c", classid, objid, objsubid, deptype); oldtup = heap_copytuple(scantup); } @@ -691,7 +691,7 @@ checkSharedDependencies(Oid classId, Oid objectId, if (numNotReportedDbs > 0) appendStringInfo(&descs, ngettext("\nand objects in %d other database " "(see server log for list)", - "\nand objects in %d other databases " + "\nand objects in %d other databases " "(see server log for list)", numNotReportedDbs), numNotReportedDbs); @@ -1197,9 +1197,9 @@ shdepDropOwned(List *roleids, DropBehavior behavior) ereport(ERROR, (errcode(ERRCODE_DEPENDENT_OBJECTS_STILL_EXIST), - errmsg("cannot drop objects owned by %s because they are " - "required by the database system", - getObjectDescription(&obj)))); + errmsg("cannot drop objects owned by %s because they are " + "required by the database system", + getObjectDescription(&obj)))); } ScanKeyInit(&key[0], diff --git a/src/backend/catalog/pg_type.c b/src/backend/catalog/pg_type.c index 6172973343..59ffd2104d 100644 --- a/src/backend/catalog/pg_type.c +++ b/src/backend/catalog/pg_type.c @@ -133,7 +133,7 @@ TypeShellMake(const char *typeName, Oid typeNamespace, Oid ownerId) if (!OidIsValid(binary_upgrade_next_pg_type_oid)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("pg_type OID value not set when in binary upgrade mode"))); + errmsg("pg_type OID value not set when in binary upgrade mode"))); HeapTupleSetOid(tup, binary_upgrade_next_pg_type_oid); binary_upgrade_next_pg_type_oid = InvalidOid; @@ -296,8 +296,8 @@ TypeCreate(Oid newTypeOid, else ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("internal size %d is invalid for passed-by-value type", - internalSize))); + errmsg("internal size %d is invalid for passed-by-value type", + internalSize))); } else { @@ -305,14 +305,14 @@ TypeCreate(Oid newTypeOid, if (internalSize == -1 && !(alignment == 'i' || alignment == 'd')) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("alignment \"%c\" is invalid for variable-length type", - alignment))); + errmsg("alignment \"%c\" is invalid for variable-length type", + alignment))); /* cstring must have char alignment */ if (internalSize == -2 && !(alignment == 'c')) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("alignment \"%c\" is invalid for variable-length type", - alignment))); + errmsg("alignment \"%c\" is invalid for variable-length type", + alignment))); } /* Only varlena types can be toasted */ @@ -652,7 +652,7 @@ GenerateTypeDependencies(Oid typeNamespace, referenced.objectId = elementType; referenced.objectSubId = 0; recordDependencyOn(&myself, &referenced, - isImplicitArray ? DEPENDENCY_INTERNAL : DEPENDENCY_NORMAL); + isImplicitArray ? DEPENDENCY_INTERNAL : DEPENDENCY_NORMAL); } /* Normal dependency from a domain to its base type. */ 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 diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c index 61c90a1600..a298b92af8 100644 --- a/src/backend/executor/execExpr.c +++ b/src/backend/executor/execExpr.c @@ -777,7 +777,7 @@ ExecInitExprRec(Expr *node, PlanState *parent, ExprState *state, if (nfuncs != winstate->numfuncs) ereport(ERROR, |