diff options
Diffstat (limited to 'src/backend')
357 files changed, 3286 insertions, 3284 deletions
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c index b0e89ace5e2..efebeb035ac 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 bc16dd79812..9c0a058ccb0 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 8f7a0c75b81..62fd90aabe7 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 bd08f0e396e..80f803e438e 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 c87bc03a9ee..22f2076887e 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 e2e1d23377a..ed5b4b108da 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 2846ec8b34f..37a21057d00 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 a6adf6e637c..ec10762529d 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 93ed3272ea9..2e5ea479763 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 8c9859ce8e3..d5cc70258ac 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 03a54346aab..59e435465ac 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 610d386ff8a..56a5bf47b8c 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 d90faae65dd..5378011f504 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 a940a9374a1..5b8ad9a25aa 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 25758b9b5dd..7ceea7a741b 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 d03d59da6a7..91e4a8cf700 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 afef753ede5..565525bbdfc 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 c24643df036..4756a70ae6d 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 f558729fbf0..88cee2028da 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 15b89fd8ade..08990f5a1be 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 cffc5ddc757..617f42c317e 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 cbdaec9d2b3..b6ccc1a66a1 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 01c8d8006c0..dc08db97db0 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 8468efee020..c206e704d4d 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 4544889294a..1cb18a75138 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 62e37b6de59..9b803af7c25 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 5357a77dc2d..9766723deb3 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 5b7c57d5685..52231ac4178 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 fa5e78a067c..458180bc95f 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 e5616ce0511..4c2a13aebae 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 cacd74a978d..bef4255369a 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 df8f44ae808..4aca7e4db8f 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 f815fd40b20..5c817b65105 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 2de1625a12c..642c8943e71 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 168756cc78f..bf6c03c7b2a 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 5b259a31d99..dbfb775dec8 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 637ebf30f85..8eb5275a8b4 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 df51f3ce1f5..02c887496ef 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 35d86dc8935..3e9236122b4 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 8287751e48c..0b971c2aee4 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 fbde9d65554..ad6bba6130b 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 24d6cb58fde..41ed84b1685 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 735f8c598fc..3aafa79e524 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 2bf6de3332a..f72f0760173 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 8c420633f42..b0702a7f927 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 9a372599164..e4b2c29b0ed 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 6ad73f448d8..773774555fc 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 e1f9d872781..7965b5846d9 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 e57ac49c6b4..8656af453c1 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 508d3e083fd..d7d5e90ef3a 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 c007601efde..c440d217159 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 ed1b1d8ce45..c34e7e1945f 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 7646c23c4e7..827d976db83 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 1a7824b5d44..682eef420bb 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 98793bda668..17b10383e44 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 aba45b0a85d..93ec653dd60 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 188008b4ca3..63db8a981dc 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 9e6933e9e83..ba03d9687e5 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 b02dd6fbd25..15e05591b74 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 e14be6b314a..b0aa69fe4b4 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 106210a8839..48eecfc84a1 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 c46325dfaf2..f9b49ba4984 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 c9cc6636d3f..3af03ecdb12 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 d6b857f1093..0781a7b9de9 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 7430a1f77b4..bbae733d658 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 b9573973d29..b3f0b3cc922 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 de0a1ba833f..b7b5e49c9f0 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 b12b36ed345..1a7645d341f 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 8052dcc2881..a376b99f1ed 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 549a2d19c65..027abd56b0d 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 29385019172..64f6feef9da 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 b882d5f0e14..6cac2dfd1db 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 e563b8548b6..9e99cd5d807 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 aa45c141a45..a9204503d36 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 30cd0cba19e..6b1b72f245b 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 60ccaa08b0c..1336c46d3f5 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 d616df62c15..dd6ca3e8f78 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 300f24d2312..fe61d4daccc 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 370683823fa..ef811021504 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 eaeabf13d68..571856e5250 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 17b2e8d6497..3ef7ba8cd55 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 d28a8afb47d..31b09a1da51 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 6172973343a..59ffd2104df 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 b204b19c72c..a63539ab217 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 e5f0b75a86a..4f8147907c4 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 a19c6c25e61..2b638271b3d 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 9befe0492ae..bacc08eb84f 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 1cc53094268..f51f8b94922 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 e805b7cfc4b..bdfd73906bb 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 ec6011cdb85..3c399e29db5 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 06425cc0ebd..97f9c55d6e7 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 96ab6f23cd1..e138539035e 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 3ad4eea59ec..8eff0ad17b4 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 9e307eb8af8..2b30677d6f9 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 48a63755599..938133bbe43 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 9359d0a83ad..7648201218e 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 a40b5ec4de7..e4340eed8c4 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 ba85952baae..9ad991507fa 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 1a165d5b0c2..7de844b2cad 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 e3f2dcfa8cc..620704ec490 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 9ffd91ea0e3..7d57f97442e 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 512014438b0..a31b1acb9c6 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 c7e76766115..6674b41eecb 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 dad31df5175..9ced4ee34ca 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 d265c77826f..be7222f0033 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 4d555f1f5c7..9d2d43fe6b1 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 9cfac4a6f97..610cb499d25 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 93425babbed..f9ea73f9233 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 58bda558379..bb611086ed4 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 ea0a5614019..476505512b8 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 5aae7b6f916..9cbd36f6463 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 207241cb923..7d9c769b062 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 03bf06012ad..8559c3b6b36 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 191f27651c1..45d1f515eb9 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 cb212fdf68d..adc7cd67a70 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 4e083eb3456..c2fc59d1aa0 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 24608c27c33..0a72c2ecb37 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 9fbb0eb4eb8..faa181207a8 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 7978c062d75..1951aa94fb1 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 f8f456e0e5d..4156bcd8dfa 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 e83e4f455f2..f25a5658d68 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 61c90a16009..a298b92af8c 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, (errcode(ERRCODE_WINDOWING_ERROR), - errmsg("window function calls cannot be nested"))); + errmsg("window function calls cannot be nested"))); } else { @@ -1545,8 +1545,8 @@ ExecInitExprRec(Expr *node, PlanState *parent, ExprState *state, ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), errmsg("ROW() column has type %s instead of type %s", - format_type_be(exprType((Node *) e)), - format_type_be(attrs[i]->atttypid)))); + format_type_be(exprType((Node *) e)), + format_type_be(attrs[i]->atttypid)))); } else { @@ -2076,10 +2076,10 @@ ExecInitFunc(ExprEvalStep *scratch, Expr *node, List *args, Oid funcid, if (nargs > FUNC_MAX_ARGS) ereport(ERROR, (errcode(ERRCODE_TOO_MANY_ARGUMENTS), - errmsg_plural("cannot pass more than %d argument to a function", - "cannot pass more than %d arguments to a function", - FUNC_MAX_ARGS, - FUNC_MAX_ARGS))); + errmsg_plural("cannot pass more than %d argument to a function", + "cannot pass more than %d arguments to a function", + FUNC_MAX_ARGS, + FUNC_MAX_ARGS))); /* Allocate function lookup data and parameter workspace for this call */ scratch->d.func.finfo = palloc0(sizeof(FmgrInfo)); @@ -2105,7 +2105,7 @@ ExecInitFunc(ExprEvalStep *scratch, Expr *node, List *args, Oid funcid, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("set-valued function called in context that cannot accept a set"), parent ? executor_errposition(parent->state, - exprLocation((Node *) node)) : 0)); + exprLocation((Node *) node)) : 0)); /* Build code to evaluate arguments directly into the fcinfo struct */ argno = 0; @@ -2380,7 +2380,7 @@ ExecInitArrayRef(ExprEvalStep *scratch, ArrayRef *aref, PlanState *parent, /* Each subscript is evaluated into subscriptvalue/subscriptnull */ ExecInitExprRec(e, parent, state, - &arefstate->subscriptvalue, &arefstate->subscriptnull); + &arefstate->subscriptvalue, &arefstate->subscriptnull); /* ... and then ARRAYREF_SUBSCRIPT saves it into step's workspace */ scratch->opcode = EEOP_ARRAYREF_SUBSCRIPT; @@ -2413,7 +2413,7 @@ ExecInitArrayRef(ExprEvalStep *scratch, ArrayRef *aref, PlanState *parent, /* Each subscript is evaluated into subscriptvalue/subscriptnull */ ExecInitExprRec(e, parent, state, - &arefstate->subscriptvalue, &arefstate->subscriptnull); + &arefstate->subscriptvalue, &arefstate->subscriptnull); /* ... and then ARRAYREF_SUBSCRIPT saves it into step's workspace */ scratch->opcode = EEOP_ARRAYREF_SUBSCRIPT; diff --git a/src/backend/executor/execExprInterp.c b/src/backend/executor/execExprInterp.c index 146d1a0bece..c227d9bdd99 100644 --- a/src/backend/executor/execExprInterp.c +++ b/src/backend/executor/execExprInterp.c @@ -1986,7 +1986,7 @@ ExecEvalCurrentOfExpr(ExprState *state, ExprEvalStep *op) { ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("WHERE CURRENT OF is not supported for this table type"))); + errmsg("WHERE CURRENT OF is not supported for this table type"))); } /* @@ -2187,7 +2187,7 @@ ExecEvalArrayExpr(ExprState *state, ExprEvalStep *op) (errcode(ERRCODE_DATATYPE_MISMATCH), errmsg("cannot merge incompatible arrays"), errdetail("Array with element type %s cannot be " - "included in ARRAY construct with element type %s.", + "included in ARRAY construct with element type %s.", format_type_be(ARR_ELEMTYPE(array)), format_type_be(element_type)))); @@ -2207,8 +2207,8 @@ ExecEvalArrayExpr(ExprState *state, ExprEvalStep *op) if (ndims <= 0 || ndims > MAXDIM) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("number of array dimensions (%d) exceeds " \ - "the maximum allowed (%d)", ndims, MAXDIM))); + errmsg("number of array dimensions (%d) exceeds " \ + "the maximum allowed (%d)", ndims, MAXDIM))); elem_dims = (int *) palloc(elem_ndims * sizeof(int)); memcpy(elem_dims, ARR_DIMS(array), elem_ndims * sizeof(int)); @@ -2601,7 +2601,7 @@ ExecEvalArrayRefSubscript(ExprState *state, ExprEvalStep *op) if (arefstate->isassignment) ereport(ERROR, (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), - errmsg("array subscript in assignment must not be null"))); + errmsg("array subscript in assignment must not be null"))); *op->resnull = true; return false; } @@ -2834,7 +2834,7 @@ ExecEvalConvertRowtype(ExprState *state, ExprEvalStep *op, ExprContext *econtext /* prepare map from old to new attribute numbers */ op->d.convert_rowtype.map = convert_tuples_by_name(indesc, outdesc, - gettext_noop("could not convert row type")); + gettext_noop("could not convert row type")); op->d.convert_rowtype.initialized = true; MemoryContextSwitchTo(old_cxt); @@ -3049,9 +3049,9 @@ ExecEvalConstraintCheck(ExprState *state, ExprEvalStep *op) !DatumGetBool(*op->d.domaincheck.checkvalue)) ereport(ERROR, (errcode(ERRCODE_CHECK_VIOLATION), - errmsg("value for domain %s violates check constraint \"%s\"", - format_type_be(op->d.domaincheck.resulttype), - op->d.domaincheck.constraintname), + errmsg("value for domain %s violates check constraint \"%s\"", + format_type_be(op->d.domaincheck.resulttype), + op->d.domaincheck.constraintname), errdomainconstraint(op->d.domaincheck.resulttype, op->d.domaincheck.constraintname))); } @@ -3116,7 +3116,7 @@ ExecEvalXmlExpr(ExprState *state, ExprEvalStep *op) appendStringInfo(&buf, "<%s>%s</%s>", argname, map_sql_value_to_xml_value(value, - exprType((Node *) e), true), + exprType((Node *) e), true), argname); *op->resnull = false; } @@ -3137,10 +3137,10 @@ ExecEvalXmlExpr(ExprState *state, ExprEvalStep *op) case IS_XMLELEMENT: *op->resvalue = PointerGetDatum(xmlelement(xexpr, - op->d.xmlexpr.named_argvalue, - op->d.xmlexpr.named_argnull, + op->d.xmlexpr.named_argvalue, + op->d.xmlexpr.named_argnull, op->d.xmlexpr.argvalue, - op->d.xmlexpr.argnull)); + op->d.xmlexpr.argnull)); *op->resnull = false; break; @@ -3166,7 +3166,7 @@ ExecEvalXmlExpr(ExprState *state, ExprEvalStep *op) *op->resvalue = PointerGetDatum(xmlparse(data, xexpr->xmloption, - preserve_whitespace)); + preserve_whitespace)); *op->resnull = false; } break; @@ -3243,8 +3243,8 @@ ExecEvalXmlExpr(ExprState *state, ExprEvalStep *op) value = argvalue[0]; *op->resvalue = PointerGetDatum( - xmltotext_with_xmloption(DatumGetXmlP(value), - xexpr->xmloption)); + xmltotext_with_xmloption(DatumGetXmlP(value), + xexpr->xmloption)); *op->resnull = false; } break; @@ -3418,7 +3418,7 @@ ExecEvalWholeRowVar(ExprState *state, ExprEvalStep *op, ExprContext *econtext) (errcode(ERRCODE_DATATYPE_MISMATCH), errmsg("table row type and query-specified row type do not match"), errdetail_plural("Table row contains %d attribute, but query expects %d.", - "Table row contains %d attributes, but query expects %d.", + "Table row contains %d attributes, but query expects %d.", slot_tupdesc->natts, slot_tupdesc->natts, var_tupdesc->natts))); @@ -3492,10 +3492,10 @@ ExecEvalWholeRowVar(ExprState *state, ExprEvalStep *op, ExprContext *econtext) * perhaps other places.) */ if (econtext->ecxt_estate && - variable->varno <= list_length(econtext->ecxt_estate->es_range_table)) + variable->varno <= list_length(econtext->ecxt_estate->es_range_table)) { RangeTblEntry *rte = rt_fetch(variable->varno, - econtext->ecxt_estate->es_range_table); + econtext->ecxt_estate->es_range_table); if (rte->eref) ExecTypeSetColNames(output_tupdesc, rte->eref->colnames); diff --git a/src/backend/executor/execIndexing.c b/src/backend/executor/execIndexing.c index 4d818309962..89e189fa715 100644 --- a/src/backend/executor/execIndexing.c +++ b/src/backend/executor/execIndexing.c @@ -432,7 +432,7 @@ ExecInsertIndexTuples(TupleTableSlot *slot, indexRelation, indexInfo, tupleid, values, isnull, estate, false, - waitMode, violationOK, NULL); + waitMode, violationOK, NULL); } if ((checkUnique == UNIQUE_CHECK_PARTIAL || @@ -542,7 +542,7 @@ ExecCheckIndexConstraints(TupleTableSlot *slot, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("ON CONFLICT does not support deferrable unique constraints/exclusion constraints as arbiters"), errtableconstraint(heapRelation, - RelationGetRelationName(indexRelation)))); + RelationGetRelationName(indexRelation)))); checkedIndex = true; @@ -580,7 +580,7 @@ ExecCheckIndexConstraints(TupleTableSlot *slot, satisfiesConstraint = check_exclusion_or_unique_constraint(heapRelation, indexRelation, indexInfo, &invalidItemPtr, - values, isnull, estate, false, + values, isnull, estate, false, CEOUC_WAIT, true, conflictTid); if (!satisfiesConstraint) diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 2e3717d4dd7..7f0d21f5166 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -698,14 +698,14 @@ ExecCheckRTEPerms(RangeTblEntry *rte) */ if (remainingPerms & ACL_INSERT && !ExecCheckRTEPermsModified(relOid, userid, - rte->insertedCols, - ACL_INSERT)) + rte->insertedCols, + ACL_INSERT)) return false; if (remainingPerms & ACL_UPDATE && !ExecCheckRTEPermsModified(relOid, userid, - rte->updatedCols, - ACL_UPDATE)) + rte->updatedCols, + ACL_UPDATE)) return false; } return true; @@ -1133,26 +1133,26 @@ CheckValidResultRel(Relation resultRel, CmdType operation) case CMD_INSERT: if (!trigDesc || !trigDesc->trig_insert_instead_row) ereport(ERROR, - (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("cannot insert into view \"%s\"", - RelationGetRelationName(resultRel)), - errhint("To enable inserting into the view, provide an INSTEAD OF INSERT trigger or an unconditional ON INSERT DO INSTEAD rule."))); + (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), + errmsg("cannot insert into view \"%s\"", + RelationGetRelationName(resultRel)), + errhint("To enable inserting into the view, provide an INSTEAD OF INSERT trigger or an unconditional ON INSERT DO INSTEAD rule."))); break; case CMD_UPDATE: if (!trigDesc || !trigDesc->trig_update_instead_row) ereport(ERROR, - (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("cannot update view \"%s\"", - RelationGetRelationName(resultRel)), - errhint("To enable updating the view, provide an INSTEAD OF UPDATE trigger or an unconditional ON UPDATE DO INSTEAD rule."))); + (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), + errmsg("cannot update view \"%s\"", + RelationGetRelationName(resultRel)), + errhint("To enable updating the view, provide an INSTEAD OF UPDATE trigger or an unconditional ON UPDATE DO INSTEAD rule."))); break; case CMD_DELETE: if (!trigDesc || !trigDesc->trig_delete_instead_row) ereport(ERROR, - (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("cannot delete from view \"%s\"", - RelationGetRelationName(resultRel)), - errhint("To enable deleting from the view, provide an INSTEAD OF DELETE trigger or an unconditional ON DELETE DO INSTEAD rule."))); + (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), + errmsg("cannot delete from view \"%s\"", + RelationGetRelationName(resultRel)), + errhint("To enable deleting from the view, provide an INSTEAD OF DELETE trigger or an unconditional ON DELETE DO INSTEAD rule."))); break; default: elog(ERROR, "unrecognized CmdType: %d", (int) operation); @@ -1175,14 +1175,14 @@ CheckValidResultRel(Relation resultRel, CmdType operation) if (fdwroutine->ExecForeignInsert == NULL) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot insert into foreign table \"%s\"", - RelationGetRelationName(resultRel)))); + errmsg("cannot insert into foreign table \"%s\"", + RelationGetRelationName(resultRel)))); if (fdwroutine->IsForeignRelUpdatable != NULL && (fdwroutine->IsForeignRelUpdatable(resultRel) & (1 << CMD_INSERT)) == 0) ereport(ERROR, - (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("foreign table \"%s\" does not allow inserts", - RelationGetRelationName(resultRel)))); + (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), + errmsg("foreign table \"%s\" does not allow inserts", + RelationGetRelationName(resultRel)))); break; case CMD_UPDATE: if (fdwroutine->ExecForeignUpdate == NULL) @@ -1193,22 +1193,22 @@ CheckValidResultRel(Relation resultRel, CmdType operation) if (fdwroutine->IsForeignRelUpdatable != NULL && (fdwroutine->IsForeignRelUpdatable(resultRel) & (1 << CMD_UPDATE)) == 0) ereport(ERROR, - (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("foreign table \"%s\" does not allow updates", - RelationGetRelationName(resultRel)))); + (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), + errmsg("foreign table \"%s\" does not allow updates", + RelationGetRelationName(resultRel)))); break; case CMD_DELETE: if (fdwroutine->ExecForeignDelete == NULL) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot delete from foreign table \"%s\"", - RelationGetRelationName(resultRel)))); + errmsg("cannot delete from foreign table \"%s\"", + RelationGetRelationName(resultRel)))); if (fdwroutine->IsForeignRelUpdatable != NULL && (fdwroutine->IsForeignRelUpdatable(resultRel) & (1 << CMD_DELETE)) == 0) ereport(ERROR, - (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("foreign table \"%s\" does not allow deletes", - RelationGetRelationName(resultRel)))); + (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), + errmsg("foreign table \"%s\" does not allow deletes", + RelationGetRelationName(resultRel)))); break; default: elog(ERROR, "unrecognized CmdType: %d", (int) operation); @@ -1267,8 +1267,8 @@ CheckValidRowMarkRel(Relation rel, RowMarkType markType) if (markType != ROW_MARK_REFERENCE) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("cannot lock rows in materialized view \"%s\"", - RelationGetRelationName(rel)))); + errmsg("cannot lock rows in materialized view \"%s\"", + RelationGetRelationName(rel)))); break; case RELKIND_FOREIGN_TABLE: /* Okay only if the FDW supports it */ @@ -1875,7 +1875,7 @@ ExecPartitionCheck(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, tupdesc = RelationGetDescr(rel); /* a reverse map */ map = convert_tuples_by_name(old_tupdesc, tupdesc, - gettext_noop("could not convert row type")); + gettext_noop("could not convert row type")); if (map != NULL) { tuple = do_convert_tuple(tuple, map); @@ -1893,9 +1893,9 @@ ExecPartitionCheck(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, 64); ereport(ERROR, (errcode(ERRCODE_CHECK_VIOLATION), - errmsg("new row for relation \"%s\" violates partition constraint", - RelationGetRelationName(orig_rel)), - val_desc ? errdetail("Failing row contains %s.", val_desc) : 0)); + errmsg("new row for relation \"%s\" violates partition constraint", + RelationGetRelationName(orig_rel)), + val_desc ? errdetail("Failing row contains %s.", val_desc) : 0)); } } @@ -1952,7 +1952,7 @@ ExecConstraints(ResultRelInfo *resultRelInfo, tupdesc = RelationGetDescr(rel); /* a reverse map */ map = convert_tuples_by_name(orig_tupdesc, tupdesc, - gettext_noop("could not convert row type")); + gettext_noop("could not convert row type")); if (map != NULL) { tuple = do_convert_tuple(tuple, map); @@ -1972,7 +1972,7 @@ ExecConstraints(ResultRelInfo *resultRelInfo, ereport(ERROR, (errcode(ERRCODE_NOT_NULL_VIOLATION), errmsg("null value in column \"%s\" violates not-null constraint", - NameStr(orig_tupdesc->attrs[attrChk - 1]->attname)), + NameStr(orig_tupdesc->attrs[attrChk - 1]->attname)), val_desc ? errdetail("Failing row contains %s.", val_desc) : 0, errtablecol(orig_rel, attrChk))); } @@ -1999,7 +1999,7 @@ ExecConstraints(ResultRelInfo *resultRelInfo, tupdesc = RelationGetDescr(rel); /* a reverse map */ map = convert_tuples_by_name(old_tupdesc, tupdesc, - gettext_noop("could not convert row type")); + gettext_noop("could not convert row type")); if (map != NULL) { tuple = do_convert_tuple(tuple, map); @@ -2019,7 +2019,7 @@ ExecConstraints(ResultRelInfo *resultRelInfo, (errcode(ERRCODE_CHECK_VIOLATION), errmsg("new row for relation \"%s\" violates check constraint \"%s\"", RelationGetRelationName(orig_rel), failed), - val_desc ? errdetail("Failing row contains %s.", val_desc) : 0, + val_desc ? errdetail("Failing row contains %s.", val_desc) : 0, errtableconstraint(orig_rel, failed))); } } @@ -2108,8 +2108,8 @@ ExecWithCheckOptions(WCOKind kind, ResultRelInfo *resultRelInfo, ereport(ERROR, (errcode(ERRCODE_WITH_CHECK_OPTION_VIOLATION), - errmsg("new row violates check option for view \"%s\"", - wco->relname), + errmsg("new row violates check option for view \"%s\"", + wco->relname), val_desc ? errdetail("Failing row contains %s.", val_desc) : 0)); break; @@ -2577,7 +2577,7 @@ EvalPlanQualFetch(EState *estate, Relation relation, int lockmode, ereport(ERROR, (errcode(ERRCODE_LOCK_NOT_AVAILABLE), errmsg("could not obtain lock on row in relation \"%s\"", - RelationGetRelationName(relation)))); + RelationGetRelationName(relation)))); break; } continue; /* loop back to repeat heap_fetch */ @@ -2875,8 +2875,8 @@ EvalPlanQualFetchRowMarks(EPQState *epqstate) if (fdwroutine->RefetchForeignRow == NULL) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot lock rows in foreign table \"%s\"", - RelationGetRelationName(erm->relation)))); + errmsg("cannot lock rows in foreign table \"%s\"", + RelationGetRelationName(erm->relation)))); copyTuple = fdwroutine->RefetchForeignRow(epqstate->estate, erm, datum, @@ -3232,7 +3232,7 @@ ExecSetupPartitionTupleRouting(Relation rel, *partitions = (ResultRelInfo *) palloc(*num_partitions * sizeof(ResultRelInfo)); *tup_conv_maps = (TupleConversionMap **) palloc0(*num_partitions * - sizeof(TupleConversionMap *)); + sizeof(TupleConversionMap *)); /* * Initialize an empty slot that will be used to manipulate tuples of any @@ -3267,7 +3267,7 @@ ExecSetupPartitionTupleRouting(Relation rel, * partition from the parent's type to the partition's. */ (*tup_conv_maps)[i] = convert_tuples_by_name(tupDesc, part_tupdesc, - gettext_noop("could not convert row type")); + gettext_noop("could not convert row type")); InitResultRelInfo(leaf_part_rri, partrel, diff --git a/src/backend/executor/execParallel.c b/src/backend/executor/execParallel.c index 1c02fa140b0..ce47f1d4a8b 100644 --- a/src/backend/executor/execParallel.c +++ b/src/backend/executor/execParallel.c @@ -110,7 +110,7 @@ static bool ExecParallelInitializeDSM(PlanState *node, static shm_mq_handle **ExecParallelSetupTupleQueues(ParallelContext *pcxt, bool reinitialize); static bool ExecParallelRetrieveInstrumentation(PlanState *planstate, - SharedExecutorInstrumentation *instrumentation); + SharedExecutorInstrumentation *instrumentation); /* Helper function that runs in the parallel worker. */ static DestReceiver *ExecParallelGetReceiver(dsm_segment *seg, shm_toc *toc); @@ -446,7 +446,7 @@ ExecInitParallelPlan(PlanState *planstate, EState *estate, int nworkers) /* Estimate space for tuple queues. */ shm_toc_estimate_chunk(&pcxt->estimator, - mul_size(PARALLEL_TUPLE_QUEUE_SIZE, pcxt->nworkers)); + mul_size(PARALLEL_TUPLE_QUEUE_SIZE, pcxt->nworkers)); shm_toc_estimate_keys(&pcxt->estimator, 1); /* @@ -504,7 +504,7 @@ ExecInitParallelPlan(PlanState *planstate, EState *estate, int nworkers) /* Allocate space for each worker's BufferUsage; no need to initialize. */ bufusage_space = shm_toc_allocate(pcxt->toc, - mul_size(sizeof(BufferUsage), pcxt->nworkers)); + mul_size(sizeof(BufferUsage), pcxt->nworkers)); shm_toc_insert(pcxt->toc, PARALLEL_KEY_BUFFER_USAGE, bufusage_space); pei->buffer_usage = bufusage_space; @@ -583,7 +583,7 @@ ExecInitParallelPlan(PlanState *planstate, EState *estate, int nworkers) */ static bool ExecParallelRetrieveInstrumentation(PlanState *planstate, - SharedExecutorInstrumentation *instrumentation) + SharedExecutorInstrumentation *instrumentation) { Instrumentation *instrument; int i; @@ -735,7 +735,7 @@ ExecParallelGetQueryDesc(shm_toc *toc, DestReceiver *receiver, */ static bool ExecParallelReportInstrumentation(PlanState *planstate, - SharedExecutorInstrumentation *instrumentation) + SharedExecutorInstrumentation *instrumentation) { int i; int plan_node_id = planstate->plan->plan_node_id; @@ -804,7 +804,7 @@ ExecParallelInitializeWorker(PlanState *planstate, shm_toc *toc) break; case T_BitmapHeapScanState: ExecBitmapHeapInitializeWorker( - (BitmapHeapScanState *) planstate, toc); + (BitmapHeapScanState *) planstate, toc); break; default: break; diff --git a/src/backend/executor/execProcnode.c b/src/backend/executor/execProcnode.c index 5469cde1e00..294ad2cff99 100644 --- a/src/backend/executor/execProcnode.c +++ b/src/backend/executor/execProcnode.c @@ -259,7 +259,7 @@ ExecInitNode(Plan *node, EState *estate, int eflags) case T_NamedTuplestoreScan: result = (PlanState *) ExecInitNamedTuplestoreScan((NamedTuplestoreScan *) node, - estate, eflags); + estate, eflags); break; case T_WorkTableScan: diff --git a/src/backend/executor/execReplication.c b/src/backend/executor/execReplication.c index c6a66b6195f..6dae79a8f00 100644 --- a/src/backend/executor/execReplication.c +++ b/src/backend/executor/execReplication.c @@ -568,6 +568,6 @@ CheckSubscriptionRelkind(char relkind, const char *nspname, if (relkind != RELKIND_RELATION) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("logical replication target relation \"%s.%s\" is not a table", - nspname, relname))); + errmsg("logical replication target relation \"%s.%s\" is not a table", + nspname, relname))); } diff --git a/src/backend/executor/execSRF.c b/src/backend/executor/execSRF.c index 077ac208c13..138e86ac674 100644 --- a/src/backend/executor/execSRF.c +++ b/src/backend/executor/execSRF.c @@ -291,7 +291,7 @@ ExecMakeTableFunctionResult(SetExprState *setexpr, */ oldcontext = MemoryContextSwitchTo(econtext->ecxt_per_query_memory); tupdesc = lookup_rowtype_tupdesc_copy(HeapTupleHeaderGetTypeId(td), - HeapTupleHeaderGetTypMod(td)); + HeapTupleHeaderGetTypMod(td)); rsinfo.setDesc = tupdesc; MemoryContextSwitchTo(oldcontext); } @@ -667,10 +667,10 @@ init_sexpr(Oid foid, Oid input_collation, Expr *node, if (list_length(sexpr->args) > FUNC_MAX_ARGS) ereport(ERROR, (errcode(ERRCODE_TOO_MANY_ARGUMENTS), - errmsg_plural("cannot pass more than %d argument to a function", - "cannot pass more than %d arguments to a function", - FUNC_MAX_ARGS, - FUNC_MAX_ARGS))); + errmsg_plural("cannot pass more than %d argument to a function", + "cannot pass more than %d arguments to a function", + FUNC_MAX_ARGS, + FUNC_MAX_ARGS))); /* Set up the primary fmgr lookup information */ fmgr_info_cxt(foid, &(sexpr->func), sexprCxt); @@ -687,7 +687,7 @@ init_sexpr(Oid foid, Oid input_collation, Expr *node, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("set-valued function called in context that cannot accept a set"), parent ? executor_errposition(parent->state, - exprLocation((Node *) node)) : 0)); + exprLocation((Node *) node)) : 0)); /* Otherwise, caller should have marked the sexpr correctly */ Assert(sexpr->func.fn_retset == sexpr->funcReturnsSet); @@ -897,7 +897,7 @@ tupledesc_match(TupleDesc dst_tupdesc, TupleDesc src_tupdesc) (errcode(ERRCODE_DATATYPE_MISMATCH), errmsg("function return row and query-specified return row do not match"), errdetail_plural("Returned row contains %d attribute, but query expects %d.", - "Returned row contains %d attributes, but query expects %d.", + "Returned row contains %d attributes, but query expects %d.", src_tupdesc->natts, src_tupdesc->natts, dst_tupdesc->natts))); diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c index 9abf0aa15d2..7ae70a877a0 100644 --- a/src/backend/executor/execTuples.c +++ b/src/backend/executor/execTuples.c @@ -1213,7 +1213,7 @@ HeapTupleHeaderGetDatum(HeapTupleHeader tuple) /* And do the flattening */ result = toast_flatten_tuple_to_datum(tuple, - HeapTupleHeaderGetDatumLength(tuple), + HeapTupleHeaderGetDatumLength(tuple), tupDesc); ReleaseTupleDesc(tupDesc); diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c index 7199ff6fd72..3630f5d9668 100644 --- a/src/backend/executor/functions.c +++ b/src/backend/executor/functions.c @@ -517,7 +517,7 @@ init_execution_state(List *queryTree_list, ((CopyStmt *) stmt->utilityStmt)->filename == NULL) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot COPY to/from client in a SQL function"))); + errmsg("cannot COPY to/from client in a SQL function"))); if (IsA(stmt->utilityStmt, TransactionStmt)) ereport(ERROR, @@ -531,8 +531,8 @@ init_execution_state(List *queryTree_list, ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), /* translator: %s is a SQL statement name */ - errmsg("%s is not allowed in a non-volatile function", - CreateCommandTag((Node *) stmt)))); + errmsg("%s is not allowed in a non-volatile function", + CreateCommandTag((Node *) stmt)))); if (IsInParallelMode() && !CommandIsReadOnly(stmt)) PreventCommandIfParallelMode(CreateCommandTag((Node *) stmt)); @@ -713,7 +713,7 @@ init_sql_fcache(FmgrInfo *finfo, Oid collation, bool lazyEvalOK) queryTree_sublist = pg_analyze_and_rewrite_params(parsetree, fcache->src, - (ParserSetupHook) sql_fn_parser_setup, + (ParserSetupHook) sql_fn_parser_setup, fcache->pinfo, NULL); queryTree_list = lappend(queryTree_list, queryTree_sublist); @@ -1594,8 +1594,8 @@ check_sql_fn_retval(Oid func_id, Oid rettype, List *queryTreeList, if (rettype != VOIDOID) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("return type mismatch in function declared to return %s", - format_type_be(rettype)), + errmsg("return type mismatch in function declared to return %s", + format_type_be(rettype)), errdetail("Function's final statement must be SELECT or INSERT/UPDATE/DELETE RETURNING."))); return false; } @@ -1631,9 +1631,9 @@ check_sql_fn_retval(Oid func_id, Oid rettype, List *queryTreeList, if (tlistlen != 1) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("return type mismatch in function declared to return %s", - format_type_be(rettype)), - errdetail("Final statement must return exactly one column."))); + errmsg("return type mismatch in function declared to return %s", + format_type_be(rettype)), + errdetail("Final statement must return exactly one column."))); /* We assume here that non-junk TLEs must come first in tlists */ tle = (TargetEntry *) linitial(tlist); @@ -1643,8 +1643,8 @@ check_sql_fn_retval(Oid func_id, Oid rettype, List *queryTreeList, if (!IsBinaryCoercible(restype, rettype)) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("return type mismatch in function declared to return %s", - format_type_be(rettype)), + errmsg("return type mismatch in function declared to return %s", + format_type_be(rettype)), errdetail("Actual return type is %s.", format_type_be(restype)))); if (modifyTargetList && restype != rettype) @@ -1698,8 +1698,8 @@ check_sql_fn_retval(Oid func_id, Oid rettype, List *queryTreeList, tle->expr = (Expr *) makeRelabelType(tle->expr, rettype, -1, - get_typcollation(rettype), - COERCE_IMPLICIT_CAST); + get_typcollation(rettype), + COERCE_IMPLICIT_CAST); /* Relabel is dangerous if sort/group or setop column */ if (tle->ressortgroupref != 0 || parse->setOperations) *modifyTargetList = true; @@ -1758,7 +1758,7 @@ check_sql_fn_retval(Oid func_id, Oid rettype, List *queryTreeList, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), errmsg("return type mismatch in function declared to return %s", format_type_be(rettype)), - errdetail("Final statement returns too many columns."))); + errdetail("Final statement returns too many columns."))); attr = tupdesc->attrs[colindex - 1]; if (attr->attisdropped && modifyTargetList) { @@ -1802,8 +1802,8 @@ check_sql_fn_retval(Oid func_id, Oid rettype, List *queryTreeList, tle->expr = (Expr *) makeRelabelType(tle->expr, atttype, -1, - get_typcollation(atttype), - COERCE_IMPLICIT_CAST); + get_typcollation(atttype), + COERCE_IMPLICIT_CAST); /* Relabel is dangerous if sort/group or setop column */ if (tle->ressortgroupref != 0 || parse->setOperations) *modifyTargetList = true; @@ -1821,7 +1821,7 @@ check_sql_fn_retval(Oid func_id, Oid rettype, List *queryTreeList, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), errmsg("return type mismatch in function declared to return %s", format_type_be(rettype)), - errdetail("Final statement returns too few columns."))); + errdetail("Final statement returns too few columns."))); if (modifyTargetList) { Expr *null_expr; @@ -1861,7 +1861,7 @@ check_sql_fn_retval(Oid func_id, Oid rettype, List *queryTreeList, /* Set up junk filter if needed */ if (junkFilter) *junkFilter = ExecInitJunkFilterConversion(tlist, - CreateTupleDescCopy(tupdesc), + CreateTupleDescCopy(tupdesc), NULL); /* Report that we are returning entire tuple result */ diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index b0f9520e530..de9a18e71c3 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -752,7 +752,7 @@ initialize_aggregate(AggState *aggstate, AggStatePerTrans pertrans, MemoryContext oldContext; oldContext = MemoryContextSwitchTo( - aggstate->curaggcontext->ecxt_per_tuple_memory); + aggstate->curaggcontext->ecxt_per_tuple_memory); pergroupstate->transValue = datumCopy(pertrans->initValue, pertrans->transtypeByVal, pertrans->transtypeLen); @@ -869,7 +869,7 @@ advance_transition_function(AggState *aggstate, * do not need to pfree the old transValue, since it's NULL. */ oldContext = MemoryContextSwitchTo( - aggstate->curaggcontext->ecxt_per_tuple_memory); + aggstate->curaggcontext->ecxt_per_tuple_memory); pergroupstate->transValue = datumCopy(fcinfo->arg[1], pertrans->transtypeByVal, pertrans->transtypeLen); @@ -1200,9 +1200,9 @@ advance_combine_function(AggState *aggstate, if (!pertrans->transtypeByVal) { oldContext = MemoryContextSwitchTo( - aggstate->curaggcontext->ecxt_per_tuple_memory); + aggstate->curaggcontext->ecxt_per_tuple_memory); pergroupstate->transValue = datumCopy(fcinfo->arg[1], - pertrans->transtypeByVal, + pertrans->transtypeByVal, pertrans->transtypeLen); MemoryContextSwitchTo(oldContext); } @@ -1530,7 +1530,7 @@ finalize_aggregate(AggState *aggstate, /* Fill in the transition state value */ fcinfo.arg[0] = MakeExpandedObjectReadOnly(pergroupstate->transValue, - pergroupstate->transValueIsNull, + pergroupstate->transValueIsNull, pertrans->transtypeLen); fcinfo.argnull[0] = pergroupstate->transValueIsNull; anynull |= pergroupstate->transValueIsNull; @@ -1610,8 +1610,8 @@ finalize_partialaggregate(AggState *aggstate, FunctionCallInfo fcinfo = &pertrans->serialfn_fcinfo; fcinfo->arg[0] = MakeExpandedObjectReadOnly(pergroupstate->transValue, - pergroupstate->transValueIsNull, - pertrans->transtypeLen); + pergroupstate->transValueIsNull, + pertrans->transtypeLen); fcinfo->argnull[0] = pergroupstate->transValueIsNull; *resultVal = FunctionCallInvoke(fcinfo); @@ -1872,9 +1872,9 @@ build_hash_table(AggState *aggstate) perhash->hashfunctions, perhash->aggnode->numGroups, additionalsize, - aggstate->hashcontext->ecxt_per_tuple_memory, + aggstate->hashcontext->ecxt_per_tuple_memory, tmpmem, - DO_AGGSPLIT_SKIPFINAL(aggstate->aggsplit)); + DO_AGGSPLIT_SKIPFINAL(aggstate->aggsplit)); } } @@ -2051,7 +2051,7 @@ lookup_hash_entry(AggState *aggstate) { entry->additional = (AggStatePerGroup) MemoryContextAlloc(perhash->hashtable->tablecxt, - sizeof(AggStatePerGroupData) * aggstate->numtrans); + sizeof(AggStatePerGroupData) * aggstate->numtrans); /* initialize aggregates for new tuple group */ initialize_aggregates(aggstate, (AggStatePerGroup) entry->additional, -1); @@ -2433,7 +2433,7 @@ agg_retrieve_direct(AggState *aggstate) node->numCols, node->grpColIdx, aggstate->phase->eqfunctions, - tmpcontext->ecxt_per_tuple_memory)) + tmpcontext->ecxt_per_tuple_memory)) { aggstate->grp_firstTuple = ExecCopySlotTuple(outerslot); break; @@ -2817,7 +2817,7 @@ ExecInitAgg(Agg *node, EState *estate, int eflags) ExecAssignScanTypeFromOuterPlan(&aggstate->ss); if (node->chain) ExecSetSlotDescriptor(aggstate->sort_slot, - aggstate->ss.ss_ScanTupleSlot->tts_tupleDescriptor); + aggstate->ss.ss_ScanTupleSlot->tts_tupleDescriptor); /* * Initialize result tuple type and projection info. @@ -2933,7 +2933,7 @@ ExecInitAgg(Agg *node, EState *estate, int eflags) } all_grouped_cols = bms_add_members(all_grouped_cols, - phasedata->grouped_cols[0]); + phasedata->grouped_cols[0]); } else { @@ -3304,8 +3304,8 @@ ExecInitAgg(Agg *node, EState *estate, int eflags) */ existing_transno = find_compatible_pertrans(aggstate, aggref, transfn_oid, aggtranstype, - serialfn_oid, deserialfn_oid, - initValue, initValueIsNull, + serialfn_oid, deserialfn_oid, + initValue, initValueIsNull, same_input_transnos); if (existing_transno != -1) { @@ -3977,7 +3977,7 @@ ExecReScanAgg(AggState *node) * Reset the per-group state (in particular, mark transvalues null) */ MemSet(node->pergroup, 0, - sizeof(AggStatePerGroupData) * node->numaggs * numGroupingSets); + sizeof(AggStatePerGroupData) * node->numaggs * numGroupingSets); /* reset to phase 1 */ initialize_phase(node, 1); diff --git a/src/backend/executor/nodeBitmapIndexscan.c b/src/backend/executor/nodeBitmapIndexscan.c index c9f8b7c7fba..2411a2e5c1a 100644 --- a/src/backend/executor/nodeBitmapIndexscan.c +++ b/src/backend/executor/nodeBitmapIndexscan.c @@ -254,7 +254,7 @@ ExecInitBitmapIndexScan(BitmapIndexScan *node, EState *estate, int eflags) */ relistarget = ExecRelationIsTargetRelation(estate, node->scan.scanrelid); indexstate->biss_RelationDesc = index_open(node->indexid, - relistarget ? NoLock : AccessShareLock); + relistarget ? NoLock : AccessShareLock); /* * Initialize index-specific scan state diff --git a/src/backend/executor/nodeFunctionscan.c b/src/backend/executor/nodeFunctionscan.c index 426527d2a2a..3217d641d76 100644 --- a/src/backend/executor/nodeFunctionscan.c +++ b/src/backend/executor/nodeFunctionscan.c @@ -96,7 +96,7 @@ FunctionNext(FunctionScanState *node) node->ss.ps.ps_ExprContext, node->argcontext, node->funcstates[0].tupdesc, - node->eflags & EXEC_FLAG_BACKWARD); + node->eflags & EXEC_FLAG_BACKWARD); /* * paranoia - cope if the function, which may have constructed the @@ -155,7 +155,7 @@ FunctionNext(FunctionScanState *node) node->ss.ps.ps_ExprContext, node->argcontext, fs->tupdesc, - node->eflags & EXEC_FLAG_BACKWARD); + node->eflags & EXEC_FLAG_BACKWARD); /* * paranoia - cope if the function, which may have constructed the diff --git a/src/backend/executor/nodeGatherMerge.c b/src/backend/executor/nodeGatherMerge.c index b1965f5e1c4..80ee1fc89b4 100644 --- a/src/backend/executor/nodeGatherMerge.c +++ b/src/backend/executor/nodeGatherMerge.c @@ -515,7 +515,7 @@ form_tuple_array(GatherMergeState *gm_state, int reader) tuple_buffer->tuple[i] = heap_copytuple(gm_readnext_tuple(gm_state, reader, false, - &tuple_buffer->done)); + &tuple_buffer->done)); if (!HeapTupleIsValid(tuple_buffer->tuple[i])) break; tuple_buffer->nTuples++; diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c index 6c84ad9989a..075f4ed11c8 100644 --- a/src/backend/executor/nodeHash.c +++ b/src/backend/executor/nodeHash.c @@ -657,7 +657,7 @@ ExecHashIncreaseNumBatches(HashJoinTable hashtable) hashtable->log2_nbuckets = hashtable->log2_nbuckets_optimal; hashtable->buckets = repalloc(hashtable->buckets, - sizeof(HashJoinTuple) * hashtable->nbuckets); + sizeof(HashJoinTuple) * hashtable->nbuckets); } /* @@ -783,7 +783,7 @@ ExecHashIncreaseNumBuckets(HashJoinTable hashtable) */ hashtable->buckets = (HashJoinTuple *) repalloc(hashtable->buckets, - hashtable->nbuckets * sizeof(HashJoinTuple)); + hashtable->nbuckets * sizeof(HashJoinTuple)); memset(hashtable->buckets, 0, hashtable->nbuckets * sizeof(HashJoinTuple)); @@ -1650,7 +1650,7 @@ dense_alloc(HashJoinTable hashtable, Size size) { /* allocate new chunk and put it at the beginning of the list */ newChunk = (HashMemoryChunk) MemoryContextAlloc(hashtable->batchCxt, - offsetof(HashMemoryChunkData, data) + size); + offsetof(HashMemoryChunkData, data) + size); newChunk->maxlen = size; newChunk->used = 0; newChunk->ntuples = 0; @@ -1685,7 +1685,7 @@ dense_alloc(HashJoinTable hashtable, Size size) { /* allocate new chunk and put it at the beginning of the list */ newChunk = (HashMemoryChunk) MemoryContextAlloc(hashtable->batchCxt, - offsetof(HashMemoryChunkData, data) + HASH_CHUNK_SIZE); + offsetof(HashMemoryChunkData, data) + HASH_CHUNK_SIZE); newChunk->maxlen = HASH_CHUNK_SIZE; newChunk->used = size; diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c index 8d2325398b8..668ed871e19 100644 --- a/src/backend/executor/nodeHashjoin.c +++ b/src/backend/executor/nodeHashjoin.c @@ -234,7 +234,7 @@ ExecHashJoin(HashJoinState *node) Assert(batchno > hashtable->curbatch); ExecHashJoinSaveTuple(ExecFetchSlotMinimalTuple(outerTupleSlot), hashvalue, - &hashtable->outerBatchFile[batchno]); + &hashtable->outerBatchFile[batchno]); /* Loop around, staying in HJ_NEED_NEW_OUTER state */ continue; } @@ -452,20 +452,20 @@ ExecInitHashJoin(HashJoin *node, EState *estate, int eflags) case JOIN_ANTI: hjstate->hj_NullInnerTupleSlot = ExecInitNullTupleSlot(estate, - ExecGetResultType(innerPlanState(hjstate))); + ExecGetResultType(innerPlanState(hjstate))); break; case JOIN_RIGHT: hjstate->hj_NullOuterTupleSlot = ExecInitNullTupleSlot(estate, - ExecGetResultType(outerPlanState(hjstate))); + ExecGetResultType(outerPlanState(hjstate))); break; case JOIN_FULL: hjstate->hj_NullOuterTupleSlot = ExecInitNullTupleSlot(estate, - ExecGetResultType(outerPlanState(hjstate))); + ExecGetResultType(outerPlanState(hjstate))); hjstate->hj_NullInnerTupleSlot = ExecInitNullTupleSlot(estate, - ExecGetResultType(innerPlanState(hjstate))); + ExecGetResultType(innerPlanState(hjstate))); break; default: elog(ERROR, "unrecognized join type: %d", @@ -764,7 +764,7 @@ ExecHashJoinNewBatch(HashJoinState *hjstate) if (BufFileSeek(innerFile, 0, 0L, SEEK_SET)) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not rewind hash-join temporary file: %m"))); + errmsg("could not rewind hash-join temporary file: %m"))); while ((slot = ExecHashJoinGetSavedTuple(hjstate, innerFile, @@ -794,7 +794,7 @@ ExecHashJoinNewBatch(HashJoinState *hjstate) if (BufFileSeek(hashtable->outerBatchFile[curbatch], 0, 0L, SEEK_SET)) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not rewind hash-join temporary file: %m"))); + errmsg("could not rewind hash-join temporary file: %m"))); } return true; diff --git a/src/backend/executor/nodeIndexonlyscan.c b/src/backend/executor/nodeIndexonlyscan.c index fb3d3bb1218..890e54416a5 100644 --- a/src/backend/executor/nodeIndexonlyscan.c +++ b/src/backend/executor/nodeIndexonlyscan.c @@ -542,7 +542,7 @@ ExecInitIndexOnlyScan(IndexOnlyScan *node, EState *estate, int eflags) */ relistarget = ExecRelationIsTargetRelation(estate, node->scan.scanrelid); indexstate->ioss_RelationDesc = index_open(node->indexid, - relistarget ? NoLock : AccessShareLock); + relistarget ? NoLock : AccessShareLock); /* * Initialize index-specific scan state diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c index 7e123758b4f..d8aceb1f2c8 100644 --- a/src/backend/executor/nodeIndexscan.c +++ b/src/backend/executor/nodeIndexscan.c @@ -970,7 +970,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, int eflags) */ relistarget = ExecRelationIsTargetRelation(estate, node->scan.scanrelid); indexstate->iss_RelationDesc = index_open(node->indexid, - relistarget ? NoLock : AccessShareLock); + relistarget ? NoLock : AccessShareLock); /* * Initialize index-specific scan state diff --git a/src/backend/executor/nodeLimit.c b/src/backend/executor/nodeLimit.c index aaec1322189..abd060d75f4 100644 --- a/src/backend/executor/nodeLimit.c +++ b/src/backend/executor/nodeLimit.c @@ -248,8 +248,8 @@ recompute_limits(LimitState *node) node->offset = DatumGetInt64(val); if (node->offset < 0) ereport(ERROR, - (errcode(ERRCODE_INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE), - errmsg("OFFSET must not be negative"))); + (errcode(ERRCODE_INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE), + errmsg("OFFSET must not be negative"))); } } else diff --git a/src/backend/executor/nodeMergejoin.c b/src/backend/executor/nodeMergejoin.c index 94a5e98e3e0..6a145ee33a2 100644 --- a/src/backend/executor/nodeMergejoin.c +++ b/src/backend/executor/nodeMergejoin.c @@ -1534,14 +1534,14 @@ ExecInitMergeJoin(MergeJoin *node, EState *estate, int eflags) mergestate->mj_FillInner = false; mergestate->mj_NullInnerTupleSlot = ExecInitNullTupleSlot(estate, - ExecGetResultType(innerPlanState(mergestate))); + ExecGetResultType(innerPlanState(mergestate))); break; case JOIN_RIGHT: mergestate->mj_FillOuter = false; mergestate->mj_FillInner = true; mergestate->mj_NullOuterTupleSlot = ExecInitNullTupleSlot(estate, - ExecGetResultType(outerPlanState(mergestate))); + ExecGetResultType(outerPlanState(mergestate))); /* * Can't handle right or full join with non-constant extra @@ -1558,10 +1558,10 @@ ExecInitMergeJoin(MergeJoin *node, EState *estate, int eflags) mergestate->mj_FillInner = true; mergestate->mj_NullOuterTupleSlot = ExecInitNullTupleSlot(estate, - ExecGetResultType(outerPlanState(mergestate))); + ExecGetResultType(outerPlanState(mergestate))); mergestate->mj_NullInnerTupleSlot = ExecInitNullTupleSlot(estate, - ExecGetResultType(innerPlanState(mergestate))); + ExecGetResultType(innerPlanState(mergestate))); /* * Can't handle right or full join with non-constant extra diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c index 11594b58b57..5e43a069426 100644 --- a/src/backend/executor/nodeModifyTable.c +++ b/src/backend/executor/nodeModifyTable.c @@ -107,7 +107,7 @@ ExecCheckPlanOutput(Relation resultRel, List *targetList) errdetail("Table has type %s at ordinal position %d, but query expects %s.", format_type_be(attr->atttypid), attno, - format_type_be(exprType((Node *) tle->expr))))); + format_type_be(exprType((Node *) tle->expr))))); } else { @@ -128,7 +128,7 @@ ExecCheckPlanOutput(Relation resultRel, List *targetList) if (attno != resultDesc->natts) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("table row type and query-specified row type do not match"), + errmsg("table row type and query-specified row type do not match"), errdetail("Query has too few columns."))); } @@ -211,7 +211,7 @@ ExecCheckHeapTupleVisible(EState *estate, if (!TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetXmin(tuple->t_data))) ereport(ERROR, (errcode(ERRCODE_T_R_SERIALIZATION_FAILURE), - errmsg("could not serialize access due to concurrent update"))); + errmsg("could not serialize access due to concurrent update"))); } LockBuffer(buffer, BUFFER_LOCK_UNLOCK); } @@ -291,7 +291,7 @@ ExecInsert(ModifyTableState *mtstate, * respectively. */ leaf_part_index = ExecFindPartition(resultRelInfo, - mtstate->mt_partition_dispatch_info, + mtstate->mt_partition_dispatch_info, slot, estate); Assert(leaf_part_index >= 0 && @@ -308,7 +308,7 @@ ExecInsert(ModifyTableState *mtstate, 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 */ estate->es_result_relation_info = resultRelInfo; @@ -529,7 +529,7 @@ ExecInsert(ModifyTableState *mtstate, /* insert index entries for tuple */ recheckIndexes = ExecInsertIndexTuples(slot, &(tuple->t_self), - estate, true, &specConflict, + estate, true, &specConflict, arbiterIndexes); /* adjust the tuple's state accordingly */ @@ -1614,16 +1614,16 @@ ExecModifyTable(ModifyTableState *node) { case CMD_INSERT: slot = ExecInsert(node, slot, planSlot, - node->mt_arbiterindexes, node->mt_onconflict, + node->mt_arbiterindexes, node->mt_onconflict, estate, node->canSetTag); break; case CMD_UPDATE: slot = ExecUpdate(tupleid, oldtuple, slot, planSlot, - &node->mt_epqstate, estate, node->canSetTag); + &node->mt_epqstate, estate, node->canSetTag); break; case CMD_DELETE: slot = ExecDelete(tupleid, oldtuple, planSlot, - &node->mt_epqstate, estate, node->canSetTag); + &node->mt_epqstate, estate, node->canSetTag); break; default: elog(ERROR, "unknown operation"); @@ -1721,7 +1721,7 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags) /* Initialize the usesFdwDirectModify flag */ resultRelInfo->ri_usesFdwDirectModify = bms_is_member(i, - node->fdwDirectModifyPlans); + node->fdwDirectModifyPlans); /* * Verify result relation is a valid target for the current operation @@ -1917,7 +1917,7 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags) resultRelInfo->ri_projectReturning = ExecBuildProjectionInfo(rlist, econtext, slot, &mtstate->ps, - resultRelInfo->ri_RelationDesc->rd_att); + resultRelInfo->ri_RelationDesc->rd_att); resultRelInfo++; } @@ -1941,7 +1941,7 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags) partrel, rel); resultRelInfo->ri_projectReturning = ExecBuildProjectionInfo(rlist, econtext, slot, &mtstate->ps, - resultRelInfo->ri_RelationDesc->rd_att); + resultRelInfo->ri_RelationDesc->rd_att); resultRelInfo++; } } @@ -1991,7 +1991,7 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags) /* create target slot for UPDATE SET projection */ tupDesc = ExecTypeFromTL((List *) node->onConflictSet, - resultRelInfo->ri_RelationDesc->rd_rel->relhasoids); + resultRelInfo->ri_RelationDesc->rd_rel->relhasoids); mtstate->mt_conflproj = ExecInitExtraTupleSlot(mtstate->ps.state); ExecSetSlotDescriptor(mtstate->mt_conflproj, tupDesc); @@ -2100,7 +2100,7 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags) subplan->targetlist); j = ExecInitJunkFilter(subplan->targetlist, - resultRelInfo->ri_RelationDesc->rd_att->tdhasoid, + resultRelInfo->ri_RelationDesc->rd_att->tdhasoid, ExecInitExtraTupleSlot(estate)); if (operation == CMD_UPDATE || operation == CMD_DELETE) diff --git a/src/backend/executor/nodeNestloop.c b/src/backend/executor/nodeNestloop.c index 69d245358e6..0065fe601ec 100644 --- a/src/backend/executor/nodeNestloop.c +++ b/src/backend/executor/nodeNestloop.c @@ -326,7 +326,7 @@ ExecInitNestLoop(NestLoop *node, EState *estate, int eflags) case JOIN_ANTI: nlstate->nl_NullInnerTupleSlot = ExecInitNullTupleSlot(estate, - ExecGetResultType(innerPlanState(nlstate))); + ExecGetResultType(innerPlanState(nlstate))); break; default: elog(ERROR, "unrecognized join type: %d", diff --git a/src/backend/executor/nodeSamplescan.c b/src/backend/executor/nodeSamplescan.c index 428fd98665e..b710ef7edf2 100644 --- a/src/backend/executor/nodeSamplescan.c +++ b/src/backend/executor/nodeSamplescan.c @@ -120,7 +120,7 @@ InitScanRelation(SampleScanState *node, EState *estate, int eflags) * open that relation and acquire appropriate lock on it. */ currentRelation = ExecOpenScanRelation(estate, - ((SampleScan *) node->ss.ps.plan)->scan.scanrelid, + ((SampleScan *) node->ss.ps.plan)->scan.scanrelid, eflags); node->ss.ss_currentRelation = currentRelation; @@ -307,7 +307,7 @@ tablesample_init(SampleScanState *scanstate) if (isnull) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLESAMPLE_REPEAT), - errmsg("TABLESAMPLE REPEATABLE parameter cannot be null"))); + errmsg("TABLESAMPLE REPEATABLE parameter cannot be null"))); /* * The REPEATABLE parameter has been coerced to float8 by the parser. diff --git a/src/backend/executor/nodeSeqscan.c b/src/backend/executor/nodeSeqscan.c index 822c6bf20ac..307df87c82f 100644 --- a/src/backend/executor/nodeSeqscan.c +++ b/src/backend/executor/nodeSeqscan.c @@ -145,7 +145,7 @@ InitScanRelation(SeqScanState *node, EState *estate, int eflags) * open that relation and acquire appropriate lock on it. */ currentRelation = ExecOpenScanRelation(estate, - ((SeqScan *) node->ss.ps.plan)->scanrelid, + ((SeqScan *) node->ss.ps.plan)->scanrelid, eflags); node->ss.ss_currentRelation = currentRelation; diff --git a/src/backend/executor/nodeTableFuncscan.c b/src/backend/executor/nodeTableFuncscan.c index da557ceb6f1..bb016ec8f60 100644 --- a/src/backend/executor/nodeTableFuncscan.c +++ b/src/backend/executor/nodeTableFuncscan.c @@ -288,7 +288,7 @@ tfuncFetchRows(TableFuncScanState *tstate, ExprContext *econtext) PG_TRY(); { routine->InitOpaque(tstate, - tstate->ss.ss_ScanTupleSlot->tts_tupleDescriptor->natts); + tstate->ss.ss_ScanTupleSlot->tts_tupleDescriptor->natts); /* * If evaluating the document expression returns NULL, the table @@ -398,9 +398,9 @@ tfuncInitialize(TableFuncScanState *tstate, ExprContext *econtext, Datum doc) if (isnull) ereport(ERROR, (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), - errmsg("column filter expression must not be null"), + errmsg("column filter expression must not be null"), errdetail("Filter for column \"%s\" is null.", - NameStr(tupdesc->attrs[colno]->attname)))); + NameStr(tupdesc->attrs[colno]->attname)))); colfilter = TextDatumGetCString(value); } else @@ -460,8 +460,8 @@ tfuncLoadRows(TableFuncScanState *tstate, ExprContext *econtext) values[colno] = routine->GetValue(tstate, colno, - tupdesc->attrs[colno]->atttypid, - tupdesc->attrs[colno]->atttypmod, + tupdesc->attrs[colno]->atttypid, + tupdesc->attrs[colno]->atttypmod, &isnull); /* No value? Evaluate and apply the default, if any */ @@ -479,7 +479,7 @@ tfuncLoadRows(TableFuncScanState *tstate, ExprContext *econtext) ereport(ERROR, (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), errmsg("null is not allowed in column \"%s\"", - NameStr(tupdesc->attrs[colno]->attname)))); + NameStr(tupdesc->attrs[colno]->attname)))); nulls[colno] = isnull; } diff --git a/src/backend/executor/nodeTidscan.c b/src/backend/executor/nodeTidscan.c index 64be613693c..96af2d21d9d 100644 --- a/src/backend/executor/nodeTidscan.c +++ b/src/backend/executor/nodeTidscan.c @@ -221,7 +221,7 @@ TidListEval(TidScanState *tidstate) Assert(tidexpr->cexpr); if (execCurrentOf(tidexpr->cexpr, econtext, - RelationGetRelid(tidstate->ss.ss_currentRelation), + RelationGetRelid(tidstate->ss.ss_currentRelation), &cursor_tid)) { if (numTids >= numAllocTids) diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c index 1f2cbdde361..8f13fe0c732 100644 --- a/src/backend/executor/nodeWindowAgg.c +++ b/src/backend/executor/nodeWindowAgg.c @@ -350,7 +350,7 @@ advance_windowaggregate(WindowAggState *winstate, if (fcinfo->isnull && OidIsValid(peraggstate->invtransfn_oid)) ereport(ERROR, (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), - errmsg("moving-aggregate transition function must not return null"))); + errmsg("moving-aggregate transition function must not return null"))); /* * We must track the number of rows included in transValue, since to @@ -599,7 +599,7 @@ finalize_windowaggregate(WindowAggState *winstate, perfuncstate->winCollation, (void *) winstate, NULL); fcinfo.arg[0] = MakeExpandedObjectReadOnly(peraggstate->transValue, - peraggstate->transValueIsNull, + peraggstate->transValueIsNull, peraggstate->transtypeLen); fcinfo.argnull[0] = peraggstate->transValueIsNull; anynull = peraggstate->transValueIsNull; @@ -1142,7 +1142,7 @@ begin_partition(WindowAggState *winstate) winobj->markptr = tuplestore_alloc_read_pointer(winstate->buffer, 0); winobj->readptr = tuplestore_alloc_read_pointer(winstate->buffer, - EXEC_FLAG_BACKWARD); + EXEC_FLAG_BACKWARD); winobj->markpos = -1; winobj->seekpos = -1; } @@ -1631,7 +1631,7 @@ ExecWindowAgg(WindowAggState *winstate) if (offset < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("frame starting offset must not be negative"))); + errmsg("frame starting offset must not be negative"))); } } if (frameOptions & FRAMEOPTION_END_VALUE) @@ -1656,7 +1656,7 @@ ExecWindowAgg(WindowAggState *winstate) if (offset < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("frame ending offset must not be negative"))); + errmsg("frame ending offset must not be negative"))); } } winstate->all_first = false; @@ -1732,8 +1732,8 @@ ExecWindowAgg(WindowAggState *winstate) if (perfuncstate->plain_agg) continue; eval_windowfunction(winstate, perfuncstate, - &(econtext->ecxt_aggvalues[perfuncstate->wfuncstate->wfuncno]), - &(econtext->ecxt_aggnulls[perfuncstate->wfuncstate->wfuncno])); + &(econtext->ecxt_aggvalues[perfuncstate->wfuncstate->wfuncno]), + &(econtext->ecxt_aggnulls[perfuncstate->wfuncstate->wfuncno])); } /* @@ -1863,7 +1863,7 @@ ExecInitWindowAgg(WindowAgg *node, EState *estate, int eflags) /* Set up data for comparing tuples */ if (node->partNumCols > 0) winstate->partEqfunctions = execTuplesMatchPrepare(node->partNumCols, - node->partOperators); + node->partOperators); if (node->ordNumCols > 0) winstate->ordEqfunctions = execTuplesMatchPrepare(node->ordNumCols, node->ordOperators); diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c index 9db41813d5d..cd00a6d9f25 100644 --- a/src/backend/executor/spi.c +++ b/src/backend/executor/spi.c @@ -1230,7 +1230,7 @@ SPI_cursor_open_internal(const char *name, SPIPlanPtr plan, if (!(portal->cursorOptions & (CURSOR_OPT_SCROLL | CURSOR_OPT_NO_SCROLL))) { if (list_length(stmt_list) == 1 && - linitial_node(PlannedStmt, stmt_list)->commandType != CMD_UTILITY && + linitial_node(PlannedStmt, stmt_list)->commandType != CMD_UTILITY && linitial_node(PlannedStmt, stmt_list)->rowMarks == NIL && ExecSupportsBackwardScan(linitial_node(PlannedStmt, stmt_list)->planTree)) portal->cursorOptions |= CURSOR_OPT_SCROLL; @@ -1246,7 +1246,7 @@ SPI_cursor_open_internal(const char *name, SPIPlanPtr plan, if (portal->cursorOptions & CURSOR_OPT_SCROLL) { if (list_length(stmt_list) == 1 && - linitial_node(PlannedStmt, stmt_list)->commandType != CMD_UTILITY && + linitial_node(PlannedStmt, stmt_list)->commandType != CMD_UTILITY && linitial_node(PlannedStmt, stmt_list)->rowMarks != NIL) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), @@ -1279,8 +1279,8 @@ SPI_cursor_open_internal(const char *name, SPIPlanPtr plan, ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), /* translator: %s is a SQL statement name */ - errmsg("%s is not allowed in a non-volatile function", - CreateCommandTag((Node *) pstmt)))); + errmsg("%s is not allowed in a non-volatile function", + CreateCommandTag((Node *) pstmt)))); else PreventCommandIfParallelMode(CreateCommandTag((Node *) pstmt)); } @@ -1713,7 +1713,7 @@ spi_printtup(TupleTableSlot *slot, DestReceiver *self) tuptable->free = tuptable->alloced; tuptable->alloced += tuptable->free; tuptable->vals = (HeapTuple *) repalloc_huge(tuptable->vals, - tuptable->alloced * sizeof(HeapTuple)); + tuptable->alloced * sizeof(HeapTuple)); } tuptable->vals[tuptable->alloced - tuptable->free] = @@ -1879,7 +1879,7 @@ _SPI_prepare_oneshot_plan(const char *src, SPIPlanPtr plan) plansource = CreateOneShotCachedPlan(parsetree, src, - CreateCommandTag(parsetree->stmt)); + CreateCommandTag(parsetree->stmt)); plancache_list = lappend(plancache_list, plansource); } @@ -1990,8 +1990,8 @@ _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI, stmt_list = pg_analyze_and_rewrite_params(parsetree, src, plan->parserSetup, - plan->parserSetupArg, - _SPI_current->queryEnv); + plan->parserSetupArg, + _SPI_current->queryEnv); } else { @@ -2066,8 +2066,8 @@ _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI, ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), /* translator: %s is a SQL statement name */ - errmsg("%s is not allowed in a non-volatile function", - CreateCommandTag((Node *) stmt)))); + errmsg("%s is not allowed in a non-volatile function", + CreateCommandTag((Node *) stmt)))); if (IsInParallelMode() && !CommandIsReadOnly(stmt)) PreventCommandIfParallelMode(CreateCommandTag((Node *) stmt)); diff --git a/src/backend/executor/tqueue.c b/src/backend/executor/tqueue.c index c086b5b682c..a4cfe9685ab 100644 --- a/src/backend/executor/tqueue.c +++ b/src/backend/executor/tqueue.c @@ -527,7 +527,7 @@ TQSendRecordInfo(TQueueDestReceiver *tqueue, int32 typmod, TupleDesc tupledesc) ctl.hcxt = tqueue->mycontext; tqueue->recordhtab = hash_create("tqueue sender record type hashtable", 100, &ctl, - HASH_ELEM | HASH_BLOBS | HASH_CONTEXT); + HASH_ELEM | HASH_BLOBS | HASH_CONTEXT); } /* Have we already seen this record type? If not, must report it. */ @@ -865,7 +865,7 @@ TQRemapArray(TupleQueueReader *reader, ArrayRemapInfo *remapinfo, /* Reconstruct and return the array. */ *changed = true; arr = construct_md_array(elem_values, elem_nulls, - ARR_NDIM(arr), ARR_DIMS(arr), ARR_LBOUND(arr), + ARR_NDIM(arr), ARR_DIMS(arr), ARR_LBOUND(arr), typid, remapinfo->typlen, remapinfo->typbyval, remapinfo->typalign); return PointerGetDatum(arr); @@ -1099,7 +1099,7 @@ TupleQueueHandleControlMessage(TupleQueueReader *reader, Size nbytes, ctl.hcxt = reader->mycontext; reader->typmodmap = hash_create("tqueue receiver record type hashtable", 100, &ctl, - HASH_ELEM | HASH_BLOBS | HASH_CONTEXT); + HASH_ELEM | HASH_BLOBS | HASH_CONTEXT); } /* Create map entry. */ diff --git a/src/backend/executor/tstoreReceiver.c b/src/backend/executor/tstoreReceiver.c index 1e641c9837f..eda38b1de13 100644 --- a/src/backend/executor/tstoreReceiver.c +++ b/src/backend/executor/tstoreReceiver.c @@ -135,7 +135,7 @@ tstoreReceiveSlot_detoast(TupleTableSlot *slot, DestReceiver *self) if (VARATT_IS_EXTERNAL(DatumGetPointer(val))) { val = PointerGetDatum(heap_tuple_fetch_attr((struct varlena *) - DatumGetPointer(val))); + DatumGetPointer(val))); myState->tofree[nfree++] = val; } } diff --git a/src/backend/lib/pairingheap.c b/src/backend/lib/pairingheap.c index 7c6bd837c68..fd871408f35 100644 --- a/src/backend/lib/pairingheap.c +++ b/src/backend/lib/pairingheap.c @@ -295,7 +295,7 @@ merge_children(pairingheap *heap, pairingheap_node *children) static void pairingheap_dump_recurse(StringInfo buf, pairingheap_node *node, - void (*dumpfunc) (pairingheap_node *node, StringInfo buf, void *opaque), + void (*dumpfunc) (pairingheap_node *node, StringInfo buf, void *opaque), void *opaque, int depth, pairingheap_node *prev_or_parent) @@ -316,7 +316,7 @@ pairingheap_dump_recurse(StringInfo buf, char * pairingheap_dump(pairingheap *heap, - void (*dumpfunc) (pairingheap_node *node, StringInfo buf, void *opaque), + void (*dumpfunc) (pairingheap_node *node, StringInfo buf, void *opaque), void *opaque) { StringInfoData buf; diff --git a/src/backend/libpq/auth-scram.c b/src/backend/libpq/auth-scram.c index a6042b8013d..0b69f106f18 100644 --- a/src/backend/libpq/auth-scram.c +++ b/src/backend/libpq/auth-scram.c @@ -674,8 +674,8 @@ read_any_attr(char **input, char *attr_p) ereport(ERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), errmsg("malformed SCRAM message"), - errdetail("Attribute expected, but found invalid character %s.", - sanitize_char(attr)))); + errdetail("Attribute expected, but found invalid character %s.", + sanitize_char(attr)))); if (attr_p) *attr_p = attr; begin++; @@ -1062,7 +1062,7 @@ read_client_final_message(scram_state *state, char *input) ereport(ERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), errmsg("malformed SCRAM message"), - errdetail("Garbage found at the end of client-final-message."))); + errdetail("Garbage found at the end of client-final-message."))); state->client_final_message_without_proof = palloc(proof - begin + 1); memcpy(state->client_final_message_without_proof, input, proof - begin); diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index b348bce3e2e..dd7de7c3a4e 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -373,7 +373,7 @@ ClientAuthentication(Port *port) if (!port->peer_cert_valid) ereport(FATAL, (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), - errmsg("connection requires a valid client certificate"))); + errmsg("connection requires a valid client certificate"))); } /* @@ -405,32 +405,32 @@ ClientAuthentication(Port *port) { #ifdef USE_SSL ereport(FATAL, - (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), - errmsg("pg_hba.conf rejects replication connection for host \"%s\", user \"%s\", %s", - hostinfo, port->user_name, - port->ssl_in_use ? _("SSL on") : _("SSL off")))); + (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), + errmsg("pg_hba.conf rejects replication connection for host \"%s\", user \"%s\", %s", + hostinfo, port->user_name, + port->ssl_in_use ? _("SSL on") : _("SSL off")))); #else ereport(FATAL, - (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), - errmsg("pg_hba.conf rejects replication connection for host \"%s\", user \"%s\"", - hostinfo, port->user_name))); + (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), + errmsg("pg_hba.conf rejects replication connection for host \"%s\", user \"%s\"", + hostinfo, port->user_name))); #endif } else { #ifdef USE_SSL ereport(FATAL, - (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), - errmsg("pg_hba.conf rejects connection for host \"%s\", user \"%s\", database \"%s\", %s", - hostinfo, port->user_name, - port->database_name, - port->ssl_in_use ? _("SSL on") : _("SSL off")))); + (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), + errmsg("pg_hba.conf rejects connection for host \"%s\", user \"%s\", database \"%s\", %s", + hostinfo, port->user_name, + port->database_name, + port->ssl_in_use ? _("SSL on") : _("SSL off")))); #else ereport(FATAL, - (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), - errmsg("pg_hba.conf rejects connection for host \"%s\", user \"%s\", database \"%s\"", - hostinfo, port->user_name, - port->database_name))); + (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), + errmsg("pg_hba.conf rejects connection for host \"%s\", user \"%s\", database \"%s\"", + hostinfo, port->user_name, + port->database_name))); #endif } break; @@ -479,36 +479,36 @@ ClientAuthentication(Port *port) { #ifdef USE_SSL ereport(FATAL, - (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), - errmsg("no pg_hba.conf entry for replication connection from host \"%s\", user \"%s\", %s", - hostinfo, port->user_name, - port->ssl_in_use ? _("SSL on") : _("SSL off")), - HOSTNAME_LOOKUP_DETAIL(port))); + (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), + errmsg("no pg_hba.conf entry for replication connection from host \"%s\", user \"%s\", %s", + hostinfo, port->user_name, + port->ssl_in_use ? _("SSL on") : _("SSL off")), + HOSTNAME_LOOKUP_DETAIL(port))); #else ereport(FATAL, - (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), - errmsg("no pg_hba.conf entry for replication connection from host \"%s\", user \"%s\"", - hostinfo, port->user_name), - HOSTNAME_LOOKUP_DETAIL(port))); + (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), + errmsg("no pg_hba.conf entry for replication connection from host \"%s\", user \"%s\"", + hostinfo, port->user_name), + HOSTNAME_LOOKUP_DETAIL(port))); #endif } else { #ifdef USE_SSL ereport(FATAL, - (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), - errmsg("no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\", %s", - hostinfo, port->user_name, - port->database_name, - port->ssl_in_use ? _("SSL on") : _("SSL off")), - HOSTNAME_LOOKUP_DETAIL(port))); + (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), + errmsg("no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\", %s", + hostinfo, port->user_name, + port->database_name, + port->ssl_in_use ? _("SSL on") : _("SSL off")), + HOSTNAME_LOOKUP_DETAIL(port))); #else ereport(FATAL, - (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), - errmsg("no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\"", - hostinfo, port->user_name, - port->database_name), - HOSTNAME_LOOKUP_DETAIL(port))); + (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), + errmsg("no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\"", + hostinfo, port->user_name, + port->database_name), + HOSTNAME_LOOKUP_DETAIL(port))); #endif } break; @@ -658,8 +658,8 @@ recv_password_packet(Port *port) if (mtype != EOF) ereport(ERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("expected password response, got message type %d", - mtype))); + errmsg("expected password response, got message type %d", + mtype))); return NULL; /* EOF or bad message type */ } } @@ -1196,7 +1196,7 @@ pg_GSS_recvauth(Port *port) (unsigned int) port->gss->outbuf.length); sendAuthRequest(port, AUTH_REQ_GSS_CONT, - port->gss->outbuf.value, port->gss->outbuf.length); + port->gss->outbuf.value, port->gss->outbuf.length); gss_release_buffer(&lmin_s, &port->gss->outbuf); } @@ -1205,7 +1205,7 @@ pg_GSS_recvauth(Port *port) { gss_delete_sec_context(&lmin_s, &port->gss->ctx, GSS_C_NO_BUFFER); pg_GSS_error(ERROR, - gettext_noop("accepting GSS security context failed"), + gettext_noop("accepting GSS security context failed"), maj_stat, min_stat); } @@ -1264,7 +1264,7 @@ pg_GSS_recvauth(Port *port) { /* GSS realm does not match */ elog(DEBUG2, - "GSSAPI realm (%s) and configured realm (%s) don't match", + "GSSAPI realm (%s) and configured realm (%s) don't match", cp, port->hba->krb_realm); gss_release_buffer(&lmin_s, &gbuf); return STATUS_ERROR; @@ -1443,7 +1443,7 @@ pg_SSPI_recvauth(Port *port) port->gss->outbuf.value = outbuf.pBuffers[0].pvBuffer; sendAuthRequest(port, AUTH_REQ_GSS_CONT, - port->gss->outbuf.value, port->gss->outbuf.length); + port->gss->outbuf.value, port->gss->outbuf.length); FreeContextBuffer(outbuf.pBuffers[0].pvBuffer); } @@ -1543,16 +1543,16 @@ pg_SSPI_recvauth(Port *port) if (!GetTokenInformation(token, TokenUser, tokenuser, retlen, &retlen)) ereport(ERROR, - (errmsg_internal("could not get token information: error code %lu", - GetLastError()))); + (errmsg_internal("could not get token information: error code %lu", + GetLastError()))); CloseHandle(token); if (!LookupAccountSid(NULL, tokenuser->User.Sid, accountname, &accountnamesize, domainname, &domainnamesize, &accountnameuse)) ereport(ERROR, - (errmsg_internal("could not look up account SID: error code %lu", - GetLastError()))); + (errmsg_internal("could not look up account SID: error code %lu", + GetLastError()))); free(tokenuser); @@ -1947,8 +1947,8 @@ ident_inet(hbaPort *port) ident_return = interpret_ident_response(ident_response, ident_user); if (!ident_return) ereport(LOG, - (errmsg("invalidly formatted response from Ident server: \"%s\"", - ident_response))); + (errmsg("invalidly formatted response from Ident server: \"%s\"", + ident_response))); ident_inet_done: if (sock_fd != PGINVALID_SOCKET) @@ -1987,7 +1987,7 @@ auth_peer(hbaPort *port) if (errno == ENOSYS) ereport(LOG, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("peer authentication is not supported on this platform"))); + errmsg("peer authentication is not supported on this platform"))); else ereport(LOG, (errcode_for_socket_access(), @@ -2084,7 +2084,7 @@ pam_passwd_conv_proc(int num_msg, const struct pam_message **msg, if (strlen(passwd) == 0) { ereport(LOG, - (errmsg("empty password returned by client"))); + (errmsg("empty password returned by client"))); goto fail; } } @@ -2139,7 +2139,7 @@ CheckPAMAuth(Port *port, char *user, char *password) retval = pg_getnameinfo_all(&port->raddr.addr, port->raddr.salen, hostinfo, sizeof(hostinfo), NULL, 0, - port->hba->pam_use_hostname ? 0 : NI_NUMERICHOST | NI_NUMERICSERV); + port->hba->pam_use_hostname ? 0 : NI_NUMERICHOST | NI_NUMERICSERV); if (retval != 0) { ereport(WARNING, @@ -2457,8 +2457,8 @@ CheckLDAPAuth(Port *port) * searching. If none is specified, this turns into an anonymous bind. */ r = ldap_simple_bind_s(ldap, - port->hba->ldapbinddn ? port->hba->ldapbinddn : "", - port->hba->ldapbindpasswd ? port->hba->ldapbindpasswd : ""); + port->hba->ldapbinddn ? port->hba->ldapbinddn : "", + port->hba->ldapbindpasswd ? port->hba->ldapbindpasswd : ""); if (r != LDAP_SUCCESS) { ereport(LOG, @@ -2487,7 +2487,7 @@ CheckLDAPAuth(Port *port) { ereport(LOG, (errmsg("could not search LDAP for filter \"%s\" on server \"%s\": %s", - filter, port->hba->ldapserver, ldap_err2string(r)))); + filter, port->hba->ldapserver, ldap_err2string(r)))); pfree(filter); return STATUS_ERROR; } @@ -2497,16 +2497,16 @@ CheckLDAPAuth(Port *port) { if (count == 0) ereport(LOG, - (errmsg("LDAP user \"%s\" does not exist", port->user_name), - errdetail("LDAP search for filter \"%s\" on server \"%s\" returned no entries.", - filter, port->hba->ldapserver))); + (errmsg("LDAP user \"%s\" does not exist", port->user_name), + errdetail("LDAP search for filter \"%s\" on server \"%s\" returned no entries.", + filter, port->hba->ldapserver))); else ereport(LOG, - (errmsg("LDAP user \"%s\" is not unique", port->user_name), - errdetail_plural("LDAP search for filter \"%s\" on server \"%s\" returned %d entry.", - "LDAP search for filter \"%s\" on server \"%s\" returned %d entries.", - count, - filter, port->hba->ldapserver, count))); + (errmsg("LDAP user \"%s\" is not unique", port->user_name), + errdetail_plural("LDAP search for filter \"%s\" on server \"%s\" returned %d entry.", + "LDAP search for filter \"%s\" on server \"%s\" returned %d entries.", + count, + filter, port->hba->ldapserver, count))); pfree(filter); ldap_msgfree(search_message); @@ -2522,7 +2522,7 @@ CheckLDAPAuth(Port *port) (void) ldap_get_option(ldap, LDAP_OPT_ERROR_NUMBER, &error); ereport(LOG, (errmsg("could not get dn for the first entry matching \"%s\" on server \"%s\": %s", - filter, port->hba->ldapserver, ldap_err2string(error)))); + filter, port->hba->ldapserver, ldap_err2string(error)))); pfree(filter); ldap_msgfree(search_message); return STATUS_ERROR; @@ -2542,7 +2542,7 @@ CheckLDAPAuth(Port *port) (void) ldap_get_option(ldap, LDAP_OPT_ERROR_NUMBER, &error); ereport(LOG, (errmsg("could not unbind after searching for user \"%s\" on server \"%s\": %s", - fulluser, port->hba->ldapserver, ldap_err2string(error)))); + fulluser, port->hba->ldapserver, ldap_err2string(error)))); pfree(fulluser); return STATUS_ERROR; } @@ -2561,9 +2561,9 @@ CheckLDAPAuth(Port *port) } else fulluser = psprintf("%s%s%s", - port->hba->ldapprefix ? port->hba->ldapprefix : "", + port->hba->ldapprefix ? port->hba->ldapprefix : "", port->user_name, - port->hba->ldapsuffix ? port->hba->ldapsuffix : ""); + port->hba->ldapsuffix ? port->hba->ldapsuffix : ""); r = ldap_simple_bind_s(ldap, fulluser, passwd); ldap_unbind(ldap); @@ -2571,8 +2571,8 @@ CheckLDAPAuth(Port *port) if (r != LDAP_SUCCESS) { ereport(LOG, - (errmsg("LDAP login failed for user \"%s\" on server \"%s\": %s", - fulluser, port->hba->ldapserver, ldap_err2string(r)))); + (errmsg("LDAP login failed for user \"%s\" on server \"%s\": %s", + fulluser, port->hba->ldapserver, ldap_err2string(r)))); pfree(fulluser); return STATUS_ERROR; } @@ -2744,8 +2744,8 @@ CheckRADIUSAuth(Port *port) { int ret = PerformRadiusTransaction(lfirst(server), lfirst(secrets), - radiusports ? lfirst(radiusports) : NULL, - identifiers ? lfirst(identifiers) : NULL, + radiusports ? lfirst(radiusports) : NULL, + identifiers ? lfirst(identifiers) : NULL, port->user_name, passwd); @@ -3049,7 +3049,7 @@ PerformRadiusTransaction(char *server, char *secret, char *portstr, char *identi { ereport(LOG, (errmsg("RADIUS response from %s has corrupt length: %d (actual length %d)", - server, ntohs(receivepacket->length), packetlength))); + server, ntohs(receivepacket->length), packetlength))); continue; } @@ -3081,7 +3081,7 @@ PerformRadiusTransaction(char *server, char *secret, char *portstr, char *identi encryptedpassword)) { ereport(LOG, - (errmsg("could not perform MD5 encryption of received packet"))); + (errmsg("could not perform MD5 encryption of received packet"))); pfree(cryptvector); continue; } @@ -3090,8 +3090,8 @@ PerformRadiusTransaction(char *server, char *secret, char *portstr, char *identi if (memcmp(receivepacket->vector, encryptedpassword, RADIUS_VECTOR_LENGTH) != 0) { ereport(LOG, - (errmsg("RADIUS response from %s has incorrect MD5 signature", - server))); + (errmsg("RADIUS response from %s has incorrect MD5 signature", + server))); continue; } diff --git a/src/backend/libpq/be-fsstubs.c b/src/backend/libpq/be-fsstubs.c index 3a0bb4ca0a4..b31c90fa24d 100644 --- a/src/backend/libpq/be-fsstubs.c +++ b/src/backend/libpq/be-fsstubs.c @@ -200,8 +200,8 @@ lo_write(int fd, const char *buf, int len) if ((lobj->flags & IFS_WRLOCK) == 0) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("large object descriptor %d was not opened for writing", - fd))); + errmsg("large object descriptor %d was not opened for writing", + fd))); /* Permission checks --- first time through only */ if ((lobj->flags & IFS_WR_PERM_OK) == 0) @@ -242,8 +242,8 @@ be_lo_lseek(PG_FUNCTION_ARGS) if (status != (int32) status) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("lo_lseek result out of range for large-object descriptor %d", - fd))); + errmsg("lo_lseek result out of range for large-object descriptor %d", + fd))); PG_RETURN_INT32((int32) status); } @@ -315,8 +315,8 @@ be_lo_tell(PG_FUNCTION_ARGS) if (offset != (int32) offset) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("lo_tell result out of range for large-object descriptor %d", - fd))); + errmsg("lo_tell result out of range for large-object descriptor %d", + fd))); PG_RETURN_INT32((int32) offset); } @@ -584,8 +584,8 @@ lo_truncate_internal(int32 fd, int64 len) if ((lobj->flags & IFS_WRLOCK) == 0) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("large object descriptor %d was not opened for writing", - fd))); + errmsg("large object descriptor %d was not opened for writing", + fd))); /* Permission checks --- first time through only */ if ((lobj->flags & IFS_WR_PERM_OK) == 0) diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c index 44c84a7869e..036d58a24e6 100644 --- a/src/backend/libpq/be-secure-openssl.c +++ b/src/backend/libpq/be-secure-openssl.c @@ -372,12 +372,12 @@ be_tls_init(bool isServerStart) /* OpenSSL 0.96 does not support X509_V_FLAG_CRL_CHECK */ #ifdef X509_V_FLAG_CRL_CHECK X509_STORE_set_flags(cvstore, - X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL); + X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL); #else ereport(LOG, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("SSL certificate revocation list file \"%s\" ignored", - ssl_crl_file), + errmsg("SSL certificate revocation list file \"%s\" ignored", + ssl_crl_file), errdetail("SSL library does not support certificate revocation lists."))); #endif } @@ -386,7 +386,7 @@ be_tls_init(bool isServerStart) ereport(isServerStart ? FATAL : LOG, (errcode(ERRCODE_CONFIG_FILE_ERROR), errmsg("could not load SSL certificate revocation list file \"%s\": %s", - ssl_crl_file, SSLerrmessage(ERR_get_error())))); + ssl_crl_file, SSLerrmessage(ERR_get_error())))); goto error; } } @@ -541,7 +541,7 @@ aloop: else ereport(COMMERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("could not accept SSL connection: EOF detected"))); + errmsg("could not accept SSL connection: EOF detected"))); break; case SSL_ERROR_SSL: ereport(COMMERROR, @@ -552,7 +552,7 @@ aloop: case SSL_ERROR_ZERO_RETURN: ereport(COMMERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("could not accept SSL connection: EOF detected"))); + errmsg("could not accept SSL connection: EOF detected"))); break; default: ereport(COMMERROR, @@ -853,7 +853,7 @@ my_BIO_s_socket(void) !BIO_meth_set_puts(my_bio_methods, BIO_meth_get_puts(biom)) || !BIO_meth_set_ctrl(my_bio_methods, BIO_meth_get_ctrl(biom)) || !BIO_meth_set_create(my_bio_methods, BIO_meth_get_create(biom)) || - !BIO_meth_set_destroy(my_bio_methods, BIO_meth_get_destroy(biom)) || + !BIO_meth_set_destroy(my_bio_methods, BIO_meth_get_destroy(biom)) || !BIO_meth_set_callback_ctrl(my_bio_methods, BIO_meth_get_callback_ctrl(biom))) { BIO_meth_free(my_bio_methods); diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index a1d77969cc2..42afead9fd7 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -232,8 +232,8 @@ next_token(char **lineptr, char *buf, int bufsz, *buf = '\0'; ereport(elevel, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("authentication file token too long, skipping: \"%s\"", - start_buf))); + errmsg("authentication file token too long, skipping: \"%s\"", + start_buf))); *err_msg = "authentication file token too long"; /* Discard remainder of line */ while ((c = (*(*lineptr)++)) != '\0') @@ -1006,7 +1006,7 @@ parse_hba_line(TokenizedLine *tok_line, int elevel) { ereport(elevel, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("hostssl record cannot match because SSL is disabled"), + errmsg("hostssl record cannot match because SSL is disabled"), errhint("Set ssl = on in postgresql.conf."), errcontext("line %d of configuration file \"%s\"", line_num, HbaFileName))); @@ -1016,7 +1016,7 @@ parse_hba_line(TokenizedLine *tok_line, int elevel) ereport(elevel, (errcode(ERRCODE_CONFIG_FILE_ERROR), errmsg("hostssl record cannot match because SSL is not supported by this build"), - errhint("Compile with --with-openssl to use SSL connections."), + errhint("Compile with --with-openssl to use SSL connections."), errcontext("line %d of configuration file \"%s\"", line_num, HbaFileName))); *err_msg = "hostssl record cannot match because SSL is not supported by this build"; @@ -1181,8 +1181,8 @@ parse_hba_line(TokenizedLine *tok_line, int elevel) (errcode(ERRCODE_CONFIG_FILE_ERROR), errmsg("specifying both host name and CIDR mask is invalid: \"%s\"", token->string), - errcontext("line %d of configuration file \"%s\"", - line_num, HbaFileName))); + errcontext("line %d of configuration file \"%s\"", + line_num, HbaFileName))); *err_msg = psprintf("specifying both host name and CIDR mask is invalid: \"%s\"", token->string); return NULL; @@ -1195,8 +1195,8 @@ parse_hba_line(TokenizedLine *tok_line, int elevel) (errcode(ERRCODE_CONFIG_FILE_ERROR), errmsg("invalid CIDR mask in address \"%s\"", token->string), - errcontext("line %d of configuration file \"%s\"", - line_num, HbaFileName))); + errcontext("line %d of configuration file \"%s\"", + line_num, HbaFileName))); *err_msg = psprintf("invalid CIDR mask in address \"%s\"", token->string); return NULL; @@ -1212,10 +1212,10 @@ parse_hba_line(TokenizedLine *tok_line, int elevel) { ereport(elevel, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("end-of-line before netmask specification"), + errmsg("end-of-line before netmask specification"), errhint("Specify an address range in CIDR notation, or provide a separate netmask."), - errcontext("line %d of configuration file \"%s\"", - line_num, HbaFileName))); + errcontext("line %d of configuration file \"%s\"", + line_num, HbaFileName))); *err_msg = "end-of-line before netmask specification"; return NULL; } @@ -1225,8 +1225,8 @@ parse_hba_line(TokenizedLine *tok_line, int elevel) ereport(elevel, (errcode(ERRCODE_CONFIG_FILE_ERROR), errmsg("multiple values specified for netmask"), - errcontext("line %d of configuration file \"%s\"", - line_num, HbaFileName))); + errcontext("line %d of configuration file \"%s\"", + line_num, HbaFileName))); *err_msg = "multiple values specified for netmask"; return NULL; } @@ -1240,8 +1240,8 @@ parse_hba_line(TokenizedLine *tok_line, int elevel) (errcode(ERRCODE_CONFIG_FILE_ERROR), errmsg("invalid IP mask \"%s\": %s", token->string, gai_strerror(ret)), - errcontext("line %d of configuration file \"%s\"", - line_num, HbaFileName))); + errcontext("line %d of configuration file \"%s\"", + line_num, HbaFileName))); *err_msg = psprintf("invalid IP mask \"%s\": %s", token->string, gai_strerror(ret)); if (gai_result) @@ -1258,8 +1258,8 @@ parse_hba_line(TokenizedLine *tok_line, int elevel) ereport(elevel, (errcode(ERRCODE_CONFIG_FILE_ERROR), errmsg("IP address and mask do not match"), - errcontext("line %d of configuration file \"%s\"", - line_num, HbaFileName))); + errcontext("line %d of configuration file \"%s\"", + line_num, HbaFileName))); *err_msg = "IP address and mask do not match"; return NULL; } @@ -1398,7 +1398,7 @@ parse_hba_line(TokenizedLine *tok_line, int elevel) { ereport(elevel, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("gssapi authentication is not supported on local sockets"), + errmsg("gssapi authentication is not supported on local sockets"), errcontext("line %d of configuration file \"%s\"", line_num, HbaFileName))); *err_msg = "gssapi authentication is not supported on local sockets"; @@ -1410,7 +1410,7 @@ parse_hba_line(TokenizedLine *tok_line, int elevel) { ereport(elevel, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("peer authentication is only supported on local sockets"), + errmsg("peer authentication is only supported on local sockets"), errcontext("line %d of configuration file \"%s\"", line_num, HbaFileName))); *err_msg = "peer authentication is only supported on local sockets"; @@ -1651,7 +1651,7 @@ parse_hba_auth_opt(char *name, char *val, HbaLine *hbaline, { ereport(elevel, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("clientcert can only be configured for \"hostssl\" rows"), + errmsg("clientcert can only be configured for \"hostssl\" rows"), errcontext("line %d of configuration file \"%s\"", line_num, HbaFileName))); *err_msg = "clientcert can only be configured for \"hostssl\" rows"; @@ -1714,7 +1714,7 @@ parse_hba_auth_opt(char *name, char *val, HbaLine *hbaline, { ereport(elevel, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("unsupported LDAP URL scheme: %s", urldata->lud_scheme))); + errmsg("unsupported LDAP URL scheme: %s", urldata->lud_scheme))); *err_msg = psprintf("unsupported LDAP URL scheme: %s", urldata->lud_scheme); ldap_free_urldesc(urldata); @@ -2723,8 +2723,8 @@ check_ident_usermap(IdentLine *identLine, const char *usermap_name, pg_regerror(r, &identLine->re, errstr, sizeof(errstr)); ereport(LOG, (errcode(ERRCODE_INVALID_REGULAR_EXPRESSION), - errmsg("regular expression match for \"%s\" failed: %s", - identLine->ident_user + 1, errstr))); + errmsg("regular expression match for \"%s\" failed: %s", + identLine->ident_user + 1, errstr))); *error_p = true; } @@ -2743,7 +2743,7 @@ check_ident_usermap(IdentLine *identLine, const char *usermap_name, ereport(LOG, (errcode(ERRCODE_INVALID_REGULAR_EXPRESSION), errmsg("regular expression \"%s\" has no subexpressions as requested by backreference in \"%s\"", - identLine->ident_user + 1, identLine->pg_role))); + identLine->ident_user + 1, identLine->pg_role))); *error_p = true; return; } diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c index 98e408100d7..261e9be8281 100644 --- a/src/backend/libpq/pqcomm.c +++ b/src/backend/libpq/pqcomm.c @@ -377,8 +377,8 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber, hostName, service, gai_strerror(ret)))); else ereport(LOG, - (errmsg("could not translate service \"%s\" to address: %s", - service, gai_strerror(ret)))); + (errmsg("could not translate service \"%s\" to address: %s", + service, gai_strerror(ret)))); if (addrs) pg_freeaddrinfo_all(hint.ai_family, addrs); return STATUS_ERROR; @@ -453,8 +453,8 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber, ereport(LOG, (errcode_for_socket_access(), /* translator: first %s is IPv4, IPv6, or Unix */ - errmsg("could not create %s socket for address \"%s\": %m", - familyDesc, addrDesc))); + errmsg("could not create %s socket for address \"%s\": %m", + familyDesc, addrDesc))); continue; } @@ -519,12 +519,12 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber, errmsg("could not bind %s address \"%s\": %m", familyDesc, addrDesc), (IS_AF_UNIX(addr->ai_family)) ? - errhint("Is another postmaster already running on port %d?" - " If not, remove socket file \"%s\" and retry.", - (int) portNumber, service) : - errhint("Is another postmaster already running on port %d?" - " If not, wait a few seconds and retry.", - (int) portNumber))); + errhint("Is another postmaster already running on port %d?" + " If not, remove socket file \"%s\" and retry.", + (int) portNumber, service) : + errhint("Is another postmaster already running on port %d?" + " If not, wait a few seconds and retry.", + (int) portNumber))); closesocket(fd); continue; } diff --git a/src/backend/main/main.c b/src/backend/main/main.c index 7c7cddbdb15..09f99486e01 100644 --- a/src/backend/main/main.c +++ b/src/backend/main/main.c @@ -375,7 +375,7 @@ help(const char *progname) printf(_(" -x NUM internal use\n")); printf(_("\nPlease read the documentation for the complete list of run-time\n" - "configuration settings and how to set them on the command line or in\n" + "configuration settings and how to set them on the command line or in\n" "the configuration file.\n\n" "Report bugs to <pgsql-bugs@postgresql.org>.\n")); } @@ -390,8 +390,8 @@ check_root(const char *progname) { write_stderr("\"root\" execution of the PostgreSQL server is not permitted.\n" "The server must be started under an unprivileged user ID to prevent\n" - "possible system security compromise. See the documentation for\n" - "more information on how to properly start the server.\n"); + "possible system security compromise. See the documentation for\n" + "more information on how to properly start the server.\n"); exit(1); } @@ -415,8 +415,8 @@ check_root(const char *progname) write_stderr("Execution of PostgreSQL by a user with administrative permissions is not\n" "permitted.\n" "The server must be started under an unprivileged user ID to prevent\n" - "possible system security compromises. See the documentation for\n" - "more information on how to properly start the server.\n"); + "possible system security compromises. See the documentation for\n" + "more information on how to properly start the server.\n"); exit(1); } #endif /* WIN32 */ diff --git a/src/backend/nodes/nodeFuncs.c b/src/backend/nodes/nodeFuncs.c index c87fb300d6d..97ba25fc72c 100644 --- a/src/backend/nodes/nodeFuncs.c +++ b/src/backend/nodes/nodeFuncs.c @@ -121,7 +121,7 @@ exprType(const Node *expr) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), errmsg("could not find array type for data type %s", - format_type_be(exprType((Node *) tent->expr))))); + format_type_be(exprType((Node *) tent->expr))))); } } else if (sublink->subLinkType == MULTIEXPR_SUBLINK) @@ -152,7 +152,7 @@ exprType(const Node *expr) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), errmsg("could not find array type for data type %s", - format_type_be(subplan->firstColType)))); + format_type_be(subplan->firstColType)))); } } else if (subplan->subLinkType == MULTIEXPR_SUBLINK) @@ -3724,31 +3724,31 @@ planstate_tree_walker(PlanState *planstate, { case T_ModifyTable: if (planstate_walk_members(((ModifyTable *) plan)->plans, - ((ModifyTableState *) planstate)->mt_plans, + ((ModifyTableState *) planstate)->mt_plans, walker, context)) return true; break; case T_Append: if (planstate_walk_members(((Append *) plan)->appendplans, - ((AppendState *) planstate)->appendplans, + ((AppendState *) planstate)->appendplans, walker, context)) return true; break; case T_MergeAppend: if (planstate_walk_members(((MergeAppend *) plan)->mergeplans, - ((MergeAppendState *) planstate)->mergeplans, + ((MergeAppendState *) planstate)->mergeplans, walker, context)) return true; break; case T_BitmapAnd: if (planstate_walk_members(((BitmapAnd *) plan)->bitmapplans, - ((BitmapAndState *) planstate)->bitmapplans, + ((BitmapAndState *) planstate)->bitmapplans, walker, context)) return true; break; case T_BitmapOr: if (planstate_walk_members(((BitmapOr *) plan)->bitmapplans, - ((BitmapOrState *) planstate)->bitmapplans, + ((BitmapOrState *) planstate)->bitmapplans, walker, context)) return true; break; diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c index ac0cb3bc22e..110732081b6 100644 --- a/src/backend/nodes/params.c +++ b/src/backend/nodes/params.c @@ -132,7 +132,7 @@ EstimateParamListSpace(ParamListInfo paramLI) typByVal = true; } sz = add_size(sz, - datumEstimateSpace(prm->value, prm->isnull, typByVal, typLen)); + datumEstimateSpace(prm->value, prm->isnull, typByVal, typLen)); } return sz; diff --git a/src/backend/nodes/tidbitmap.c b/src/backend/nodes/tidbitmap.c index 06f20a21480..c4e53adb0ca 100644 --- a/src/backend/nodes/tidbitmap.c +++ b/src/backend/nodes/tidbitmap.c @@ -723,7 +723,7 @@ tbm_begin_iterate(TIDBitmap *tbm) * needs of the TBMIterateResult sub-struct. */ iterator = (TBMIterator *) palloc(sizeof(TBMIterator) + - MAX_TUPLES_PER_PAGE * sizeof(OffsetNumber)); + MAX_TUPLES_PER_PAGE * sizeof(OffsetNumber)); iterator->tbm = tbm; /* @@ -1498,7 +1498,7 @@ tbm_attach_shared_iterate(dsa_area *dsa, dsa_pointer dp) * serve the needs of the TBMIterateResult sub-struct. */ iterator = (TBMSharedIterator *) palloc0(sizeof(TBMSharedIterator) + - MAX_TUPLES_PER_PAGE * sizeof(OffsetNumber)); + MAX_TUPLES_PER_PAGE * sizeof(OffsetNumber)); istate = (TBMSharedIteratorState *) dsa_get_address(dsa, dp); @@ -1537,7 +1537,7 @@ pagetable_allocate(pagetable_hash *pagetable, Size size) tbm->dsapagetableold = tbm->dsapagetable; tbm->dsapagetable = dsa_allocate_extended(tbm->dsa, sizeof(PTEntryArray) + size, - DSA_ALLOC_HUGE | DSA_ALLOC_ZERO); + DSA_ALLOC_HUGE | DSA_ALLOC_ZERO); ptbase = dsa_get_address(tbm->dsa, tbm->dsapagetable); return ptbase->ptentry; diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 23b524fce52..ed50261f8c0 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -806,7 +806,7 @@ set_tablesample_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, RangeTblEntry * */ if ((root->query_level > 1 || bms_membership(root->all_baserels) != BMS_SINGLETON) && - !(GetTsmRoutine(rte->tablesample->tsmhandler)->repeatable_across_scans)) + !(GetTsmRoutine(rte->tablesample->tsmhandler)->repeatable_across_scans)) { path = (Path *) create_material_path(rel, path); } @@ -976,7 +976,7 @@ set_append_rel_size(PlannerInfo *root, RelOptInfo *rel, childquals = lappend(childquals, make_restrictinfo((Expr *) onecq, rinfo->is_pushed_down, - rinfo->outerjoin_delayed, + rinfo->outerjoin_delayed, pseudoconstant, rinfo->security_level, NULL, NULL, NULL)); @@ -1313,14 +1313,14 @@ add_paths_to_append_rel(PlannerInfo *root, RelOptInfo *rel, */ if (childrel->cheapest_total_path->param_info == NULL) subpaths = accumulate_append_subpath(subpaths, - childrel->cheapest_total_path); + childrel->cheapest_total_path); else subpaths_valid = false; /* Same idea, but for a partial plan. */ if (childrel->partial_pathlist != NIL) partial_subpaths = accumulate_append_subpath(partial_subpaths, - linitial(childrel->partial_pathlist)); + linitial(childrel->partial_pathlist)); else partial_subpaths_valid = false; @@ -1580,7 +1580,7 @@ generate_mergeappend_paths(PlannerInfo *root, RelOptInfo *rel, total_subpaths, pathkeys, NULL, - partitioned_rels)); + partitioned_rels)); } } @@ -1922,7 +1922,7 @@ set_subquery_pathlist(PlannerInfo *root, RelOptInfo *rel, pathkeys = convert_subquery_pathkeys(root, rel, subpath->pathkeys, - make_tlist_from_pathtarget(subpath->pathtarget)); + make_tlist_from_pathtarget(subpath->pathtarget)); /* Generate outer path using this subpath */ add_path(rel, (Path *) @@ -3048,7 +3048,7 @@ create_partial_bitmap_paths(PlannerInfo *root, RelOptInfo *rel, return; add_partial_path(rel, (Path *) create_bitmap_heap_path(root, rel, - bitmapqual, rel->lateral_relids, 1.0, parallel_workers)); + bitmapqual, rel->lateral_relids, 1.0, parallel_workers)); } /* @@ -3086,7 +3086,7 @@ compute_parallel_worker(RelOptInfo *rel, double heap_pages, double index_pages) */ if (rel->reloptkind == RELOPT_BASEREL && ((heap_pages >= 0 && heap_pages < min_parallel_table_scan_size) || - (index_pages >= 0 && index_pages < min_parallel_index_scan_size))) + (index_pages >= 0 && index_pages < min_parallel_index_scan_size))) return 0; if (heap_pages >= 0) diff --git a/src/backend/optimizer/path/clausesel.c b/src/backend/optimizer/path/clausesel.c index 8d09f0b32b5..9d340255c36 100644 --- a/src/backend/optimizer/path/clausesel.c +++ b/src/backend/optimizer/path/clausesel.c @@ -690,7 +690,7 @@ clause_selectivity(PlannerInfo *root, { /* inverse of the selectivity of the underlying clause */ s1 = 1.0 - clause_selectivity(root, - (Node *) get_notclausearg((Expr *) clause), + (Node *) get_notclausearg((Expr *) clause), varRelid, jointype, sjinfo); diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c index c5c4580bc07..eb653cf3bec 100644 --- a/src/backend/optimizer/path/costsize.c +++ b/src/backend/optimizer/path/costsize.c @@ -504,10 +504,10 @@ cost_index(IndexPath *path, PlannerInfo *root, double loop_count, path->path.rows = path->path.param_info->ppi_rows; /* qpquals come from the rel's restriction clauses and ppi_clauses */ qpquals = list_concat( - extract_nonindex_conditions(path->indexinfo->indrestrictinfo, - path->indexquals), - extract_nonindex_conditions(path->path.param_info->ppi_clauses, - path->indexquals)); + extract_nonindex_conditions(path->indexinfo->indrestrictinfo, + path->indexquals), + extract_nonindex_conditions(path->path.param_info->ppi_clauses, + path->indexquals)); } else { @@ -677,7 +677,7 @@ cost_index(IndexPath *path, PlannerInfo *root, double loop_count, * order. */ path->path.parallel_workers = compute_parallel_worker(baserel, - rand_heap_pages, index_pages); + rand_heap_pages, index_pages); /* * Fall out if workers can't be assigned for parallel scan, because in @@ -3097,7 +3097,7 @@ final_cost_hashjoin(PlannerInfo *root, HashPath *path, /* not cached yet */ thisbucketsize = estimate_hash_bucketsize(root, - get_rightop(restrictinfo->clause), + get_rightop(restrictinfo->clause), virtualbuckets); restrictinfo->right_bucketsize = thisbucketsize; } @@ -3113,7 +3113,7 @@ final_cost_hashjoin(PlannerInfo *root, HashPath *path, /* not cached yet */ thisbucketsize = estimate_hash_bucketsize(root, - get_leftop(restrictinfo->clause), + get_leftop(restrictinfo->clause), virtualbuckets); restrictinfo->left_bucketsize = thisbucketsize; } @@ -3376,7 +3376,7 @@ cost_rescan(PlannerInfo *root, Path *path, */ Cost run_cost = cpu_tuple_cost * path->rows; double nbytes = relation_byte_size(path->rows, - path->pathtarget->width); + path->pathtarget->width); long work_mem_bytes = work_mem * 1024L; if (nbytes > work_mem_bytes) @@ -3403,7 +3403,7 @@ cost_rescan(PlannerInfo *root, Path *path, */ Cost run_cost = cpu_operator_cost * path->rows; double nbytes = relation_byte_size(path->rows, - path->pathtarget->width); + path->pathtarget->width); long work_mem_bytes = work_mem * 1024L; if (nbytes > work_mem_bytes) @@ -3785,7 +3785,7 @@ compute_semi_anti_join_factors(PlannerInfo *root, jselec = clauselist_selectivity(root, joinquals, 0, - (jointype == JOIN_ANTI) ? JOIN_ANTI : JOIN_SEMI, + (jointype == JOIN_ANTI) ? JOIN_ANTI : JOIN_SEMI, sjinfo); /* @@ -4925,7 +4925,7 @@ set_rel_width(PlannerInfo *root, RelOptInfo *rel) { /* Real relation, so estimate true tuple width */ wholerow_width += get_relation_data_width(reloid, - rel->attr_widths - rel->min_attr); + rel->attr_widths - rel->min_attr); } else { diff --git a/src/backend/optimizer/path/equivclass.c b/src/backend/optimizer/path/equivclass.c index b65bf818b59..9a3f606df07 100644 --- a/src/backend/optimizer/path/equivclass.c +++ b/src/backend/optimizer/path/equivclass.c @@ -1103,9 +1103,9 @@ generate_join_implied_equalities_for_ecs(PlannerInfo *root, if (ec->ec_broken) sublist = generate_join_implied_equalities_broken(root, ec, - nominal_join_relids, + nominal_join_relids, outer_relids, - nominal_inner_relids, + nominal_inner_relids, inner_rel); result = list_concat(result, sublist); @@ -1426,7 +1426,7 @@ create_join_clause(PlannerInfo *root, bms_union(leftem->em_relids, rightem->em_relids), bms_union(leftem->em_nullable_relids, - rightem->em_nullable_relids), + rightem->em_nullable_relids), ec->ec_min_security); /* Mark the clause as redundant, or not */ @@ -1738,7 +1738,7 @@ reconsider_outer_join_clause(PlannerInfo *root, RestrictInfo *rinfo, innervar, cur_em->em_expr, bms_copy(inner_relids), - bms_copy(inner_nullable_relids), + bms_copy(inner_nullable_relids), cur_ec->ec_min_security); if (process_equivalence(root, newrinfo, true)) match = true; @@ -1881,8 +1881,8 @@ reconsider_full_join_clause(PlannerInfo *root, RestrictInfo *rinfo) leftvar, cur_em->em_expr, bms_copy(left_relids), - bms_copy(left_nullable_relids), - cur_ec->ec_min_security); + bms_copy(left_nullable_relids), + cur_ec->ec_min_security); if (process_equivalence(root, newrinfo, true)) matchleft = true; } @@ -1896,8 +1896,8 @@ reconsider_full_join_clause(PlannerInfo *root, RestrictInfo *rinfo) rightvar, cur_em->em_expr, bms_copy(right_relids), - bms_copy(right_nullable_relids), - cur_ec->ec_min_security); + bms_copy(right_nullable_relids), + cur_ec->ec_min_security); if (process_equivalence(root, newrinfo, true)) matchright = true; } diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index 97611211f0b..dedb9f521da 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -320,7 +320,7 @@ create_index_paths(PlannerInfo *root, RelOptInfo *rel) * the joinclause list. Add these to bitjoinpaths. */ indexpaths = generate_bitmap_or_paths(root, rel, - joinorclauses, rel->baserestrictinfo); + joinorclauses, rel->baserestrictinfo); bitjoinpaths = list_concat(bitjoinpaths, indexpaths); /* @@ -1760,7 +1760,7 @@ get_bitmap_tree_required_outer(Path *bitmapqual) foreach(lc, ((BitmapAndPath *) bitmapqual)->bitmapquals) { result = bms_join(result, - get_bitmap_tree_required_outer((Path *) lfirst(lc))); + get_bitmap_tree_required_outer((Path *) lfirst(lc))); } } else if (IsA(bitmapqual, BitmapOrPath)) @@ -1768,7 +1768,7 @@ get_bitmap_tree_required_outer(Path *bitmapqual) foreach(lc, ((BitmapOrPath *) bitmapqual)->bitmapquals) { result = bms_join(result, - get_bitmap_tree_required_outer((Path *) lfirst(lc))); + get_bitmap_tree_required_outer((Path *) lfirst(lc))); } } else @@ -2161,9 +2161,9 @@ match_eclass_clauses_to_index(PlannerInfo *root, IndexOptInfo *index, arg.indexcol = indexcol; clauses = generate_implied_equalities_for_column(root, index->rel, - ec_member_matches_indexcol, + ec_member_matches_indexcol, (void *) &arg, - index->rel->lateral_referencers); + index->rel->lateral_referencers); /* * We have to check whether the results actually do match the index, @@ -2836,8 +2836,8 @@ check_index_predicates(PlannerInfo *root, RelOptInfo *rel) clauselist = list_concat(clauselist, generate_join_implied_equalities(root, - bms_union(rel->relids, - otherrels), + bms_union(rel->relids, + otherrels), otherrels, rel)); @@ -4085,7 +4085,7 @@ prefix_quals(Node *leftop, Oid opfamily, Oid collation, break; case BYTEAOID: prefix = DatumGetCString(DirectFunctionCall1(byteaout, - prefix_const->constvalue)); + prefix_const->constvalue)); break; default: elog(ERROR, "unexpected const type: %u", diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c index 23aa735296e..511c7349805 100644 --- a/src/backend/optimizer/path/joinpath.c +++ b/src/backend/optimizer/path/joinpath.c @@ -214,16 +214,16 @@ add_paths_to_joinrel(PlannerInfo *root, if (bms_overlap(joinrel->relids, sjinfo2->min_righthand) && !bms_overlap(joinrel->relids, sjinfo2->min_lefthand)) extra.param_source_rels = bms_join(extra.param_source_rels, - bms_difference(root->all_baserels, - sjinfo2->min_righthand)); + bms_difference(root->all_baserels, + sjinfo2->min_righthand)); /* full joins constrain both sides symmetrically */ if (sjinfo2->jointype == JOIN_FULL && bms_overlap(joinrel->relids, sjinfo2->min_lefthand) && !bms_overlap(joinrel->relids, sjinfo2->min_righthand)) extra.param_source_rels = bms_join(extra.param_source_rels, - bms_difference(root->all_baserels, - sjinfo2->min_lefthand)); + bms_difference(root->all_baserels, + sjinfo2->min_lefthand)); } /* @@ -918,7 +918,7 @@ sort_inner_and_outer(PlannerInfo *root, cur_mergeclauses = find_mergeclauses_for_pathkeys(root, outerkeys, true, - extra->mergeclause_list); + extra->mergeclause_list); /* Should have used them all... */ Assert(list_length(cur_mergeclauses) == list_length(extra->mergeclause_list)); @@ -1445,7 +1445,7 @@ match_unsorted_outer(PlannerInfo *root, return; inner_cheapest_total = get_cheapest_parallel_safe_total_inner( - innerrel->pathlist); + innerrel->pathlist); } if (inner_cheapest_total) diff --git a/src/backend/optimizer/path/joinrels.c b/src/backend/optimizer/path/joinrels.c index 4c775a76c69..6ee23509c58 100644 --- a/src/backend/optimizer/path/joinrels.c +++ b/src/backend/optimizer/path/joinrels.c @@ -615,7 +615,7 @@ join_is_legal(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2, !bms_is_subset(sjinfo->min_righthand, join_plus_rhs)) { join_plus_rhs = bms_add_members(join_plus_rhs, - sjinfo->min_righthand); + sjinfo->min_righthand); more = true; } /* full joins constrain both sides symmetrically */ diff --git a/src/backend/optimizer/path/pathkeys.c b/src/backend/optimizer/path/pathkeys.c index 6933e730184..37cfa098d49 100644 --- a/src/backend/optimizer/path/pathkeys.c +++ b/src/backend/optimizer/path/pathkeys.c @@ -575,8 +575,8 @@ build_expression_pathkey(PlannerInfo *root, opfamily, opcintype, exprCollation((Node *) expr), - (strategy == BTGreaterStrategyNumber), - (strategy == BTGreaterStrategyNumber), + (strategy == BTGreaterStrategyNumber), + (strategy == BTGreaterStrategyNumber), 0, rel, create_it); @@ -746,7 +746,7 @@ convert_subquery_pathkeys(PlannerInfo *root, RelOptInfo *rel, outer_ec = get_eclass_for_sort_expr(root, outer_expr, NULL, - sub_eclass->ec_opfamilies, + sub_eclass->ec_opfamilies, sub_expr_type, sub_expr_coll, 0, @@ -762,9 +762,9 @@ convert_subquery_pathkeys(PlannerInfo *root, RelOptInfo *rel, outer_pk = make_canonical_pathkey(root, outer_ec, - sub_pathkey->pk_opfamily, - sub_pathkey->pk_strategy, - sub_pathkey->pk_nulls_first); + sub_pathkey->pk_opfamily, + sub_pathkey->pk_strategy, + sub_pathkey->pk_nulls_first); /* score = # of equivalence peers */ score = list_length(outer_ec->ec_members) - 1; /* +1 if it matches the proper query_pathkeys item */ diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index b510faa3e11..e589d92c805 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -140,7 +140,7 @@ static TableFuncScan *create_tablefuncscan_plan(PlannerInfo *root, Path *best_pa static CteScan *create_ctescan_plan(PlannerInfo *root, Path *best_path, List *tlist, List *scan_clauses); static NamedTuplestoreScan *create_namedtuplestorescan_plan(PlannerInfo *root, - Path *best_path, List *tlist, List *scan_clauses); + Path *best_path, List *tlist, List *scan_clauses); static WorkTableScan *create_worktablescan_plan(PlannerInfo *root, Path *best_path, List *tlist, List *scan_clauses); static ForeignScan *create_foreignscan_plan(PlannerInfo *root, ForeignPath *best_path, @@ -397,7 +397,7 @@ create_plan_recurse(PlannerInfo *root, Path *best_path, int flags) else if (IsA(best_path, MinMaxAggPath)) { plan = (Plan *) create_minmaxagg_plan(root, - (MinMaxAggPath *) best_path); + (MinMaxAggPath *) best_path); } else { @@ -408,7 +408,7 @@ create_plan_recurse(PlannerInfo *root, Path *best_path, int flags) break; case T_ProjectSet: plan = (Plan *) create_project_set_plan(root, - (ProjectSetPath *) best_path); + (ProjectSetPath *) best_path); break; case T_Material: plan = (Plan *) create_material_plan(root, @@ -419,7 +419,7 @@ create_plan_recurse(PlannerInfo *root, Path *best_path, int flags) if (IsA(best_path, UpperUniquePath)) { plan = (Plan *) create_upper_unique_plan(root, - (UpperUniquePath *) best_path, + (UpperUniquePath *) best_path, flags); } else @@ -446,7 +446,7 @@ create_plan_recurse(PlannerInfo *root, Path *best_path, int flags) case T_Agg: if (IsA(best_path, GroupingSetsPath)) plan = create_groupingsets_plan(root, - (GroupingSetsPath *) best_path); + (GroupingSetsPath *) best_path); else { Assert(IsA(best_path, AggPath)); @@ -456,7 +456,7 @@ create_plan_recurse(PlannerInfo *root, Path *best_path, int flags) break; case T_WindowAgg: plan = (Plan *) create_windowagg_plan(root, - (WindowAggPath *) best_path); + (WindowAggPath *) best_path); break; case T_SetOp: plan = (Plan *) create_setop_plan(root, @@ -465,7 +465,7 @@ create_plan_recurse(PlannerInfo *root, Path *best_path, int flags) break; case T_RecursiveUnion: plan = (Plan *) create_recursiveunion_plan(root, - (RecursiveUnionPath *) best_path); + (RecursiveUnionPath *) best_path); break; case T_LockRows: plan = (Plan *) create_lockrows_plan(root, @@ -474,7 +474,7 @@ create_plan_recurse(PlannerInfo *root, Path *best_path, int flags) break; case T_ModifyTable: plan = (Plan *) create_modifytable_plan(root, - (ModifyTablePath *) best_path); + (ModifyTablePath *) best_path); break; case T_Limit: plan = (Plan *) create_limit_plan(root, @@ -483,7 +483,7 @@ create_plan_recurse(PlannerInfo *root, Path *best_path, int flags) break; case T_GatherMerge: plan = (Plan *) create_gather_merge_plan(root, - (GatherMergePath *) best_path); + (GatherMergePath *) best_path); break; default: elog(ERROR, "unrecognized node type: %d", @@ -625,7 +625,7 @@ create_scan_plan(PlannerInfo *root, Path *best_path, int flags) case T_BitmapHeapScan: plan = (Plan *) create_bitmap_scan_plan(root, - (BitmapHeapPath *) best_path, + (BitmapHeapPath *) best_path, tlist, scan_clauses); break; @@ -639,7 +639,7 @@ create_scan_plan(PlannerInfo *root, Path *best_path, int flags) case T_SubqueryScan: plan = (Plan *) create_subqueryscan_plan(root, - (SubqueryScanPath *) best_path, + (SubqueryScanPath *) best_path, tlist, scan_clauses); break; @@ -985,7 +985,7 @@ create_join_plan(PlannerInfo *root, JoinPath *best_path) if (get_loc_restrictinfo(best_path) != NIL) set_qpqual((Plan) plan, list_concat(get_qpqual((Plan) plan), - get_actual_clauses(get_loc_restrictinfo(best_path)))); + get_actual_clauses(get_loc_restrictinfo(best_path)))); #endif return plan; @@ -1909,9 +1909,9 @@ create_groupingsets_plan(PlannerInfo *root, GroupingSetsPath *best_path) NIL, strat, AGGSPLIT_SIMPLE, - list_length((List *) linitial(rollup->gsets)), + list_length((List *) linitial(rollup->gsets)), new_grpColIdx, - extract_grouping_ops(rollup->groupClause), + extract_grouping_ops(rollup->groupClause), rollup->gsets, NIL, rollup->numGroups, @@ -2576,7 +2576,7 @@ create_indexscan_plan(PlannerInfo *root, if (is_redundant_derived_clause(rinfo, indexquals)) continue; /* derived from same EquivalenceClass */ if (!contain_mutable_functions((Node *) rinfo->clause) && - predicate_implied_by(list_make1(rinfo->clause), indexquals, false)) + predicate_implied_by(list_make1(rinfo->clause), indexquals, false)) continue; /* provably implied by indexquals */ qpqual = lappend(qpqual, rinfo); } @@ -2647,7 +2647,7 @@ create_indexscan_plan(PlannerInfo *root, indexoid, fixed_indexquals, fixed_indexorderbys, - best_path->indexinfo->indextlist, + best_path->indexinfo->indextlist, best_path->indexscandir); else scan_plan = (Scan *) make_indexscan(tlist, @@ -3718,7 +3718,7 @@ create_nestloop_plan(PlannerInfo *root, bms_overlap(((PlaceHolderVar *) nlp->paramval)->phrels, outerrelids) && bms_is_subset(find_placeholder_info(root, - (PlaceHolderVar *) nlp->paramval, + (PlaceHolderVar *) nlp->paramval, false)->ph_eval_at, outerrelids)) { @@ -3774,10 +3774,10 @@ create_mergejoin_plan(PlannerInfo *root, * necessary. */ outer_plan = create_plan_recurse(root, best_path->jpath.outerjoinpath, - (best_path->outersortkeys != NIL) ? CP_SMALL_TLIST : 0); + (best_path->outersortkeys != NIL) ? CP_SMALL_TLIST : 0); inner_plan = create_plan_recurse(root, best_path->jpath.innerjoinpath, - (best_path->innersortkeys != NIL) ? CP_SMALL_TLIST : 0); + (best_path->innersortkeys != NIL) ? CP_SMALL_TLIST : 0); /* Sort join qual clauses into best execution order */ /* NB: do NOT reorder the mergeclauses */ @@ -3822,7 +3822,7 @@ create_mergejoin_plan(PlannerInfo *root, * outer_is_left status. */ mergeclauses = get_switched_clauses(best_path->path_mergeclauses, - best_path->jpath.outerjoinpath->parent->relids); + best_path->jpath.outerjoinpath->parent->relids); /* * Create explicit sort nodes for the outer and inner paths if necessary. @@ -4073,7 +4073,7 @@ create_hashjoin_plan(PlannerInfo *root, * that we don't put extra data in the outer batch files. */ outer_plan = create_plan_recurse(root, best_path->jpath.outerjoinpath, - (best_path->num_batches > 1) ? CP_SMALL_TLIST : 0); + (best_path->num_batches > 1) ? CP_SMALL_TLIST : 0); inner_plan = create_plan_recurse(root, best_path->jpath.innerjoinpath, CP_SMALL_TLIST); @@ -4120,7 +4120,7 @@ create_hashjoin_plan(PlannerInfo *root, * on the left. */ hashclauses = get_switched_clauses(best_path->path_hashclauses, - best_path->jpath.outerjoinpath->parent->relids); + best_path->jpath.outerjoinpath->parent->relids); /* * If there is a single join clause and we can identify the outer variable @@ -4260,8 +4260,8 @@ replace_nestloop_params_mutator(Node *node, PlannerInfo *root) * rels, and then grab its PlaceHolderInfo to tell for sure. */ if (!bms_overlap(phv->phrels, root->curOuterRels) || - !bms_is_subset(find_placeholder_info(root, phv, false)->ph_eval_at, - root->curOuterRels)) + !bms_is_subset(find_placeholder_info(root, phv, false)->ph_eval_at, + root->curOuterRels)) { /* * We can't replace the whole PHV, but we might still need to @@ -4919,7 +4919,7 @@ bitmap_subplan_mark_shared(Plan *plan) { if (IsA(plan, BitmapAnd)) bitmap_subplan_mark_shared( - linitial(((BitmapAnd *) plan)->bitmapplans)); + linitial(((BitmapAnd *) plan)->bitmapplans)); else if (IsA(plan, BitmapOr)) ((BitmapOr *) plan)->isshared = true; else if (IsA(plan, BitmapIndexScan)) diff --git a/src/backend/optimizer/plan/initsplan.c b/src/backend/optimizer/plan/initsplan.c index 63cb055ef00..987c20ac9ff 100644 --- a/src/backend/optimizer/plan/initsplan.c +++ b/src/backend/optimizer/plan/initsplan.c @@ -2223,7 +2223,7 @@ distribute_restrictinfo_to_rels(PlannerInfo *root, restrictinfo); /* Update security level info */ rel->baserestrict_min_security = Min(rel->baserestrict_min_security, - restrictinfo->security_level); + restrictinfo->security_level); break; case BMS_MULTIPLE: diff --git a/src/backend/optimizer/plan/planagg.c b/src/backend/optimizer/plan/planagg.c index 6d5969cd44c..bba8a1ff587 100644 --- a/src/backend/optimizer/plan/planagg.c +++ b/src/backend/optimizer/plan/planagg.c @@ -203,7 +203,7 @@ preprocess_minmax_aggregates(PlannerInfo *root, List *tlist) SS_make_initplan_output_param(root, exprType((Node *) mminfo->target), -1, - exprCollation((Node *) mminfo->target)); + exprCollation((Node *) mminfo->target)); } /* diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index 4b32f59128b..2988c1181b9 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -1311,7 +1311,7 @@ inheritance_planner(PlannerInfo *root) else final_rtable = list_concat(final_rtable, list_copy_tail(subroot->parse->rtable, - list_length(final_rtable))); + list_length(final_rtable))); /* * We need to collect all the RelOptInfos from all child plans into @@ -1543,7 +1543,7 @@ grouping_planner(PlannerInfo *root, bool inheritance_update, translator: %s is a SQL row locking clause such as FOR UPDATE */ errmsg("%s is not allowed with UNION/INTERSECT/EXCEPT", LCS_asString(((RowMarkClause *) - linitial(parse->rowMarks))->strength)))); + linitial(parse->rowMarks))->strength)))); /* * Calculate pathkeys that represent result ordering requirements @@ -1978,7 +1978,7 @@ grouping_planner(PlannerInfo *root, bool inheritance_update, { path = (Path *) create_lockrows_path(root, final_rel, path, root->rowMarks, - SS_assign_special_param(root)); + SS_assign_special_param(root)); } /* @@ -2233,7 +2233,7 @@ preprocess_grouping_sets(PlannerInfo *root) */ gd->hash_sets_idx = remap_to_groupclause_idx(parse->groupClause, gd->unsortable_sets, - gd->tleref_to_colnum_map); + gd->tleref_to_colnum_map); gd->any_hashable = true; } @@ -2778,7 +2778,7 @@ remove_useless_groupby_columns(PlannerInfo *root) relid = var->varno; Assert(relid <= list_length(parse->rtable)); groupbyattnos[relid] = bms_add_member(groupbyattnos[relid], - var->varattno - FirstLowInvalidHeapAttributeNumber); + var->varattno - FirstLowInvalidHeapAttributeNumber); } /* @@ -2827,7 +2827,7 @@ remove_useless_groupby_columns(PlannerInfo *root) */ if (surplusvars == NULL) surplusvars = (Bitmapset **) palloc0(sizeof(Bitmapset *) * - (list_length(parse->rtable) + 1)); + (list_length(parse->rtable) + 1)); /* Remember the attnos of the removable columns */ surplusvars[relid] = bms_difference(relattnos, pkattnos); @@ -2859,8 +2859,8 @@ remove_useless_groupby_columns(PlannerInfo *root) */ if (!IsA(var, Var) || var->varlevelsup > 0 || - !bms_is_member(var->varattno - FirstLowInvalidHeapAttributeNumber, - surplusvars[var->varno])) + !bms_is_member(var->varattno - FirstLowInvalidHeapAttributeNumber, + surplusvars[var->varno])) new_groupby = lappend(new_groupby, sgc); } @@ -3653,7 +3653,7 @@ create_grouping_paths(PlannerInfo *root, */ can_hash = (parse->groupClause != NIL && agg_costs->numOrderedAggs == 0 && - (gd ? gd->any_hashable : grouping_is_hashable(parse->groupClause))); + (gd ? gd->any_hashable : grouping_is_hashable(parse->groupClause))); /* * If grouped_rel->consider_parallel is true, then paths that we generate @@ -3774,9 +3774,9 @@ create_grouping_paths(PlannerInfo *root, create_agg_path(root, grouped_rel, path, - partial_grouping_target, - parse->groupClause ? AGG_SORTED : AGG_PLAIN, - AGGSPLIT_INITIAL_SERIAL, + partial_grouping_target, + parse->groupClause ? AGG_SORTED : AGG_PLAIN, + AGGSPLIT_INITIAL_SERIAL, parse->groupClause, NIL, &agg_partial_costs, @@ -3786,10 +3786,10 @@ create_grouping_paths(PlannerInfo *root, create_group_path(root, grouped_rel, path, - partial_grouping_target, + partial_grouping_target, parse->groupClause, NIL, - dNumPartialGroups)); + dNumPartialGroups)); } } } @@ -3867,7 +3867,7 @@ create_grouping_paths(PlannerInfo *root, grouped_rel, path, target, - parse->groupClause ? AGG_SORTED : AGG_PLAIN, + parse->groupClause ? AGG_SORTED : AGG_PLAIN, AGGSPLIT_SIMPLE, parse->groupClause, (List *) parse->havingQual, @@ -3931,7 +3931,7 @@ create_grouping_paths(PlannerInfo *root, grouped_rel, path, target, - parse->groupClause ? AGG_SORTED : AGG_PLAIN, + parse->groupClause ? AGG_SORTED : AGG_PLAIN, AGGSPLIT_FINAL_DESERIAL, parse->groupClause, (List *) parse->havingQual, @@ -3993,7 +3993,7 @@ create_grouping_paths(PlannerInfo *root, grouped_rel, gmpath, target, - parse->groupClause ? AGG_SORTED : AGG_PLAIN, + parse->groupClause ? AGG_SORTED : AGG_PLAIN, AGGSPLIT_FINAL_DESERIAL, parse->groupClause, (List *) parse->havingQual, @@ -4243,7 +4243,7 @@ consider_groupingsets_paths(PlannerInfo *root, rollup->gsets_data = list_make1(gs); rollup->gsets = remap_to_groupclause_idx(rollup->groupClause, rollup->gsets_data, - gd->tleref_to_colnum_map); + gd->tleref_to_colnum_map); rollup->numGroups = gs->numGroups; rollup->hashable = true; rollup->is_hashed = true; @@ -4373,7 +4373,7 @@ consider_groupingsets_paths(PlannerInfo *root, { double sz = estimate_hashagg_tablesize(path, agg_costs, - rollup->numGroups); + rollup->numGroups); /* * If sz is enormous, but work_mem (and hence scale) is @@ -4407,7 +4407,7 @@ consider_groupingsets_paths(PlannerInfo *root, { if (bms_is_member(i, hash_items)) hash_sets = list_concat(hash_sets, - list_copy(rollup->gsets_data)); + list_copy(rollup->gsets_data)); else rollups = lappend(rollups, rollup); ++i; @@ -4432,7 +4432,7 @@ consider_groupingsets_paths(PlannerInfo *root, rollup->gsets_data = list_make1(gs); rollup->gsets = remap_to_groupclause_idx(rollup->groupClause, rollup->gsets_data, - gd->tleref_to_colnum_map); + gd->tleref_to_colnum_map); rollup->numGroups = gs->numGroups; rollup->hashable = true; rollup->is_hashed = true; @@ -4757,7 +4757,7 @@ create_distinct_paths(PlannerInfo *root, add_path(distinct_rel, (Path *) create_upper_unique_path(root, distinct_rel, path, - list_length(root->distinct_pathkeys), + list_length(root->distinct_pathkeys), numDistinctRows)); } } @@ -4784,7 +4784,7 @@ create_distinct_paths(PlannerInfo *root, add_path(distinct_rel, (Path *) create_upper_unique_path(root, distinct_rel, path, - list_length(root->distinct_pathkeys), + list_length(root->distinct_pathkeys), numDistinctRows)); } @@ -4849,7 +4849,7 @@ create_distinct_paths(PlannerInfo *root, if (distinct_rel->fdwroutine && distinct_rel->fdwroutine->GetForeignUpperPaths) distinct_rel->fdwroutine->GetForeignUpperPaths(root, UPPERREL_DISTINCT, - input_rel, distinct_rel); + input_rel, distinct_rel); /* Let extensions possibly add some more paths */ if (create_upper_paths_hook) @@ -5525,7 +5525,7 @@ make_pathkeys_for_window(PlannerInfo *root, WindowClause *wc, ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("could not implement window ORDER BY"), - errdetail("Window ordering columns must be of sortable datatypes."))); + errdetail("Window ordering columns must be of sortable datatypes."))); /* Okay, make the combined pathkeys */ window_sortclauses = list_concat(list_copy(wc->partitionClause), @@ -5739,7 +5739,7 @@ make_sort_input_target(PlannerInfo *root, postponable_cols = lappend(postponable_cols, expr); else add_column_to_pathtarget(input_target, expr, - get_pathtarget_sortgroupref(final_target, i)); + get_pathtarget_sortgroupref(final_target, i)); i++; } @@ -5793,7 +5793,7 @@ get_cheapest_fractional_path(RelOptInfo *rel, double tuple_fraction) Path *path = (Path *) lfirst(l); if (path == rel->cheapest_total_path || - compare_fractional_path_costs(best_path, path, tuple_fraction) <= 0) + compare_fractional_path_costs(best_path, path, tuple_fraction) <= 0) continue; best_path = path; diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c index 01b06848af6..b0c9e944597 100644 --- a/src/backend/optimizer/plan/setrefs.c +++ b/src/backend/optimizer/plan/setrefs.c @@ -1393,13 +1393,13 @@ fix_expr_common(PlannerInfo *root, Node *node) { set_sa_opfuncid((ScalarArrayOpExpr *) node); record_plan_function_dependency(root, - ((ScalarArrayOpExpr *) node)->opfuncid); + ((ScalarArrayOpExpr *) node)->opfuncid); } else if (IsA(node, ArrayCoerceExpr)) { if (OidIsValid(((ArrayCoerceExpr *) node)->elemfuncid)) record_plan_function_dependency(root, - ((ArrayCoerceExpr *) node)->elemfuncid); + ((ArrayCoerceExpr *) node)->elemfuncid); } else if (IsA(node, Const)) { @@ -2514,7 +2514,7 @@ record_plan_function_dependency(PlannerInfo *root, Oid funcid) */ inval_item->cacheId = PROCOID; inval_item->hashValue = GetSysCacheHashValue1(PROCOID, - ObjectIdGetDatum(funcid)); + ObjectIdGetDatum(funcid)); root->glob->invalItems = lappend(root->glob->invalItems, inval_item); } diff --git a/src/backend/optimizer/plan/subselect.c b/src/backend/optimizer/plan/subselect.c index c1be34dd12c..ffbd3eeed75 100644 --- a/src/backend/optimizer/plan/subselect.c +++ b/src/backend/optimizer/plan/subselect.c @@ -1915,7 +1915,7 @@ replace_correlation_vars_mutator(Node *node, PlannerInfo *root) { if (((PlaceHolderVar *) node)->phlevelsup > 0) return (Node *) replace_outer_placeholdervar(root, - (PlaceHolderVar *) node); + (PlaceHolderVar *) node); } if (IsA(node, Aggref)) { diff --git a/src/backend/optimizer/prep/prepjointree.c b/src/backend/optimizer/prep/prepjointree.c index 08033183e7c..f3bb73a664b 100644 --- a/src/backend/optimizer/prep/prepjointree.c +++ b/src/backend/optimizer/prep/prepjointree.c @@ -269,7 +269,7 @@ pull_up_sublinks_jointree_recurse(PlannerInfo *root, Node *jtnode, j->quals = pull_up_sublinks_qual_recurse(root, j->quals, &jtlink, bms_union(leftrelids, - rightrelids), + rightrelids), NULL, NULL); break; case JOIN_LEFT: @@ -464,7 +464,7 @@ pull_up_sublinks_qual_recurse(PlannerInfo *root, Node *node, if (sublink->subLinkType == EXISTS_SUBLINK) { if ((j = convert_EXISTS_sublink_to_join(root, sublink, true, - available_rels1)) != NULL) + available_rels1)) != NULL) { /* Yes; insert the new join node into the join tree */ j->larg = *jtlink1; @@ -490,7 +490,7 @@ pull_up_sublinks_qual_recurse(PlannerInfo *root, Node *node, } if (available_rels2 != NULL && (j = convert_EXISTS_sublink_to_join(root, sublink, true, - available_rels2)) != NULL) + available_rels2)) != NULL) { /* Yes; insert the new join node into the join tree */ j->larg = *jtlink2; @@ -793,12 +793,12 @@ pull_up_subqueries_recurse(PlannerInfo *root, Node *jtnode, */ j->larg = pull_up_subqueries_recurse(root, j->larg, lowest_outer_join, - lowest_nulling_outer_join, + lowest_nulling_outer_join, NULL, true); j->rarg = pull_up_subqueries_recurse(root, j->rarg, lowest_outer_join, - lowest_nulling_outer_join, + lowest_nulling_outer_join, NULL, j->larg != NULL); break; @@ -807,7 +807,7 @@ pull_up_subqueries_recurse(PlannerInfo *root, Node *jtnode, case JOIN_ANTI: j->larg = pull_up_subqueries_recurse(root, j->larg, j, - lowest_nulling_outer_join, + lowest_nulling_outer_join, NULL, false); j->rarg = pull_up_subqueries_recurse(root, j->rarg, @@ -836,7 +836,7 @@ pull_up_subqueries_recurse(PlannerInfo *root, Node *jtnode, false); j->rarg = pull_up_subqueries_recurse(root, j->rarg, j, - lowest_nulling_outer_join, + lowest_nulling_outer_join, NULL, false); break; @@ -1523,7 +1523,7 @@ is_simple_subquery(Query *subquery, RangeTblEntry *rte, } if (jointree_contains_lateral_outer_refs((Node *) subquery->jointree, - restricted, safe_upper_varnos)) + restricted, safe_upper_varnos)) return false; /* @@ -2185,7 +2185,7 @@ pullup_replace_vars_callback(Var *var, * level-zero var must belong to the subquery. */ if ((rcon->target_rte->lateral ? - bms_overlap(pull_varnos((Node *) newnode), rcon->relids) : + bms_overlap(pull_varnos((Node *) newnode), rcon->relids) : contain_vars_of_level((Node *) newnode, 0)) && !contain_nonstrict_functions((Node *) newnode)) { @@ -2739,7 +2739,7 @@ reduce_outer_joins_pass2(Node *jtnode, { /* OK to merge upper and local constraints */ local_nonnullable_rels = bms_add_members(local_nonnullable_rels, - nonnullable_rels); + nonnullable_rels); local_nonnullable_vars = list_concat(local_nonnullable_vars, nonnullable_vars); local_forced_null_vars = list_concat(local_forced_null_vars, diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c index 8b44fb96b08..cf46b74782c 100644 --- a/src/backend/optimizer/prep/prepunion.c +++ b/src/backend/optimizer/prep/prepunion.c @@ -356,7 +356,7 @@ recurse_set_operations(Node *setOp, PlannerInfo *root, *pNumGroups = subpath->rows; else *pNumGroups = estimate_num_groups(subroot, - get_tlist_exprs(subquery->targetList, false), + get_tlist_exprs(subquery->targetList, false), subpath->rows, NULL); } @@ -724,14 +724,14 @@ generate_nonunion_path(SetOperationStmt *op, PlannerInfo *root, */ use_hash = choose_hashed_setop(root, groupList, path, dNumGroups, dNumOutputRows, - (op->op == SETOP_INTERSECT) ? "INTERSECT" : "EXCEPT"); + (op->op == SETOP_INTERSECT) ? "INTERSECT" : "EXCEPT"); if (!use_hash) path = (Path *) create_sort_path(root, result_rel, path, make_pathkeys_for_sortclauses(root, - groupList, + groupList, tlist), -1.0); @@ -887,7 +887,7 @@ make_union_unique(SetOperationStmt *op, Path *path, List *tlist, result_rel, path, make_pathkeys_for_sortclauses(root, - groupList, + groupList, tlist), -1.0); /* We have to manually jam the right tlist into the path; ick */ @@ -1527,11 +1527,11 @@ expand_inherited_rtentry(PlannerInfo *root, RangeTblEntry *rte, Index rti) if (childOID != parentOID) { childrte->selectedCols = translate_col_privs(rte->selectedCols, - appinfo->translated_vars); + appinfo->translated_vars); childrte->insertedCols = translate_col_privs(rte->insertedCols, - appinfo->translated_vars); + appinfo->translated_vars); childrte->updatedCols = translate_col_privs(rte->updatedCols, - appinfo->translated_vars); + appinfo->translated_vars); } } else @@ -1740,7 +1740,7 @@ translate_col_privs(const Bitmapset *parent_privs, if (bms_is_member(attno - FirstLowInvalidHeapAttributeNumber, parent_privs)) child_privs = bms_add_member(child_privs, - attno - FirstLowInvalidHeapAttributeNumber); + attno - FirstLowInvalidHeapAttributeNumber); } /* Check if parent has whole-row reference */ @@ -1760,7 +1760,7 @@ translate_col_privs(const Bitmapset *parent_privs, bms_is_member(attno - FirstLowInvalidHeapAttributeNumber, parent_privs)) child_privs = bms_add_member(child_privs, - var->varattno - FirstLowInvalidHeapAttributeNumber); + var->varattno - FirstLowInvalidHeapAttributeNumber); } return child_privs; @@ -1927,7 +1927,7 @@ adjust_appendrel_attrs_mutator(Node *node, JoinExpr *j; j = (JoinExpr *) expression_tree_mutator(node, - adjust_appendrel_attrs_mutator, + adjust_appendrel_attrs_mutator, (void *) context); /* now fix JoinExpr's rtindex (probably never happens) */ if (j->rtindex == appinfo->parent_relid) @@ -1940,7 +1940,7 @@ adjust_appendrel_attrs_mutator(Node *node, PlaceHolderVar *phv; phv = (PlaceHolderVar *) expression_tree_mutator(node, - adjust_appendrel_attrs_mutator, + adjust_appendrel_attrs_mutator, (void *) context); /* now fix PlaceHolderVar's relid sets */ if (phv->phlevelsup == 0) diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index b9e5dc25ebe..8961ed88a81 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -147,14 +147,14 @@ static Expr *inline_function(Oid funcid, Oid result_type, Oid result_collid, static Node *substitute_actual_parameters(Node *expr, int nargs, List *args, int *usecounts); static Node *substitute_actual_parameters_mutator(Node *node, - substitute_actual_parameters_context *context); + substitute_actual_parameters_context *context); static void sql_inline_error_callback(void *arg); static Expr *evaluate_expr(Expr *expr, Oid result_type, int32 result_typmod, Oid result_collation); static Query *substitute_actual_srf_parameters(Query *expr, int nargs, List *args); static Node *substitute_actual_srf_parameters_mutator(Node *node, - substitute_actual_srf_parameters_context *context); + substitute_actual_srf_parameters_context *context); static bool tlist_matches_coltypelist(List *tlist, List *coltypelist); @@ -1011,7 +1011,7 @@ contain_volatile_functions_not_nextval_walker(Node *node, void *context) return false; /* Check for volatile functions in node itself */ if (check_functions_in_node(node, - contain_volatile_functions_not_nextval_checker, + contain_volatile_functions_not_nextval_checker, context)) return true; @@ -1026,11 +1026,11 @@ contain_volatile_functions_not_nextval_walker(Node *node, void *context) { /* Recurse into subselects */ return query_tree_walker((Query *) node, - contain_volatile_functions_not_nextval_walker, + contain_volatile_functions_not_nextval_walker, context, 0); } return expression_tree_walker(node, - contain_volatile_functions_not_nextval_walker, + contain_volatile_functions_not_nextval_walker, context); } @@ -1432,7 +1432,7 @@ contain_context_dependent_node_walker(Node *node, int *flags) */ *flags |= CCDN_IN_CASEEXPR; res = expression_tree_walker(node, - contain_context_dependent_node_walker, + contain_context_dependent_node_walker, (void *) flags); *flags = save_flags; return res; @@ -2675,7 +2675,7 @@ eval_const_expressions_mutator(Node *node, * self. */ args = (List *) expression_tree_mutator((Node *) expr->args, - eval_const_expressions_mutator, + eval_const_expressions_mutator, (void *) context); /* @@ -2943,7 +2943,7 @@ eval_const_expressions_mutator(Node *node, -1, InvalidOid, sizeof(Oid), - ObjectIdGetDatum(intypioparam), + ObjectIdGetDatum(intypioparam), false, true), makeConst(INT4OID, @@ -3009,7 +3009,7 @@ eval_const_expressions_mutator(Node *node, */ if (arg && IsA(arg, Const) && (!OidIsValid(newexpr->elemfuncid) || - func_volatile(newexpr->elemfuncid) == PROVOLATILE_IMMUTABLE)) + func_volatile(newexpr->elemfuncid) == PROVOLATILE_IMMUTABLE)) return (Node *) evaluate_expr((Expr *) newexpr, newexpr->resulttype, newexpr->resulttypmod, @@ -3286,7 +3286,7 @@ eval_const_expressions_mutator(Node *node, if (newargs == NIL) return (Node *) makeNullConst(coalesceexpr->coalescetype, -1, - coalesceexpr->coalescecollid); + coalesceexpr->coalescecollid); newcoalesce = makeNode(CoalesceExpr); newcoalesce->coalescetype = coalesceexpr->coalescetype; @@ -3365,7 +3365,7 @@ eval_const_expressions_mutator(Node *node, fselect->fieldnum <= list_length(rowexpr->args)) { Node *fld = (Node *) list_nth(rowexpr->args, - fselect->fieldnum - 1); + fselect->fieldnum - 1); if (rowtype_field_matches(rowexpr->row_typeid, fselect->fieldnum, @@ -3900,7 +3900,7 @@ simplify_function(Oid funcid, Oid result_type, int32 result_typmod, { args = expand_function_arguments(args, result_type, func_tuple); args = (List *) expression_tree_mutator((Node *) args, - eval_const_expressions_mutator, + eval_const_expressions_mutator, (void *) context); /* Argument processing done, give it back to the caller */ *args_p = args; @@ -4623,7 +4623,7 @@ substitute_actual_parameters(Node *expr, int nargs, List *args, static Node * substitute_actual_parameters_mutator(Node *node, - substitute_actual_parameters_context *context) + substitute_actual_parameters_context *context) { if (node == NULL) return NULL; @@ -4943,7 +4943,7 @@ inline_set_returning_function(PlannerInfo *root, RangeTblEntry *rte) querytree_list = pg_analyze_and_rewrite_params(linitial(raw_parsetree_list), src, - (ParserSetupHook) sql_fn_parser_setup, + (ParserSetupHook) sql_fn_parser_setup, pinfo, NULL); if (list_length(querytree_list) != 1) goto fail; @@ -5066,7 +5066,7 @@ substitute_actual_srf_parameters(Query *expr, int nargs, List *args) static Node * substitute_actual_srf_parameters_mutator(Node *node, - substitute_actual_srf_parameters_context *context) + substitute_actual_srf_parameters_context *context) { Node *result; @@ -5076,7 +5076,7 @@ substitute_actual_srf_parameters_mutator(Node *node, { context->sublevels_up++; result = (Node *) query_tree_mutator((Query *) node, - substitute_actual_srf_parameters_mutator, + substitute_actual_srf_parameters_mutator, (void *) context, 0); context->sublevels_up--; diff --git a/src/backend/optimizer/util/orclauses.c b/src/backend/optimizer/util/orclauses.c index dd7cfc94b8b..9aa661c9098 100644 --- a/src/backend/optimizer/util/orclauses.c +++ b/src/backend/optimizer/util/orclauses.c @@ -233,7 +233,7 @@ extract_or_clause(RestrictInfo *or_rinfo, RelOptInfo *rel) subclause = (Node *) make_ands_explicit(subclauses); if (or_clause(subclause)) clauselist = list_concat(clauselist, - list_copy(((BoolExpr *) subclause)->args)); + list_copy(((BoolExpr *) subclause)->args)); else clauselist = lappend(clauselist, subclause); } diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index 63afc04b625..77c124e27f4 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -477,7 +477,7 @@ add_path(RelOptInfo *parent_rel, Path *new_path) { case COSTS_EQUAL: outercmp = bms_subset_compare(PATH_REQ_OUTER(new_path), - PATH_REQ_OUTER(old_path)); + PATH_REQ_OUTER(old_path)); if (keyscmp == PATHKEYS_BETTER1) { if ((outercmp == BMS_EQUAL || @@ -525,7 +525,7 @@ add_path(RelOptInfo *parent_rel, Path *new_path) accept_new = false; /* old dominates new */ else if (compare_path_costs_fuzzily(new_path, old_path, - 1.0000000001) == COSTS_BETTER1) + 1.0000000001) == COSTS_BETTER1) remove_old = true; /* new dominates old */ else accept_new = false; /* old equals or @@ -546,7 +546,7 @@ add_path(RelOptInfo *parent_rel, Path *new_path) if (keyscmp != PATHKEYS_BETTER2) { outercmp = bms_subset_compare(PATH_REQ_OUTER(new_path), - PATH_REQ_OUTER(old_path)); + PATH_REQ_OUTER(old_path)); if ((outercmp == BMS_EQUAL || outercmp == BMS_SUBSET1) && new_path->rows <= old_path->rows && @@ -558,7 +558,7 @@ add_path(RelOptInfo *parent_rel, Path *new_path) if (keyscmp != PATHKEYS_BETTER1) { outercmp = bms_subset_compare(PATH_REQ_OUTER(new_path), - PATH_REQ_OUTER(old_path)); + PATH_REQ_OUTER(old_path)); if ((outercmp == BMS_EQUAL || outercmp == BMS_SUBSET2) && new_path->rows >= old_path->rows && diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c index 9dc35c1aefb..dc0b0b07067 100644 --- a/src/backend/optimizer/util/plancat.c +++ b/src/backend/optimizer/util/plancat.c @@ -620,7 +620,7 @@ infer_arbiter_indexes(PlannerInfo *root) errmsg("whole row unique index inference specifications are not supported"))); inferAttrs = bms_add_member(inferAttrs, - attno - FirstLowInvalidHeapAttributeNumber); + attno - FirstLowInvalidHeapAttributeNumber); } /* @@ -715,7 +715,7 @@ infer_arbiter_indexes(PlannerInfo *root) if (attno != 0) indexedAttrs = bms_add_member(indexedAttrs, - attno - FirstLowInvalidHeapAttributeNumber); + attno - FirstLowInvalidHeapAttributeNumber); } /* Non-expression attributes (if any) must match */ @@ -1607,7 +1607,7 @@ build_index_tlist(PlannerInfo *root, IndexOptInfo *index, if (indexkey < 0) att_tup = SystemAttributeDefinition(indexkey, - heapRelation->rd_rel->relhasoids); + heapRelation->rd_rel->relhasoids); else att_tup = heapRelation->rd_att->attrs[indexkey - 1]; diff --git a/src/backend/optimizer/util/relnode.c b/src/backend/optimizer/util/relnode.c index 22f5ddac58b..c8e2b67da42 100644 --- a/src/backend/optimizer/util/relnode.c +++ b/src/backend/optimizer/util/relnode.c @@ -279,7 +279,7 @@ build_join_rel_hash(PlannerInfo *root) hashtab = hash_create("JoinRelHashTable", 256L, &hash_ctl, - HASH_ELEM | HASH_FUNCTION | HASH_COMPARE | HASH_CONTEXT); + HASH_ELEM | HASH_FUNCTION | HASH_COMPARE | HASH_CONTEXT); /* Insert all the already-existing joinrels */ foreach(l, root->join_rel_list) diff --git a/src/backend/optimizer/util/var.c b/src/backend/optimizer/util/var.c index 45fa22f9189..b8d7d3ffadc 100644 --- a/src/backend/optimizer/util/var.c +++ b/src/backend/optimizer/util/var.c @@ -240,7 +240,7 @@ pull_varattnos_walker(Node *node, pull_varattnos_context *context) if (var->varno == context->varno && var->varlevelsup == 0) context->varattnos = bms_add_member(context->varattnos, - var->varattno - FirstLowInvalidHeapAttributeNumber); + var->varattno - FirstLowInvalidHeapAttributeNumber); return false; } @@ -778,7 +778,7 @@ flatten_join_alias_vars_mutator(Node *node, PlaceHolderVar *phv; phv = (PlaceHolderVar *) expression_tree_mutator(node, - flatten_join_alias_vars_mutator, + flatten_join_alias_vars_mutator, (void *) context); /* now fix PlaceHolderVar's relid sets */ if (phv->phlevelsup == context->sublevels_up) diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index 3e2f64866d5..4fb793cfbf0 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -305,7 +305,7 @@ transformStmt(ParseState *pstate, Node *parseTree) */ case T_DeclareCursorStmt: result = transformDeclareCursorStmt(pstate, - (DeclareCursorStmt *) parseTree); + (DeclareCursorStmt *) parseTree); break; case T_ExplainStmt: @@ -315,7 +315,7 @@ transformStmt(ParseState *pstate, Node *parseTree) case T_CreateTableAsStmt: result = transformCreateTableAsStmt(pstate, - (CreateTableAsStmt *) parseTree); + (CreateTableAsStmt *) parseTree); break; default: @@ -490,7 +490,7 @@ transformInsertStmt(ParseState *pstate, InsertStmt *stmt) qry->override = stmt->override; isOnConflictUpdate = (stmt->onConflictClause && - stmt->onConflictClause->action == ONCONFLICT_UPDATE); + stmt->onConflictClause->action == ONCONFLICT_UPDATE); /* * We have three cases to deal with: DEFAULT VALUES (selectStmt == NULL), @@ -839,7 +839,7 @@ transformInsertStmt(ParseState *pstate, InsertStmt *stmt) qry->targetList = lappend(qry->targetList, tle); rte->insertedCols = bms_add_member(rte->insertedCols, - attr_num - FirstLowInvalidHeapAttributeNumber); + attr_num - FirstLowInvalidHeapAttributeNumber); icols = lnext(icols); attnos = lnext(attnos); @@ -918,7 +918,7 @@ transformInsertRow(ParseState *pstate, List *exprlist, errmsg("INSERT has more expressions than target columns"), parser_errposition(pstate, exprLocation(list_nth(exprlist, - list_length(icolumns)))))); + list_length(icolumns)))))); if (stmtcols != NIL && list_length(exprlist) < list_length(icolumns)) { @@ -940,7 +940,7 @@ transformInsertRow(ParseState *pstate, List *exprlist, errhint("The insertion source is a row expression containing the same number of columns expected by the INSERT. Did you accidentally use extra parentheses?") : 0), parser_errposition(pstate, exprLocation(list_nth(icolumns, - list_length(exprlist)))))); + list_length(exprlist)))))); } /* @@ -1199,7 +1199,7 @@ transformSelectStmt(ParseState *pstate, SelectStmt *stmt) (errcode(ERRCODE_SYNTAX_ERROR), errmsg("SELECT ... INTO is not allowed here"), parser_errposition(pstate, - exprLocation((Node *) stmt->intoClause)))); + exprLocation((Node *) stmt->intoClause)))); /* make FOR UPDATE/FOR SHARE info available to addRangeTableEntry */ pstate->p_locking_clause = stmt->lockingClause; @@ -1528,7 +1528,7 @@ transformValuesClause(ParseState *pstate, SelectStmt *stmt) translator: %s is a SQL row locking clause such as FOR UPDATE */ errmsg("%s cannot be applied to VALUES", LCS_asString(((LockingClause *) - linitial(stmt->lockingClause))->strength)))); + linitial(stmt->lockingClause))->strength)))); qry->rtable = pstate->p_rtable; qry->jointree = makeFromExpr(pstate->p_joinlist, NULL); @@ -1596,7 +1596,7 @@ transformSetOperationStmt(ParseState *pstate, SelectStmt *stmt) (errcode(ERRCODE_SYNTAX_ERROR), errmsg("SELECT ... INTO is not allowed here"), parser_errposition(pstate, - exprLocation((Node *) leftmostSelect->intoClause)))); + exprLocation((Node *) leftmostSelect->intoClause)))); /* * We need to extract ORDER BY and other top-level clauses here and not @@ -1749,7 +1749,7 @@ transformSetOperationStmt(ParseState *pstate, SelectStmt *stmt) errdetail("Only result column names can be used, not expressions or functions."), errhint("Add the expression/function to every SELECT, or move the UNION into a FROM clause."), parser_errposition(pstate, - exprLocation(list_nth(qry->targetList, tllen))))); + exprLocation(list_nth(qry->targetList, tllen))))); qry->limitOffset = transformLimitClause(pstate, limitOffset, EXPR_KIND_OFFSET, "OFFSET"); @@ -1810,7 +1810,7 @@ transformSetOperationTree(ParseState *pstate, SelectStmt *stmt, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("INTO is only allowed on first SELECT of UNION/INTERSECT/EXCEPT"), parser_errposition(pstate, - exprLocation((Node *) stmt->intoClause)))); + exprLocation((Node *) stmt->intoClause)))); /* We don't support FOR UPDATE/SHARE with set ops at the moment. */ if (stmt->lockingClause) @@ -1820,7 +1820,7 @@ transformSetOperationTree(ParseState *pstate, SelectStmt *stmt, translator: %s is a SQL row locking clause such as FOR UPDATE */ errmsg("%s is not allowed with UNION/INTERSECT/EXCEPT", LCS_asString(((LockingClause *) - linitial(stmt->lockingClause))->strength)))); + linitial(stmt->lockingClause))->strength)))); /* * If an internal node of a set-op tree has ORDER BY, LIMIT, FOR UPDATE, @@ -1882,7 +1882,7 @@ transformSetOperationTree(ParseState *pstate, SelectStmt *stmt, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), errmsg("UNION/INTERSECT/EXCEPT member statement cannot refer to other relations of same query level"), parser_errposition(pstate, - locate_var_of_level((Node *) selectQuery, 1)))); + locate_var_of_level((Node *) selectQuery, 1)))); } /* @@ -1969,8 +1969,8 @@ transformSetOperationTree(ParseState *pstate, SelectStmt *stmt, if (list_length(ltargetlist) != list_length(rtargetlist)) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("each %s query must have the same number of columns", - context), + errmsg("each %s query must have the same number of columns", + context), parser_errposition(pstate, exprLocation((Node *) rtargetlist)))); @@ -2067,8 +2067,8 @@ transformSetOperationTree(ParseState *pstate, SelectStmt *stmt, * collation.) */ rescolcoll = select_common_collation(pstate, - list_make2(lcolnode, rcolnode), - (op->op == SETOP_UNION && op->all)); + list_make2(lcolnode, rcolnode), + (op->op == SETOP_UNION && op->all)); /* emit results */ op->colTypes = lappend_oid(op->colTypes, rescoltype); @@ -2309,7 +2309,7 @@ transformUpdateTargetList(ParseState *pstate, List *origTlist) (errcode(ERRCODE_UNDEFINED_COLUMN), errmsg("column \"%s\" of relation \"%s\" does not exist", origTarget->name, - RelationGetRelationName(pstate->p_target_relation)), + RelationGetRelationName(pstate->p_target_relation)), parser_errposition(pstate, origTarget->location))); updateTargetListEntry(pstate, tle, origTarget->name, @@ -2319,7 +2319,7 @@ transformUpdateTargetList(ParseState *pstate, List *origTlist) /* Mark the target column as requiring update permissions */ target_rte->updatedCols = bms_add_member(target_rte->updatedCols, - attrno - FirstLowInvalidHeapAttributeNumber); + attrno - FirstLowInvalidHeapAttributeNumber); orig_tl = lnext(orig_tl); } @@ -2766,25 +2766,25 @@ transformLockingClause(ParseState *pstate, Query *qry, LockingClause *lc, translator: %s is a SQL row locking clause such as FOR UPDATE */ errmsg("%s cannot be applied to a join", LCS_asString(lc->strength)), - parser_errposition(pstate, thisrel->location))); + parser_errposition(pstate, thisrel->location))); break; case RTE_FUNCTION: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), /*------ translator: %s is a SQL row locking clause such as FOR UPDATE */ - errmsg("%s cannot be applied to a function", - LCS_asString(lc->strength)), - parser_errposition(pstate, thisrel->location))); + errmsg("%s cannot be applied to a function", + LCS_asString(lc->strength)), + parser_errposition(pstate, thisrel->location))); break; case RTE_TABLEFUNC: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), /*------ translator: %s is a SQL row locking clause such as FOR UPDATE */ - errmsg("%s cannot be applied to a table function", - LCS_asString(lc->strength)), - parser_errposition(pstate, thisrel->location))); + errmsg("%s cannot be applied to a table function", + LCS_asString(lc->strength)), + parser_errposition(pstate, thisrel->location))); break; case RTE_VALUES: ereport(ERROR, @@ -2793,16 +2793,16 @@ transformLockingClause(ParseState *pstate, Query *qry, LockingClause *lc, translator: %s is a SQL row locking clause such as FOR UPDATE */ errmsg("%s cannot be applied to VALUES", LCS_asString(lc->strength)), - parser_errposition(pstate, thisrel->location))); + parser_errposition(pstate, thisrel->location))); break; case RTE_CTE: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), /*------ translator: %s is a SQL row locking clause such as FOR UPDATE */ - errmsg("%s cannot be applied to a WITH query", - LCS_asString(lc->strength)), - parser_errposition(pstate, thisrel->location))); + errmsg("%s cannot be applied to a WITH query", + LCS_asString(lc->strength)), + parser_errposition(pstate, thisrel->location))); break; case RTE_NAMEDTUPLESTORE: ereport(ERROR, @@ -2811,7 +2811,7 @@ transformLockingClause(ParseState *pstate, Query *qry, LockingClause *lc, translator: %s is a SQL row locking clause such as FOR UPDATE */ errmsg("%s cannot be applied to a named tuplestore", LCS_asString(lc->strength)), - parser_errposition(pstate, thisrel->location))); + parser_errposition(pstate, thisrel->location))); break; default: elog(ERROR, "unrecognized RTE type: %d", diff --git a/src/backend/parser/parse_agg.c b/src/backend/parser/parse_agg.c index 9f721f80a85..613bdabd520 100644 --- a/src/backend/parser/parse_agg.c +++ b/src/backend/parser/parse_agg.c @@ -640,15 +640,15 @@ check_agg_arguments(ParseState *pstate, (errcode(ERRCODE_GROUPING_ERROR), errmsg("outer-level aggregate cannot contain a lower-level variable in its direct arguments"), parser_errposition(pstate, - locate_var_of_level((Node *) directargs, - context.min_varlevel)))); + locate_var_of_level((Node *) directargs, + context.min_varlevel)))); if (context.min_agglevel >= 0 && context.min_agglevel <= agglevel) ereport(ERROR, (errcode(ERRCODE_GROUPING_ERROR), errmsg("aggregate function calls cannot be nested"), parser_errposition(pstate, - locate_agg_of_level((Node *) directargs, - context.min_agglevel)))); + locate_agg_of_level((Node *) directargs, + context.min_agglevel)))); } return agglevel; } @@ -771,7 +771,7 @@ transformWindowFuncCall(ParseState *pstate, WindowFunc *wfunc, (errcode(ERRCODE_WINDOWING_ERROR), errmsg("window function calls cannot be nested"), parser_errposition(pstate, - locate_windowfunc((Node *) wfunc->args)))); + locate_windowfunc((Node *) wfunc->args)))); /* * Check to see if the window function is in an invalid place within the @@ -1016,8 +1016,8 @@ parseCheckAggregates(ParseState *pstate, Query *qry) errmsg("too many grouping sets present (maximum 4096)"), parser_errposition(pstate, qry->groupClause - ? exprLocation((Node *) qry->groupClause) - : exprLocation((Node *) qry->groupingSets)))); + ? exprLocation((Node *) qry->groupClause) + : exprLocation((Node *) qry->groupingSets)))); /* * The intersection will often be empty, so help things along by @@ -1095,7 +1095,7 @@ parseCheckAggregates(ParseState *pstate, Query *qry) root->hasJoinRTEs = true; groupClauses = (List *) flatten_join_alias_vars(root, - (Node *) groupClauses); + (Node *) groupClauses); } /* diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index ad76108ba6d..9ff80b8b403 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -359,7 +359,7 @@ transformJoinUsingClause(ParseState *pstate, /* Now create the lvar = rvar join condition */ e = makeSimpleA_Expr(AEXPR_OP, "=", - (Node *) copyObject(lvar), (Node *) copyObject(rvar), + (Node *) copyObject(lvar), (Node *) copyObject(rvar), -1); /* Prepare to combine into an AND clause, if multiple join columns */ @@ -636,7 +636,7 @@ transformRangeFunction(ParseState *pstate, RangeFunction *r) (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("set-returning functions must appear at top level of FROM"), parser_errposition(pstate, - exprLocation(pstate->p_last_srf)))); + exprLocation(pstate->p_last_srf)))); funcexprs = lappend(funcexprs, newfexpr); @@ -676,7 +676,7 @@ transformRangeFunction(ParseState *pstate, RangeFunction *r) (errcode(ERRCODE_SYNTAX_ERROR), errmsg("multiple column definition lists are not allowed for the same function"), parser_errposition(pstate, - exprLocation((Node *) r->coldeflist)))); + exprLocation((Node *) r->coldeflist)))); coldeflists = lappend(coldeflists, coldeflist); } @@ -710,22 +710,22 @@ transformRangeFunction(ParseState *pstate, RangeFunction *r) errmsg("ROWS FROM() with multiple functions cannot have a column definition list"), errhint("Put a separate column definition list for each function inside ROWS FROM()."), parser_errposition(pstate, - exprLocation((Node *) r->coldeflist)))); + exprLocation((Node *) r->coldeflist)))); else ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("UNNEST() with multiple arguments cannot have a column definition list"), errhint("Use separate UNNEST() calls inside ROWS FROM(), and attach a column definition list to each one."), parser_errposition(pstate, - exprLocation((Node *) r->coldeflist)))); + exprLocation((Node *) r->coldeflist)))); } if (r->ordinality) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("WITH ORDINALITY cannot be used with a column definition list"), - errhint("Put the column definition list inside ROWS FROM()."), + errhint("Put the column definition list inside ROWS FROM()."), parser_errposition(pstate, - exprLocation((Node *) r->coldeflist)))); + exprLocation((Node *) r->coldeflist)))); coldeflists = list_make1(r->coldeflist); } @@ -785,7 +785,7 @@ transformRangeTableFunc(ParseState *pstate, RangeTableFunc *rtf) /* Transform and apply typecast to the row-generating expression ... */ Assert(rtf->rowexpr != NULL); tf->rowexpr = coerce_to_specific_type(pstate, - transformExpr(pstate, rtf->rowexpr, EXPR_KIND_FROM_FUNCTION), + transformExpr(pstate, rtf->rowexpr, EXPR_KIND_FROM_FUNCTION), TEXTOID, constructName); assign_expr_collations(pstate, tf->rowexpr); @@ -793,7 +793,7 @@ transformRangeTableFunc(ParseState *pstate, RangeTableFunc *rtf) /* ... and to the document itself */ Assert(rtf->docexpr != NULL); tf->docexpr = coerce_to_specific_type(pstate, - transformExpr(pstate, rtf->docexpr, EXPR_KIND_FROM_FUNCTION), + transformExpr(pstate, rtf->docexpr, EXPR_KIND_FROM_FUNCTION), docType, constructName); assign_expr_collations(pstate, tf->docexpr); @@ -849,14 +849,14 @@ transformRangeTableFunc(ParseState *pstate, RangeTableFunc *rtf) tf->coltypes = lappend_oid(tf->coltypes, typid); tf->coltypmods = lappend_int(tf->coltypmods, typmod); tf->colcollations = lappend_oid(tf->colcollations, - type_is_collatable(typid) ? DEFAULT_COLLATION_OID : InvalidOid); + type_is_collatable(typid) ? DEFAULT_COLLATION_OID : InvalidOid); /* Transform the PATH and DEFAULT expressions */ if (rawc->colexpr) { colexpr = coerce_to_specific_type(pstate, - transformExpr(pstate, rawc->colexpr, - EXPR_KIND_FROM_FUNCTION), + transformExpr(pstate, rawc->colexpr, + EXPR_KIND_FROM_FUNCTION), TEXTOID, constructName); assign_expr_collations(pstate, colexpr); @@ -867,8 +867,8 @@ transformRangeTableFunc(ParseState *pstate, RangeTableFunc *rtf) if (rawc->coldefexpr) { coldefexpr = coerce_to_specific_type_typmod(pstate, - transformExpr(pstate, rawc->coldefexpr, - EXPR_KIND_FROM_FUNCTION), + transformExpr(pstate, rawc->coldefexpr, + EXPR_KIND_FROM_FUNCTION), typid, typmod, constructName); assign_expr_collations(pstate, coldefexpr); @@ -1022,12 +1022,12 @@ transformRangeTableSample(ParseState *pstate, RangeTableSample *rts) if (list_length(rts->args) != list_length(tsm->parameterTypes)) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLESAMPLE_ARGUMENT), - errmsg_plural("tablesample method %s requires %d argument, not %d", - "tablesample method %s requires %d arguments, not %d", - list_length(tsm->parameterTypes), - NameListToString(rts->method), - list_length(tsm->parameterTypes), - list_length(rts->args)), + errmsg_plural("tablesample method %s requires %d argument, not %d", + "tablesample method %s requires %d arguments, not %d", + list_length(tsm->parameterTypes), + NameListToString(rts->method), + list_length(tsm->parameterTypes), + list_length(rts->args)), parser_errposition(pstate, rts->location))); /* @@ -1056,8 +1056,8 @@ transformRangeTableSample(ParseState *pstate, RangeTableSample *rts) if (!tsm->repeatable_across_queries) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("tablesample method %s does not support REPEATABLE", - NameListToString(rts->method)), + errmsg("tablesample method %s does not support REPEATABLE", + NameListToString(rts->method)), parser_errposition(pstate, rts->location))); arg = transformExpr(pstate, rts->repeatable, EXPR_KIND_FROM_FUNCTION); @@ -1218,7 +1218,7 @@ transformFromClauseItem(ParseState *pstate, Node *n, ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("TABLESAMPLE clause can only be applied to tables and materialized views"), - parser_errposition(pstate, exprLocation(rts->relation)))); + parser_errposition(pstate, exprLocation(rts->relation)))); /* Transform TABLESAMPLE details and attach to the RTE */ rte->tablesample = transformRangeTableSample(pstate, rts); @@ -1830,7 +1830,7 @@ checkTargetlistEntrySQL92(ParseState *pstate, TargetEntry *tle, errmsg("aggregate functions are not allowed in %s", ParseExprKindName(exprKind)), parser_errposition(pstate, - locate_agg_of_level((Node *) tle->expr, 0)))); + locate_agg_of_level((Node *) tle->expr, 0)))); if (pstate->p_hasWindowFuncs && contain_windowfuncs((Node *) tle->expr)) ereport(ERROR, @@ -1839,7 +1839,7 @@ checkTargetlistEntrySQL92(ParseState *pstate, TargetEntry *tle, errmsg("window functions are not allowed in %s", ParseExprKindName(exprKind)), parser_errposition(pstate, - locate_windowfunc((Node *) tle->expr)))); + locate_windowfunc((Node *) tle->expr)))); break; case EXPR_KIND_ORDER_BY: /* no extra checks needed */ @@ -2415,7 +2415,7 @@ transformGroupingSet(List **flatresult, List *l = transformGroupClauseList(flatresult, pstate, (List *) n, targetlist, sortClause, - exprKind, useSQL99, false); + exprKind, useSQL99, false); content = lappend(content, makeGroupingSet(GROUPING_SET_SIMPLE, l, @@ -2427,8 +2427,8 @@ transformGroupingSet(List **flatresult, content = lappend(content, transformGroupingSet(flatresult, pstate, gset2, - targetlist, sortClause, - exprKind, useSQL99, false)); + targetlist, sortClause, + exprKind, useSQL99, false)); } else { @@ -2530,7 +2530,7 @@ transformGroupClause(ParseState *pstate, List *grouplist, List **groupingSets, { flat_grouplist = list_make1(makeGroupingSet(GROUPING_SET_EMPTY, NIL, - exprLocation((Node *) grouplist))); + exprLocation((Node *) grouplist))); } foreach(gl, flat_grouplist) @@ -2556,8 +2556,8 @@ transformGroupClause(ParseState *pstate, List *grouplist, List **groupingSets, gsets = lappend(gsets, transformGroupingSet(&result, pstate, gset, - targetlist, sortClause, - exprKind, useSQL99, true)); + targetlist, sortClause, + exprKind, useSQL99, true)); break; } } @@ -2566,7 +2566,7 @@ transformGroupClause(ParseState *pstate, List *grouplist, List **groupingSets, Index ref = transformGroupClauseExpr(&result, seen_local, pstate, gexpr, targetlist, sortClause, - exprKind, useSQL99, true); + exprKind, useSQL99, true); if (ref > 0) { @@ -2719,8 +2719,8 @@ transformWindowDefinitions(ParseState *pstate, if (partitionClause) ereport(ERROR, (errcode(ERRCODE_WINDOWING_ERROR), - errmsg("cannot override PARTITION BY clause of window \"%s\"", - windef->refname), + errmsg("cannot override PARTITION BY clause of window \"%s\"", + windef->refname), parser_errposition(pstate, windef->location))); wc->partitionClause = copyObject(refwc->partitionClause); } @@ -2731,8 +2731,8 @@ transformWindowDefinitions(ParseState *pstate, if (orderClause && refwc->orderClause) ereport(ERROR, (errcode(ERRCODE_WINDOWING_ERROR), - errmsg("cannot override ORDER BY clause of window \"%s\"", - windef->refname), + errmsg("cannot override ORDER BY clause of window \"%s\"", + windef->refname), parser_errposition(pstate, windef->location))); if (orderClause) { @@ -2767,8 +2767,8 @@ transformWindowDefinitions(ParseState *pstate, /* Else this clause is just OVER (foo), so say this: */ ereport(ERROR, (errcode(ERRCODE_WINDOWING_ERROR), - errmsg("cannot copy window \"%s\" because it has a frame clause", - windef->refname), + errmsg("cannot copy window \"%s\" because it has a frame clause", + windef->refname), errhint("Omit the parentheses in this OVER clause."), parser_errposition(pstate, windef->location))); } @@ -2868,7 +2868,7 @@ transformDistinctClause(ParseState *pstate, ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), is_agg ? - errmsg("an aggregate with DISTINCT must have at least one argument") : + errmsg("an aggregate with DISTINCT must have at least one argument") : errmsg("SELECT DISTINCT must have at least one column"))); return result; @@ -2937,9 +2937,9 @@ transformDistinctOnClause(ParseState *pstate, List *distinctlist, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), errmsg("SELECT DISTINCT ON expressions must match initial ORDER BY expressions"), parser_errposition(pstate, - get_matching_location(scl->tleSortGroupRef, - sortgrouprefs, - distinctlist)))); + get_matching_location(scl->tleSortGroupRef, + sortgrouprefs, + distinctlist)))); else result = lappend(result, copyObject(scl)); } @@ -3051,7 +3051,7 @@ resolve_unique_index_expr(ParseState *pstate, InferClause *infer, if (ielem->nulls_ordering != SORTBY_NULLS_DEFAULT) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("NULLS FIRST/LAST is not allowed in ON CONFLICT clause"), + errmsg("NULLS FIRST/LAST is not allowed in ON CONFLICT clause"), parser_errposition(pstate, exprLocation((Node *) infer)))); @@ -3134,7 +3134,7 @@ transformOnConflictArbiter(ParseState *pstate, errmsg("ON CONFLICT DO UPDATE requires inference specification or constraint name"), errhint("For example, ON CONFLICT (column_name)."), parser_errposition(pstate, - exprLocation((Node *) onConflictClause)))); + exprLocation((Node *) onConflictClause)))); /* * To simplify certain aspects of its design, speculative insertion into @@ -3143,9 +3143,9 @@ transformOnConflictArbiter(ParseState *pstate, if (IsCatalogRelation(pstate->p_target_relation)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("ON CONFLICT is not supported with system catalog tables"), + errmsg("ON CONFLICT is not supported with system catalog tables"), parser_errposition(pstate, - exprLocation((Node *) onConflictClause)))); + exprLocation((Node *) onConflictClause)))); /* Same applies to table used by logical decoding as catalog table */ if (RelationIsUsedAsCatalogTable(pstate->p_target_relation)) @@ -3154,7 +3154,7 @@ transformOnConflictArbiter(ParseState *pstate, errmsg("ON CONFLICT is not supported on table \"%s\" used as a catalog table", RelationGetRelationName(pstate->p_target_relation)), parser_errposition(pstate, - exprLocation((Node *) onConflictClause)))); + exprLocation((Node *) onConflictClause)))); /* ON CONFLICT DO NOTHING does not require an inference clause */ if (infer) @@ -3172,7 +3172,7 @@ transformOnConflictArbiter(ParseState *pstate, if (infer->indexElems) *arbiterExpr = resolve_unique_index_expr(pstate, infer, - pstate->p_target_relation); + pstate->p_target_relation); /* * Handling inference WHERE clause (for partial unique index @@ -3277,8 +3277,8 @@ addTargetToSortList(ParseState *pstate, TargetEntry *tle, if (!OidIsValid(eqop)) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("operator %s is not a valid ordering operator", - strVal(llast(sortby->useOp))), + errmsg("operator %s is not a valid ordering operator", + strVal(llast(sortby->useOp))), errhint("Ordering operators must be \"<\" or \">\" members of btree operator families."))); /* diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c index aa6a16185f2..0bc7dba6a0e 100644 --- a/src/backend/parser/parse_coerce.c +++ b/src/backend/parser/parse_coerce.c @@ -302,7 +302,7 @@ coerce_type(ParseState *pstate, Node *node, */ if (!con->constisnull) newcon->constvalue = stringTypeDatum(baseType, - DatumGetCString(con->constvalue), + DatumGetCString(con->constvalue), inputTypeMod); else newcon->constvalue = stringTypeDatum(baseType, @@ -342,7 +342,7 @@ coerce_type(ParseState *pstate, Node *node, val2 = PointerGetDatum(PG_DETOAST_DATUM(val2)); if (!datumIsEqual(newcon->constvalue, val2, false, newcon->constlen)) elog(WARNING, "type %s has unstable input conversion for \"%s\"", - typeTypeName(baseType), DatumGetCString(con->constvalue)); + typeTypeName(baseType), DatumGetCString(con->constvalue)); } #endif @@ -418,7 +418,7 @@ coerce_type(ParseState *pstate, Node *node, result = build_coercion_expression(node, pathtype, funcId, baseTypeId, baseTypeMod, cformat, location, - (cformat != COERCE_IMPLICIT_CAST)); + (cformat != COERCE_IMPLICIT_CAST)); /* * If domain, coerce to the domain type and relabel with domain @@ -1646,7 +1646,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types, if (OidIsValid(elem_typeid) && actual_type != elem_typeid) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("arguments declared \"anyelement\" are not all alike"), + errmsg("arguments declared \"anyelement\" are not all alike"), errdetail("%s versus %s", format_type_be(elem_typeid), format_type_be(actual_type)))); @@ -1666,7 +1666,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types, if (OidIsValid(array_typeid) && actual_type != array_typeid) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("arguments declared \"anyarray\" are not all alike"), + errmsg("arguments declared \"anyarray\" are not all alike"), errdetail("%s versus %s", format_type_be(array_typeid), format_type_be(actual_type)))); @@ -1686,7 +1686,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types, if (OidIsValid(range_typeid) && actual_type != range_typeid) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("arguments declared \"anyrange\" are not all alike"), + errmsg("arguments declared \"anyrange\" are not all alike"), errdetail("%s versus %s", format_type_be(range_typeid), format_type_be(actual_type)))); @@ -1715,8 +1715,8 @@ enforce_generic_type_consistency(Oid *actual_arg_types, if (!OidIsValid(array_typelem)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("argument declared %s is not an array but type %s", - "anyarray", format_type_be(array_typeid)))); + errmsg("argument declared %s is not an array but type %s", + "anyarray", format_type_be(array_typeid)))); } if (!OidIsValid(elem_typeid)) @@ -1753,9 +1753,9 @@ enforce_generic_type_consistency(Oid *actual_arg_types, if (!OidIsValid(range_typelem)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("argument declared %s is not a range type but type %s", - "anyrange", - format_type_be(range_typeid)))); + errmsg("argument declared %s is not a range type but type %s", + "anyrange", + format_type_be(range_typeid)))); } if (!OidIsValid(elem_typeid)) @@ -1802,8 +1802,8 @@ enforce_generic_type_consistency(Oid *actual_arg_types, if (type_is_array_domain(elem_typeid)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("type matched to anynonarray is an array type: %s", - format_type_be(elem_typeid)))); + errmsg("type matched to anynonarray is an array type: %s", + format_type_be(elem_typeid)))); } if (have_anyenum && elem_typeid != ANYELEMENTOID) @@ -1841,8 +1841,8 @@ enforce_generic_type_consistency(Oid *actual_arg_types, if (!OidIsValid(array_typeid)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("could not find array type for data type %s", - format_type_be(elem_typeid)))); + errmsg("could not find array type for data type %s", + format_type_be(elem_typeid)))); } declared_arg_types[j] = array_typeid; } @@ -1852,8 +1852,8 @@ enforce_generic_type_consistency(Oid *actual_arg_types, { ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("could not find range type for data type %s", - format_type_be(elem_typeid)))); + errmsg("could not find range type for data type %s", + format_type_be(elem_typeid)))); } declared_arg_types[j] = range_typeid; } @@ -1930,8 +1930,8 @@ resolve_generic_type(Oid declared_type, if (!OidIsValid(array_typelem)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("argument declared %s is not an array but type %s", - "anyarray", format_type_be(context_base_type)))); + errmsg("argument declared %s is not an array but type %s", + "anyarray", format_type_be(context_base_type)))); return context_base_type; } else if (context_declared_type == ANYELEMENTOID || @@ -1964,8 +1964,8 @@ resolve_generic_type(Oid declared_type, if (!OidIsValid(array_typelem)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("argument declared %s is not an array but type %s", - "anyarray", format_type_be(context_base_type)))); + errmsg("argument declared %s is not an array but type %s", + "anyarray", format_type_be(context_base_type)))); return array_typelem; } else if (context_declared_type == ANYRANGEOID) @@ -1977,8 +1977,8 @@ resolve_generic_type(Oid declared_type, if (!OidIsValid(range_typelem)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("argument declared %s is not a range type but type %s", - "anyrange", format_type_be(context_base_type)))); + errmsg("argument declared %s is not a range type but type %s", + "anyrange", format_type_be(context_base_type)))); return range_typelem; } else if (context_declared_type == ANYELEMENTOID || @@ -2253,7 +2253,7 @@ find_coercion_pathway(Oid targetTypeId, Oid sourceTypeId, Oid sourceElem; if ((targetElem = get_element_type(targetTypeId)) != InvalidOid && - (sourceElem = get_base_element_type(sourceTypeId)) != InvalidOid) + (sourceElem = get_base_element_type(sourceTypeId)) != InvalidOid) { CoercionPathType elempathtype; Oid elemfuncid; diff --git a/src/backend/parser/parse_collate.c b/src/backend/parser/parse_collate.c index d99e4cc0f47..0d106c4c19e 100644 --- a/src/backend/parser/parse_collate.c +++ b/src/backend/parser/parse_collate.c @@ -604,11 +604,11 @@ assign_collations_walker(Node *node, assign_collations_context *context) break; case AGGKIND_ORDERED_SET: assign_ordered_set_collations(aggref, - &loccontext); + &loccontext); break; case AGGKIND_HYPOTHETICAL: assign_hypothetical_collations(aggref, - &loccontext); + &loccontext); break; default: elog(ERROR, "unrecognized aggkind: %d", @@ -616,7 +616,7 @@ assign_collations_walker(Node *node, assign_collations_context *context) } assign_expr_collations(context->pstate, - (Node *) aggref->aggfilter); + (Node *) aggref->aggfilter); } break; case T_WindowFunc: @@ -674,7 +674,7 @@ assign_collations_walker(Node *node, assign_collations_context *context) * equally to loccontext. */ (void) expression_tree_walker(node, - assign_collations_walker, + assign_collations_walker, (void *) &loccontext); break; } @@ -900,7 +900,7 @@ assign_ordered_set_collations(Aggref *aggref, /* Merge sort collations to parent only if there can be only one */ merge_sort_collations = (list_length(aggref->args) == 1 && - get_func_variadictype(aggref->aggfnoid) == InvalidOid); + get_func_variadictype(aggref->aggfnoid) == InvalidOid); /* Direct args, if any, are normal children of the Aggref node */ (void) assign_collations_walker((Node *) aggref->aggdirectargs, @@ -938,7 +938,7 @@ assign_hypothetical_collations(Aggref *aggref, /* Merge sort collations to parent only if there can be only one */ merge_sort_collations = (list_length(aggref->args) == 1 && - get_func_variadictype(aggref->aggfnoid) == InvalidOid); + get_func_variadictype(aggref->aggfnoid) == InvalidOid); /* Process any non-hypothetical direct args */ extra_args = list_length(aggref->aggdirectargs) - list_length(aggref->args); diff --git a/src/backend/parser/parse_cte.c b/src/backend/parser/parse_cte.c index dbe4cc23934..5160fdb0e0c 100644 --- a/src/backend/parser/parse_cte.c +++ b/src/backend/parser/parse_cte.c @@ -129,8 +129,8 @@ transformWithClause(ParseState *pstate, WithClause *withClause) if (strcmp(cte->ctename, cte2->ctename) == 0) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_ALIAS), - errmsg("WITH query name \"%s\" specified more than once", - cte2->ctename), + errmsg("WITH query name \"%s\" specified more than once", + cte2->ctename), parser_errposition(pstate, cte2->location))); } @@ -313,7 +313,7 @@ analyzeCTE(ParseState *pstate, CommonTableExpr *cte) errmsg("recursive query \"%s\" column %d has type %s in non-recursive term but type %s overall", cte->ctename, varattno, format_type_with_typemod(lfirst_oid(lctyp), - lfirst_int(lctypmod)), + lfirst_int(lctypmod)), format_type_with_typemod(exprType(texpr), exprTypmod(texpr))), errhint("Cast the output of the non-recursive term to the correct type."), @@ -595,7 +595,7 @@ TopologicalSort(ParseState *pstate, CteItem *items, int numitems) if (j >= numitems) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("mutual recursion between WITH items is not implemented"), + errmsg("mutual recursion between WITH items is not implemented"), parser_errposition(pstate, items[i].cte->location))); /* @@ -699,9 +699,9 @@ checkWellFormedRecursion(CteState *cstate) if (stmt->sortClause) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("ORDER BY in a recursive query is not implemented"), + errmsg("ORDER BY in a recursive query is not implemented"), parser_errposition(cstate->pstate, - exprLocation((Node *) stmt->sortClause)))); + exprLocation((Node *) stmt->sortClause)))); if (stmt->limitOffset) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), @@ -719,7 +719,7 @@ checkWellFormedRecursion(CteState *cstate) (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("FOR UPDATE/SHARE in a recursive query is not implemented"), parser_errposition(cstate->pstate, - exprLocation((Node *) stmt->lockingClause)))); + exprLocation((Node *) stmt->lockingClause)))); } } diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 3a9cdb42089..6d8cb07766b 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -418,8 +418,8 @@ unknown_attribute(ParseState *pstate, Node *relref, char *attname, else if (relTypeId == RECORDOID) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("could not identify column \"%s\" in record data type", - attname), + errmsg("could not identify column \"%s\" in record data type", + attname), parser_errposition(pstate, location))); else ereport(ERROR, @@ -786,15 +786,15 @@ transformColumnRef(ParseState *pstate, ColumnRef *cref) case CRERR_WRONG_DB: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cross-database references are not implemented: %s", - NameListToString(cref->fields)), + errmsg("cross-database references are not implemented: %s", + NameListToString(cref->fields)), parser_errposition(pstate, cref->location))); break; case CRERR_TOO_MANY: ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("improper qualified name (too many dotted names): %s", - NameListToString(cref->fields)), + errmsg("improper qualified name (too many dotted names): %s", + NameListToString(cref->fields)), parser_errposition(pstate, cref->location))); break; } @@ -1263,7 +1263,7 @@ transformAExprIn(ParseState *pstate, A_Expr *a) /* ROW() op ROW() is handled specially */ cmp = make_row_comparison_op(pstate, a->name, - copyObject(((RowExpr *) lexpr)->args), + copyObject(((RowExpr *) lexpr)->args), ((RowExpr *) rexpr)->args, a->location); } @@ -1364,10 +1364,10 @@ transformAExprBetween(ParseState *pstate, A_Expr *a) a->location)); sub1 = (Node *) makeBoolExpr(AND_EXPR, args, a->location); args = list_make2(makeSimpleA_Expr(AEXPR_OP, ">=", - copyObject(aexpr), copyObject(cexpr), + copyObject(aexpr), copyObject(cexpr), a->location), makeSimpleA_Expr(AEXPR_OP, "<=", - copyObject(aexpr), copyObject(bexpr), + copyObject(aexpr), copyObject(bexpr), a->location)); sub2 = (Node *) makeBoolExpr(AND_EXPR, args, a->location); args = list_make2(sub1, sub2); @@ -1382,10 +1382,10 @@ transformAExprBetween(ParseState *pstate, A_Expr *a) a->location)); sub1 = (Node *) makeBoolExpr(OR_EXPR, args, a->location); args = list_make2(makeSimpleA_Expr(AEXPR_OP, "<", - copyObject(aexpr), copyObject(cexpr), + copyObject(aexpr), copyObject(cexpr), a->location), makeSimpleA_Expr(AEXPR_OP, ">", - copyObject(aexpr), copyObject(bexpr), + copyObject(aexpr), copyObject(bexpr), a->location)); sub2 = (Node *) makeBoolExpr(OR_EXPR, args, a->location); args = list_make2(sub1, sub2); @@ -1516,7 +1516,7 @@ transformMultiAssignRef(ParseState *pstate, MultiAssignRef *maref) if (count_nonjunk_tlist_entries(qtree->targetList) != maref->ncolumns) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("number of columns does not match number of values"), + errmsg("number of columns does not match number of values"), parser_errposition(pstate, sublink->location))); /* @@ -1548,7 +1548,7 @@ transformMultiAssignRef(ParseState *pstate, MultiAssignRef *maref) if (list_length(rexpr->args) != maref->ncolumns) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("number of columns does not match number of values"), + errmsg("number of columns does not match number of values"), parser_errposition(pstate, rexpr->location))); /* @@ -1563,7 +1563,7 @@ transformMultiAssignRef(ParseState *pstate, MultiAssignRef *maref) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("source for a multiple-column UPDATE item must be a sub-SELECT or ROW() expression"), - parser_errposition(pstate, exprLocation(maref->source)))); + parser_errposition(pstate, exprLocation(maref->source)))); } else { @@ -2096,8 +2096,8 @@ transformArrayExpr(ParseState *pstate, A_ArrayExpr *a, if (!OidIsValid(element_type)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("could not find element type for data type %s", - format_type_be(array_type)), + errmsg("could not find element type for data type %s", + format_type_be(array_type)), parser_errposition(pstate, a->location))); } else @@ -2383,8 +2383,8 @@ transformXmlExpr(ParseState *pstate, XmlExpr *x) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), x->op == IS_XMLELEMENT - ? errmsg("unnamed XML attribute value must be a column reference") - : errmsg("unnamed XML element value must be a column reference"), + ? errmsg("unnamed XML attribute value must be a column reference") + : errmsg("unnamed XML element value must be a column reference"), parser_errposition(pstate, r->location))); argname = NULL; /* keep compiler quiet */ } @@ -2399,8 +2399,8 @@ transformXmlExpr(ParseState *pstate, XmlExpr *x) if (strcmp(argname, strVal(lfirst(lc2))) == 0) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("XML attribute name \"%s\" appears more than once", - argname), + errmsg("XML attribute name \"%s\" appears more than once", + argname), parser_errposition(pstate, r->location))); } } @@ -2480,7 +2480,7 @@ transformXmlSerialize(ParseState *pstate, XmlSerialize *xs) xexpr = makeNode(XmlExpr); xexpr->op = IS_XMLSERIALIZE; xexpr->args = list_make1(coerce_to_specific_type(pstate, - transformExprRecurse(pstate, xs->expr), + transformExprRecurse(pstate, xs->expr), XMLOID, "XMLSERIALIZE")); @@ -2837,9 +2837,9 @@ make_row_comparison_op(ParseState *pstate, List *opname, if (cmp->opresulttype != BOOLOID) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("row comparison operator must yield type boolean, " - "not type %s", - format_type_be(cmp->opresulttype)), + errmsg("row comparison operator must yield type boolean, " + "not type %s", + format_type_be(cmp->opresulttype)), parser_errposition(pstate, location))); if (expression_returns_set((Node *) cmp)) ereport(ERROR, @@ -2946,7 +2946,7 @@ make_row_comparison_op(ParseState *pstate, List *opname, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("could not determine interpretation of row comparison operator %s", strVal(llast(opname))), - errdetail("There are multiple equally-plausible candidates."), + errdetail("There are multiple equally-plausible candidates."), parser_errposition(pstate, location))); } @@ -3039,7 +3039,7 @@ make_distinct_op(ParseState *pstate, List *opname, Node *ltree, Node *rtree, if (((OpExpr *) result)->opresulttype != BOOLOID) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("IS DISTINCT FROM requires = operator to yield boolean"), + errmsg("IS DISTINCT FROM requires = operator to yield boolean"), parser_errposition(pstate, location))); if (((OpExpr *) result)->opretset) ereport(ERROR, diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c index 38a73ba122c..8487edaa958 100644 --- a/src/backend/parser/parse_func.c +++ b/src/backend/parser/parse_func.c @@ -117,10 +117,10 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, if (list_length(fargs) > FUNC_MAX_ARGS) ereport(ERROR, (errcode(ERRCODE_TOO_MANY_ARGUMENTS), - errmsg_plural("cannot pass more than %d argument to a function", - "cannot pass more than %d arguments to a function", - FUNC_MAX_ARGS, - FUNC_MAX_ARGS), + errmsg_plural("cannot pass more than %d argument to a function", + "cannot pass more than %d arguments to a function", + FUNC_MAX_ARGS, + FUNC_MAX_ARGS), parser_errposition(pstate, location))); /* @@ -176,8 +176,8 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, if (strcmp(na->name, (char *) lfirst(lc)) == 0) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("argument name \"%s\" used more than once", - na->name), + errmsg("argument name \"%s\" used more than once", + na->name), parser_errposition(pstate, na->location))); } argnames = lappend(argnames, na->name); @@ -187,7 +187,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, if (argnames != NIL) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("positional argument cannot follow named argument"), + errmsg("positional argument cannot follow named argument"), parser_errposition(pstate, exprLocation(arg)))); } } @@ -272,15 +272,15 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, if (agg_star) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("%s(*) specified, but %s is not an aggregate function", - NameListToString(funcname), - NameListToString(funcname)), + errmsg("%s(*) specified, but %s is not an aggregate function", + NameListToString(funcname), + NameListToString(funcname)), parser_errposition(pstate, location))); if (agg_distinct) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("DISTINCT specified, but %s is not an aggregate function", - NameListToString(funcname)), + errmsg("DISTINCT specified, but %s is not an aggregate function", + NameListToString(funcname)), parser_errposition(pstate, location))); if (agg_within_group) ereport(ERROR, @@ -291,14 +291,14 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, if (agg_order != NIL) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("ORDER BY specified, but %s is not an aggregate function", - NameListToString(funcname)), + errmsg("ORDER BY specified, but %s is not an aggregate function", + NameListToString(funcname)), parser_errposition(pstate, location))); if (agg_filter) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("FILTER specified, but %s is not an aggregate function", - NameListToString(funcname)), + errmsg("FILTER specified, but %s is not an aggregate function", + NameListToString(funcname)), parser_errposition(pstate, location))); if (over) ereport(ERROR, @@ -339,8 +339,8 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, if (over) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("OVER is not supported for ordered-set aggregate %s", - NameListToString(funcname)), + errmsg("OVER is not supported for ordered-set aggregate %s", + NameListToString(funcname)), parser_errposition(pstate, location))); /* gram.y rejects DISTINCT + WITHIN GROUP */ Assert(!agg_distinct); @@ -398,7 +398,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, errmsg("function %s does not exist", func_signature_string(funcname, nargs, argnames, - actual_arg_types)), + actual_arg_types)), errhint("There is an ordered-set aggregate %s, but it requires %d direct arguments, not %d.", NameListToString(funcname), catDirectArgs, numDirectArgs), @@ -421,12 +421,12 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), errmsg("function %s does not exist", - func_signature_string(funcname, nargs, - argnames, - actual_arg_types)), + func_signature_string(funcname, nargs, + argnames, + actual_arg_types)), errhint("To use the hypothetical-set aggregate %s, the number of hypothetical direct arguments (here %d) must match the number of ordering columns (here %d).", NameListToString(funcname), - nvargs - numAggregatedArgs, numAggregatedArgs), + nvargs - numAggregatedArgs, numAggregatedArgs), parser_errposition(pstate, location))); } else @@ -435,9 +435,9 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), errmsg("function %s does not exist", - func_signature_string(funcname, nargs, - argnames, - actual_arg_types)), + func_signature_string(funcname, nargs, + argnames, + actual_arg_types)), errhint("There is an ordered-set aggregate %s, but it requires at least %d direct arguments.", NameListToString(funcname), catDirectArgs), @@ -513,7 +513,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, func_signature_string(funcname, nargs, argnames, actual_arg_types)), errhint("No aggregate function matches the given name and argument types. " - "Perhaps you misplaced ORDER BY; ORDER BY must appear " + "Perhaps you misplaced ORDER BY; ORDER BY must appear " "after all regular arguments of the aggregate."), parser_errposition(pstate, location))); } @@ -523,8 +523,8 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, errmsg("function %s does not exist", func_signature_string(funcname, nargs, argnames, actual_arg_types)), - errhint("No function matches the given name and argument types. " - "You might need to add explicit type casts."), + errhint("No function matches the given name and argument types. " + "You might need to add explicit type casts."), parser_errposition(pstate, location))); } @@ -544,10 +544,10 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, if (nargsplusdefs >= FUNC_MAX_ARGS) ereport(ERROR, (errcode(ERRCODE_TOO_MANY_ARGUMENTS), - errmsg_plural("cannot pass more than %d argument to a function", - "cannot pass more than %d arguments to a function", - FUNC_MAX_ARGS, - FUNC_MAX_ARGS), + errmsg_plural("cannot pass more than %d argument to a function", + "cannot pass more than %d arguments to a function", + FUNC_MAX_ARGS, + FUNC_MAX_ARGS), parser_errposition(pstate, location))); actual_arg_types[nargsplusdefs++] = exprType(expr); @@ -601,7 +601,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, (errcode(ERRCODE_UNDEFINED_OBJECT), errmsg("could not find array type for data type %s", format_type_be(newa->element_typeid)), - parser_errposition(pstate, exprLocation((Node *) vargs)))); + parser_errposition(pstate, exprLocation((Node *) vargs)))); /* array_collid will be set by parse_collate.c */ newa->multidims = false; newa->location = exprLocation((Node *) vargs); @@ -627,7 +627,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, (errcode(ERRCODE_DATATYPE_MISMATCH), errmsg("VARIADIC argument must be an array"), parser_errposition(pstate, - exprLocation((Node *) llast(fargs))))); + exprLocation((Node *) llast(fargs))))); } /* if it returns a set, check that's OK */ @@ -731,7 +731,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, if (agg_distinct) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("DISTINCT is not implemented for window functions"), + errmsg("DISTINCT is not implemented for window functions"), parser_errposition(pstate, location))); /* @@ -918,10 +918,10 @@ func_select_candidate(int nargs, if (nargs > FUNC_MAX_ARGS) ereport(ERROR, (errcode(ERRCODE_TOO_MANY_ARGUMENTS), - errmsg_plural("cannot pass more than %d argument to a function", - "cannot pass more than %d arguments to a function", - FUNC_MAX_ARGS, - FUNC_MAX_ARGS))); + errmsg_plural("cannot pass more than %d argument to a function", + "cannot pass more than %d arguments to a function", + FUNC_MAX_ARGS, + FUNC_MAX_ARGS))); /* * If any input types are domains, reduce them to their base types. This @@ -1400,7 +1400,7 @@ func_get_detail(List *funcname, case COERCION_PATH_COERCEVIAIO: if ((sourceType == RECORDOID || ISCOMPLEX(sourceType)) && - TypeCategory(targetType) == TYPCATEGORY_STRING) + TypeCategory(targetType) == TYPCATEGORY_STRING) iscoercion = false; else iscoercion = true; @@ -2152,7 +2152,7 @@ check_srf_call_placement(ParseState *pstate, Node *last_srf, int location) (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("set-returning functions must appear at top level of FROM"), parser_errposition(pstate, - exprLocation(pstate->p_last_srf)))); + exprLocation(pstate->p_last_srf)))); break; case EXPR_KIND_WHERE: errkind = true; diff --git a/src/backend/parser/parse_node.c b/src/backend/parser/parse_node.c index f3edc6396a6..6dbad53a410 100644 --- a/src/backend/parser/parse_node.c +++ b/src/backend/parser/parse_node.c @@ -356,7 +356,7 @@ transformArraySubscripts(ParseState *pstate, ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), errmsg("array subscript must have type integer"), - parser_errposition(pstate, exprLocation(ai->lidx)))); + parser_errposition(pstate, exprLocation(ai->lidx)))); } else if (!ai->is_slice) { @@ -427,7 +427,7 @@ transformArraySubscripts(ParseState *pstate, " but expression is of type %s", format_type_be(typeneeded), format_type_be(typesource)), - errhint("You will need to rewrite or cast the expression."), + errhint("You will need to rewrite or cast the expression."), parser_errposition(pstate, exprLocation(assignFrom)))); assignFrom = newFrom; } diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c index 529d2bf3af7..e9bf50243f4 100644 --- a/src/backend/parser/parse_oper.c +++ b/src/backend/parser/parse_oper.c @@ -221,7 +221,7 @@ get_sort_group_operators(Oid argtype, (errcode(ERRCODE_UNDEFINED_FUNCTION), errmsg("could not identify an ordering operator for type %s", format_type_be(argtype)), - errhint("Use an explicit ordering operator or modify the query."))); + errhint("Use an explicit ordering operator or modify the query."))); if (needEQ && !OidIsValid(eq_opr)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), @@ -723,8 +723,8 @@ op_error(ParseState *pstate, List *op, char oprkind, (errcode(ERRCODE_UNDEFINED_FUNCTION), errmsg("operator does not exist: %s", op_signature_string(op, oprkind, arg1, arg2)), - errhint("No operator matches the given name and argument type(s). " - "You might need to add explicit type casts."), + errhint("No operator matches the given name and argument type(s). " + "You might need to add explicit type casts."), parser_errposition(pstate, location))); } @@ -894,7 +894,7 @@ make_scalar_array_op(ParseState *pstate, List *opname, if (!OidIsValid(rtypeId)) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("op ANY/ALL (array) requires array on right side"), + errmsg("op ANY/ALL (array) requires array on right side"), parser_errposition(pstate, location))); } @@ -936,12 +936,12 @@ make_scalar_array_op(ParseState *pstate, List *opname, if (rettype != BOOLOID) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("op ANY/ALL (array) requires operator to yield boolean"), + errmsg("op ANY/ALL (array) requires operator to yield boolean"), parser_errposition(pstate, location))); if (get_func_retset(opform->oprcode)) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("op ANY/ALL (array) requires operator not to return a set"), + errmsg("op ANY/ALL (array) requires operator not to return a set"), parser_errposition(pstate, location))); /* @@ -1057,7 +1057,7 @@ make_oper_cache_key(ParseState *pstate, OprCacheKey *key, List *opname, { /* get the active search path */ if (fetch_search_path_array(key->search_path, - MAX_CACHED_PATH_LEN) > MAX_CACHED_PATH_LEN) + MAX_CACHED_PATH_LEN) > MAX_CACHED_PATH_LEN) return false; /* oops, didn't fit */ } diff --git a/src/backend/parser/parse_param.c b/src/backend/parser/parse_param.c index 20fd83f095e..3e04e8c4d1d 100644 --- a/src/backend/parser/parse_param.c +++ b/src/backend/parser/parse_param.c @@ -301,8 +301,8 @@ check_parameter_resolution_walker(Node *node, ParseState *pstate) if (param->paramtype != (*parstate->paramTypes)[paramno - 1]) ereport(ERROR, (errcode(ERRCODE_AMBIGUOUS_PARAMETER), - errmsg("could not determine data type of parameter $%d", - paramno), + errmsg("could not determine data type of parameter $%d", + paramno), parser_errposition(pstate, param->location))); } return false; diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c index 84a1d79c6e5..684a50d3df6 100644 --- a/src/backend/parser/parse_relation.c +++ b/src/backend/parser/parse_relation.c @@ -443,8 +443,8 @@ check_lateral_ref_ok(ParseState *pstate, ParseNamespaceItem *nsitem, ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("invalid reference to FROM-clause entry for table \"%s\"", - refname), + errmsg("invalid reference to FROM-clause entry for table \"%s\"", + refname), (rte == pstate->p_target_rangetblentry) ? errhint("There is an entry for table \"%s\", but it cannot be referenced from this part of the query.", refname) : @@ -868,7 +868,7 @@ searchRangeTableForCol(ParseState *pstate, const char *alias, char *colname, fuzzy_rte_penalty = varstr_levenshtein_less_equal(alias, strlen(alias), rte->eref->aliasname, - strlen(rte->eref->aliasname), + strlen(rte->eref->aliasname), 1, 1, 1, MAX_FUZZY_DISTANCE + 1, true); @@ -918,7 +918,7 @@ markRTEForSelectPriv(ParseState *pstate, RangeTblEntry *rte, rte->requiredPerms |= ACL_SELECT; /* Must offset the attnum to fit in a bitmapset */ rte->selectedCols = bms_add_member(rte->selectedCols, - col - FirstLowInvalidHeapAttributeNumber); + col - FirstLowInvalidHeapAttributeNumber); } else if (rte->rtekind == RTE_JOIN) { @@ -1491,7 +1491,7 @@ addRangeTableEntryForFunction(ParseState *pstate, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("a column definition list is only allowed for functions returning \"record\""), parser_errposition(pstate, - exprLocation((Node *) coldeflist)))); + exprLocation((Node *) coldeflist)))); } else { @@ -1577,8 +1577,8 @@ addRangeTableEntryForFunction(ParseState *pstate, else ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("function \"%s\" in FROM has unsupported return type %s", - funcname, format_type_be(funcrettype)), + errmsg("function \"%s\" in FROM has unsupported return type %s", + funcname, format_type_be(funcrettype)), parser_errposition(pstate, exprLocation(funcexpr)))); /* Finish off the RangeTblFunction and add it to the RTE's list */ @@ -1688,7 +1688,7 @@ addRangeTableEntryForTableFunc(ParseState *pstate, /* fill in any unspecified alias columns */ if (numaliases < list_length(tf->colnames)) eref->colnames = list_concat(eref->colnames, - list_copy_tail(tf->colnames, numaliases)); + list_copy_tail(tf->colnames, numaliases)); rte->eref = eref; @@ -1911,8 +1911,8 @@ addRangeTableEntryForCTE(ParseState *pstate, ctequery->returningList == NIL) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("WITH query \"%s\" does not have a RETURNING clause", - cte->ctename), + errmsg("WITH query \"%s\" does not have a RETURNING clause", + cte->ctename), parser_errposition(pstate, rv->location))); } @@ -2529,7 +2529,7 @@ expandTupleDesc(TupleDesc tupdesc, Alias *eref, int count, int offset, * what type the Const claims to be. */ *colvars = lappend(*colvars, - makeNullConst(INT4OID, -1, InvalidOid)); + makeNullConst(INT4OID, -1, InvalidOid)); } } if (aliascell) @@ -2696,9 +2696,9 @@ get_rte_attribute_type(RangeTblEntry *rte, AttrNumber attnum, if (att_tup->attisdropped) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("column \"%s\" of relation \"%s\" does not exist", - NameStr(att_tup->attname), - get_rel_name(rte->relid)))); + errmsg("column \"%s\" of relation \"%s\" does not exist", + NameStr(att_tup->attname), + get_rel_name(rte->relid)))); *vartype = att_tup->atttypid; *vartypmod = att_tup->atttypmod; *varcollid = att_tup->attcollation; @@ -3185,11 +3185,11 @@ errorMissingRTE(ParseState *pstate, RangeVar *relation) if (rte) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_TABLE), - errmsg("invalid reference to FROM-clause entry for table \"%s\"", - relation->relname), + errmsg("invalid reference to FROM-clause entry for table \"%s\"", + relation->relname), (badAlias ? - errhint("Perhaps you meant to reference the table alias \"%s\".", - badAlias) : + errhint("Perhaps you meant to reference the table alias \"%s\".", + badAlias) : errhint("There is an entry for table \"%s\", but it cannot be referenced from this part of the query.", rte->eref->aliasname)), parser_errposition(pstate, relation->location))); @@ -3248,8 +3248,8 @@ errorMissingColumn(ParseState *pstate, errmsg("column %s.%s does not exist", relname, colname) : errmsg("column \"%s\" does not exist", colname), state->rfirst ? closestfirst ? - errhint("Perhaps you meant to reference the column \"%s.%s\".", - state->rfirst->eref->aliasname, closestfirst) : + errhint("Perhaps you meant to reference the column \"%s.%s\".", + state->rfirst->eref->aliasname, closestfirst) : errhint("There is a column named \"%s\" in table \"%s\", but it cannot be referenced from this part of the query.", colname, state->rfirst->eref->aliasname) : 0, parser_errposition(pstate, location))); diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c index c46c3b38a49..0a70539fb11 100644 --- a/src/backend/parser/parse_target.c +++ b/src/backend/parser/parse_target.c @@ -587,7 +587,7 @@ transformAssignedExpr(ParseState *pstate, colname, format_type_be(attrtype), 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."), parser_errposition(pstate, exprLocation(orig_expr)))); } @@ -777,7 +777,7 @@ transformAssignmentIndirection(ParseState *pstate, parser_errposition(pstate, location))); get_atttypetypmodcoll(typrelid, attnum, - &fieldTypeId, &fieldTypMod, &fieldCollation); + &fieldTypeId, &fieldTypMod, &fieldCollation); /* recurse to create appropriate RHS for field assign */ rhs = transformAssignmentIndirection(pstate, @@ -837,7 +837,7 @@ transformAssignmentIndirection(ParseState *pstate, targetName, format_type_be(targetTypeId), format_type_be(exprType(rhs))), - errhint("You will need to rewrite or cast the expression."), + errhint("You will need to rewrite or cast the expression."), parser_errposition(pstate, location))); else ereport(ERROR, @@ -847,7 +847,7 @@ transformAssignmentIndirection(ParseState *pstate, targetName, format_type_be(targetTypeId), format_type_be(exprType(rhs))), - errhint("You will need to rewrite or cast the expression."), + errhint("You will need to rewrite or cast the expression."), parser_errposition(pstate, location))); } @@ -999,9 +999,9 @@ checkInsertTargets(ParseState *pstate, List *cols, List **attrnos) if (attrno == InvalidAttrNumber) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("column \"%s\" of relation \"%s\" does not exist", - name, - RelationGetRelationName(pstate->p_target_relation)), + errmsg("column \"%s\" of relation \"%s\" does not exist", + name, + RelationGetRelationName(pstate->p_target_relation)), parser_errposition(pstate, col->location))); /* diff --git a/src/backend/parser/parse_type.c b/src/backend/parser/parse_type.c index b71b17bd2a6..d0b3fbeb57b 100644 --- a/src/backend/parser/parse_type.c +++ b/src/backend/parser/parse_type.c @@ -80,8 +80,8 @@ LookupTypeName(ParseState *pstate, const TypeName *typeName, case 1: ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("improper %%TYPE reference (too few dotted names): %s", - NameListToString(typeName->names)), + errmsg("improper %%TYPE reference (too few dotted names): %s", + NameListToString(typeName->names)), parser_errposition(pstate, typeName->location))); break; case 2: @@ -124,8 +124,8 @@ LookupTypeName(ParseState *pstate, const TypeName *typeName, else ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("column \"%s\" of relation \"%s\" does not exist", - field, rel->relname), + errmsg("column \"%s\" of relation \"%s\" does not exist", + field, rel->relname), parser_errposition(pstate, typeName->location))); } else @@ -334,8 +334,8 @@ typenameTypeMod(ParseState *pstate, const TypeName *typeName, Type typ) if (!((Form_pg_type) GETSTRUCT(typ))->typisdefined) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("type modifier cannot be specified for shell type \"%s\"", - TypeNameToString(typeName)), + errmsg("type modifier cannot be specified for shell type \"%s\"", + TypeNameToString(typeName)), parser_errposition(pstate, typeName->location))); typmodin = ((Form_pg_type) GETSTRUCT(typ))->typmodin; @@ -385,7 +385,7 @@ typenameTypeMod(ParseState *pstate, const TypeName *typeName, Type typ) if (!cstr) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("type modifiers must be simple constants or identifiers"), + errmsg("type modifiers must be simple constants or identifiers"), parser_errposition(pstate, typeName->location))); datums[n++] = CStringGetDatum(cstr); } diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 30e7caeb625..ee5f3a3a52c 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -136,7 +136,7 @@ static void transformColumnType(CreateStmtContext *cxt, ColumnDef *column); static void setSchemaName(char *context_schema, char **stmt_schema_name); static void transformPartitionCmd(CreateStmtContext *cxt, PartitionCmd *cmd); static Const *transformPartitionBoundValue(ParseState *pstate, A_Const *con, - const char *colName, Oid colType, int32 colTypmod); + const char *colName, Oid colType, int32 colTypmod); /* @@ -261,7 +261,7 @@ transformCreateStmt(CreateStmt *stmt, const char *queryString) if (stmt->inhRelations && !stmt->partbound) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("cannot create partitioned table as inheritance child"))); + errmsg("cannot create partitioned table as inheritance child"))); } /* @@ -452,7 +452,7 @@ generateSerialExtraStmts(CreateStmtContext *cxt, ColumnDef *column, */ if (seqtypid) seqstmt->options = lcons(makeDefElem("as", - (Node *) makeTypeNameFromOid(seqtypid, -1), + (Node *) makeTypeNameFromOid(seqtypid, -1), -1), seqstmt->options); @@ -668,12 +668,12 @@ transformColumnDefinition(CreateStmtContext *cxt, ColumnDef *column) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("multiple identity specifications for column \"%s\" of table \"%s\"", - column->colname, cxt->relation->relname), + column->colname, cxt->relation->relname), parser_errposition(cxt->pstate, constraint->location))); generateSerialExtraStmts(cxt, column, - typeOid, constraint->options, true, + typeOid, constraint->options, true, NULL, NULL); column->identity = constraint->generated_when; @@ -915,7 +915,7 @@ transformTableLikeClause(CreateStmtContext *cxt, TableLikeClause *table_like_cla if (cxt->isforeign) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("LIKE is not supported for creating foreign tables"))); + errmsg("LIKE is not supported for creating foreign tables"))); relation = relation_openrv(table_like_clause->relation, AccessShareLock); @@ -1076,7 +1076,7 @@ transformTableLikeClause(CreateStmtContext *cxt, TableLikeClause *table_like_cla stmt->objtype = OBJECT_COLUMN; stmt->object = (Node *) list_make3(makeString(cxt->relation->schemaname), - makeString(cxt->relation->relname), + makeString(cxt->relation->relname), makeString(def->colname)); stmt->comment = comment; @@ -1133,7 +1133,7 @@ transformTableLikeClause(CreateStmtContext *cxt, TableLikeClause *table_like_cla /* Copy comment on constraint */ if ((table_like_clause->options & CREATE_TABLE_LIKE_COMMENTS) && (comment = GetComment(get_relation_constraint_oid(RelationGetRelid(relation), - n->conname, false), + n->conname, false), ConstraintRelationId, 0)) != NULL) { @@ -1141,7 +1141,7 @@ transformTableLikeClause(CreateStmtContext *cxt, TableLikeClause *table_like_cla stmt->objtype = OBJECT_TABCONSTRAINT; stmt->object = (Node *) list_make3(makeString(cxt->relation->schemaname), - makeString(cxt->relation->relname), + makeString(cxt->relation->relname), makeString(n->conname)); stmt->comment = comment; @@ -1546,8 +1546,8 @@ generateClonedIndexStmt(CreateStmtContext *cxt, Relation source_idx, ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("cannot convert whole-row table reference"), - errdetail("Index \"%s\" contains a whole-row table reference.", - RelationGetRelationName(source_idx)))); + errdetail("Index \"%s\" contains a whole-row table reference.", + RelationGetRelationName(source_idx)))); index->whereClause = pred_tree; } @@ -1753,8 +1753,8 @@ transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt) if (cxt->pkey != NULL) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("multiple primary keys for table \"%s\" are not allowed", - cxt->relation->relname), + errmsg("multiple primary keys for table \"%s\" are not allowed", + cxt->relation->relname), parser_errposition(cxt->pstate, constraint->location))); cxt->pkey = index; @@ -1835,8 +1835,8 @@ transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt) if (OidIsValid(get_index_constraint(index_oid))) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("index \"%s\" is already associated with a constraint", - index_name), + errmsg("index \"%s\" is already associated with a constraint", + index_name), parser_errposition(cxt->pstate, constraint->location))); /* Perform validity checks on the index */ @@ -1924,7 +1924,7 @@ transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt) } else attform = SystemAttributeDefinition(attnum, - heap_rel->rd_rel->relhasoids); + heap_rel->rd_rel->relhasoids); attname = pstrdup(NameStr(attform->attname)); /* @@ -1942,7 +1942,7 @@ transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt) (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg("index \"%s\" does not have default sorting behavior", index_name), errdetail("Cannot create a primary key or unique constraint using such an index."), - parser_errposition(cxt->pstate, constraint->location))); + parser_errposition(cxt->pstate, constraint->location))); constraint->keys = lappend(constraint->keys, makeString(attname)); } @@ -2086,13 +2086,13 @@ transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt) (errcode(ERRCODE_DUPLICATE_COLUMN), errmsg("column \"%s\" appears twice in primary key constraint", key), - parser_errposition(cxt->pstate, constraint->location))); + parser_errposition(cxt->pstate, constraint->location))); else ereport(ERROR, (errcode(ERRCODE_DUPLICATE_COLUMN), - errmsg("column \"%s\" appears twice in unique constraint", - key), - parser_errposition(cxt->pstate, constraint->location))); + errmsg("column \"%s\" appears twice in unique constraint", + key), + parser_errposition(cxt->pstate, constraint->location))); } } @@ -2396,7 +2396,7 @@ transformRuleStmt(RuleStmt *stmt, const char *queryString, /* take care of the where clause */ *whereClause = transformWhereClause(pstate, - (Node *) copyObject(stmt->whereClause), + (Node *) copyObject(stmt->whereClause), EXPR_KIND_WHERE, "WHERE"); /* we have to fix its collations too */ @@ -2787,7 +2787,7 @@ transformAlterTableStmt(Oid relid, AlterTableStmt *stmt, AlterSeqStmt *altseqstmt = makeNode(AlterSeqStmt); altseqstmt->sequence = makeRangeVar(get_namespace_name(get_rel_namespace(seq_relid)), - get_rel_name(seq_relid), + get_rel_name(seq_relid), -1); altseqstmt->options = list_make1(makeDefElem("as", (Node *) makeTypeNameFromOid(typeOid, -1), -1)); altseqstmt->for_identity = true; @@ -2863,7 +2863,7 @@ transformAlterTableStmt(Oid relid, AlterTableStmt *stmt, seqstmt = makeNode(AlterSeqStmt); seq_relid = linitial_oid(seqlist); seqstmt->sequence = makeRangeVar(get_namespace_name(get_rel_namespace(seq_relid)), - get_rel_name(seq_relid), -1); + get_rel_name(seq_relid), -1); seqstmt->options = newseqopts; seqstmt->for_identity = true; seqstmt->missing_ok = false; @@ -3313,8 +3313,8 @@ transformPartitionBound(ParseState *pstate, Relation parent, if (spec->strategy != PARTITION_STRATEGY_LIST) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("invalid bound specification for a list partition"), - parser_errposition(pstate, exprLocation((Node *) spec)))); + errmsg("invalid bound specification for a list partition"), + parser_errposition(pstate, exprLocation((Node *) spec)))); /* Get the only column's name in case we need to output an error */ if (key->partattrs[0] != 0) @@ -3322,8 +3322,8 @@ transformPartitionBound(ParseState *pstate, Relation parent, key->partattrs[0]); else colname = deparse_expression((Node *) linitial(partexprs), - deparse_context_for(RelationGetRelationName(parent), - RelationGetRelid(parent)), + deparse_context_for(RelationGetRelationName(parent), + RelationGetRelid(parent)), false, false); /* Need its type data too */ coltype = get_partition_col_typid(key, 0); @@ -3370,8 +3370,8 @@ transformPartitionBound(ParseState *pstate, Relation parent, if (spec->strategy != PARTITION_STRATEGY_RANGE) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("invalid bound specification for a range partition"), - parser_errposition(pstate, exprLocation((Node *) spec)))); + errmsg("invalid bound specification for a range partition"), + parser_errposition(pstate, exprLocation((Node *) spec)))); if (list_length(spec->lowerdatums) != partnatts) ereport(ERROR, @@ -3397,8 +3397,8 @@ transformPartitionBound(ParseState *pstate, Relation parent, else if (seen_unbounded) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("cannot specify finite value after UNBOUNDED"), - parser_errposition(pstate, exprLocation((Node *) ldatum)))); + errmsg("cannot specify finite value after UNBOUNDED"), + parser_errposition(pstate, exprLocation((Node *) ldatum)))); } seen_unbounded = false; foreach(cell1, spec->upperdatums) @@ -3411,8 +3411,8 @@ transformPartitionBound(ParseState *pstate, Relation parent, else if (seen_unbounded) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("cannot specify finite value after UNBOUNDED"), - parser_errposition(pstate, exprLocation((Node *) rdatum)))); + errmsg("cannot specify finite value after UNBOUNDED"), + parser_errposition(pstate, exprLocation((Node *) rdatum)))); } /* Transform all the constants */ @@ -3435,8 +3435,8 @@ transformPartitionBound(ParseState *pstate, Relation parent, else { colname = deparse_expression((Node *) list_nth(partexprs, j), - deparse_context_for(RelationGetRelationName(parent), - RelationGetRelid(parent)), + deparse_context_for(RelationGetRelationName(parent), + RelationGetRelid(parent)), false, false); ++j; } @@ -3491,7 +3491,7 @@ transformPartitionBound(ParseState *pstate, Relation parent, */ static Const * transformPartitionBoundValue(ParseState *pstate, A_Const *con, - const char *colName, Oid colType, int32 colTypmod) + const char *colName, Oid colType, int32 colTypmod) { Node *value; @@ -3510,8 +3510,8 @@ transformPartitionBoundValue(ParseState *pstate, A_Const *con, if (value == NULL) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("specified value cannot be cast to type %s for column \"%s\"", - format_type_be(colType), colName), + errmsg("specified value cannot be cast to type %s for column \"%s\"", + format_type_be(colType), colName), parser_errposition(pstate, con->location))); /* Simplify the expression, in case we had a coercion */ @@ -3522,8 +3522,8 @@ transformPartitionBoundValue(ParseState *pstate, A_Const *con, if (!IsA(value, Const)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("specified value cannot be cast to type %s for column \"%s\"", - format_type_be(colType), colName), + errmsg("specified value cannot be cast to type %s for column \"%s\"", + format_type_be(colType), colName), errdetail("The cast requires a non-immutable conversion."), errhint("Try putting the literal value in single quotes."), parser_errposition(pstate, con->location))); diff --git a/src/backend/port/dynloader/hpux.c b/src/backend/port/dynloader/hpux.c index c7f93d2d4a2..5a0e40146d8 100644 --- a/src/backend/port/dynloader/hpux.c +++ b/src/backend/port/dynloader/hpux.c @@ -34,7 +34,7 @@ pg_dlopen(char *filename) * call the library! */ shl_t handle = shl_load(filename, - BIND_IMMEDIATE | BIND_VERBOSE | DYNAMIC_PATH, + BIND_IMMEDIATE | BIND_VERBOSE | DYNAMIC_PATH, 0L); return (void *) handle; diff --git a/src/backend/port/sysv_sema.c b/src/backend/port/sysv_sema.c index a68b1f4aea8..d4202feb567 100644 --- a/src/backend/port/sysv_sema.c +++ b/src/backend/port/sysv_sema.c @@ -126,12 +126,12 @@ InternalIpcSemaphoreCreate(IpcSemaphoreKey semKey, int numSems) IPC_CREAT | IPC_EXCL | IPCProtection), (saved_errno == ENOSPC) ? errhint("This error does *not* mean that you have run out of disk space. " - "It occurs when either the system limit for the maximum number of " - "semaphore sets (SEMMNI), or the system wide maximum number of " - "semaphores (SEMMNS), would be exceeded. You need to raise the " - "respective kernel parameter. Alternatively, reduce PostgreSQL's " + "It occurs when either the system limit for the maximum number of " + "semaphore sets (SEMMNI), or the system wide maximum number of " + "semaphores (SEMMNS), would be exceeded. You need to raise the " + "respective kernel parameter. Alternatively, reduce PostgreSQL's " "consumption of semaphores by reducing its max_connections parameter.\n" - "The PostgreSQL documentation contains more information about " + "The PostgreSQL documentation contains more information about " "configuring your system for PostgreSQL.") : 0)); } @@ -156,7 +156,7 @@ IpcSemaphoreInitialize(IpcSemaphoreId semId, int semNum, int value) semId, semNum, value), (saved_errno == ERANGE) ? errhint("You possibly need to raise your kernel's SEMVMX value to be at least " - "%d. Look into the PostgreSQL documentation for details.", + "%d. Look into the PostgreSQL documentation for details.", value) : 0)); } } diff --git a/src/backend/port/sysv_shmem.c b/src/backend/port/sysv_shmem.c index 042635afbd8..273d1313b00 100644 --- a/src/backend/port/sysv_shmem.c +++ b/src/backend/port/sysv_shmem.c @@ -193,29 +193,29 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, Size size) errno = shmget_errno; ereport(FATAL, (errmsg("could not create shared memory segment: %m"), - errdetail("Failed system call was shmget(key=%lu, size=%zu, 0%o).", - (unsigned long) memKey, size, - IPC_CREAT | IPC_EXCL | IPCProtection), + errdetail("Failed system call was shmget(key=%lu, size=%zu, 0%o).", + (unsigned long) memKey, size, + IPC_CREAT | IPC_EXCL | IPCProtection), (shmget_errno == EINVAL) ? errhint("This error usually means that PostgreSQL's request for a shared memory " - "segment exceeded your kernel's SHMMAX parameter, or possibly that " + "segment exceeded your kernel's SHMMAX parameter, or possibly that " "it is less than " "your kernel's SHMMIN parameter.\n" - "The PostgreSQL documentation contains more information about shared " + "The PostgreSQL documentation contains more information about shared " "memory configuration.") : 0, (shmget_errno == ENOMEM) ? errhint("This error usually means that PostgreSQL's request for a shared " "memory segment exceeded your kernel's SHMALL parameter. You might need " "to reconfigure the kernel with larger SHMALL.\n" - "The PostgreSQL documentation contains more information about shared " + "The PostgreSQL documentation contains more information about shared " "memory configuration.") : 0, (shmget_errno == ENOSPC) ? errhint("This error does *not* mean that you have run out of disk space. " "It occurs either if all available shared memory IDs have been taken, " "in which case you need to raise the SHMMNI parameter in your kernel, " - "or because the system's overall limit for shared memory has been " + "or because the system's overall limit for shared memory has been " "reached.\n" - "The PostgreSQL documentation contains more information about shared " + "The PostgreSQL documentation contains more information about shared " "memory configuration.") : 0)); } @@ -504,10 +504,10 @@ CreateAnonymousSegment(Size *size) (errmsg("could not map anonymous shared memory: %m"), (mmap_errno == ENOMEM) ? errhint("This error usually means that PostgreSQL's request " - "for a shared memory segment exceeded available memory, " - "swap space, or huge pages. To reduce the request size " + "for a shared memory segment exceeded available memory, " + "swap space, or huge pages. To reduce the request size " "(currently %zu bytes), reduce PostgreSQL's shared " - "memory usage, perhaps by reducing shared_buffers or " + "memory usage, perhaps by reducing shared_buffers or " "max_connections.", *size) : 0)); } diff --git a/src/backend/port/win32/crashdump.c b/src/backend/port/win32/crashdump.c index c97cb9181e6..f06dfd19878 100644 --- a/src/backend/port/win32/crashdump.c +++ b/src/backend/port/win32/crashdump.c @@ -71,9 +71,9 @@ */ typedef BOOL (WINAPI * MINIDUMPWRITEDUMP) (HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType, - CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, - CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, - CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam + CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, + CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, + CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam ); diff --git a/src/backend/port/win32/mingwcompat.c b/src/backend/port/win32/mingwcompat.c index ca63c6ee277..e02b41711e8 100644 --- a/src/backend/port/win32/mingwcompat.c +++ b/src/backend/port/win32/mingwcompat.c @@ -42,8 +42,8 @@ LoadKernel32() kernel32 = LoadLibraryEx("kernel32.dll", NULL, 0); if (kernel32 == NULL) ereport(FATAL, - (errmsg_internal("could not load kernel32.dll: error code %lu", - GetLastError()))); + (errmsg_internal("could not load kernel32.dll: error code %lu", + GetLastError()))); } diff --git a/src/backend/port/win32/signal.c b/src/backend/port/win32/signal.c index ebbd434b9a8..0fd993e3f32 100644 --- a/src/backend/port/win32/signal.c +++ b/src/backend/port/win32/signal.c @@ -186,7 +186,7 @@ pgwin32_create_signal_listener(pid_t pid) snprintf(pipename, sizeof(pipename), "\\\\.\\pipe\\pgsignal_%u", (int) pid); pipe = CreateNamedPipe(pipename, PIPE_ACCESS_DUPLEX, - PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, + PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, 16, 16, 1000, NULL); if (pipe == INVALID_HANDLE_VALUE) @@ -266,8 +266,8 @@ pg_signal_thread(LPVOID param) if (pipe == INVALID_HANDLE_VALUE) { pipe = CreateNamedPipe(pipename, PIPE_ACCESS_DUPLEX, - PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, - PIPE_UNLIMITED_INSTANCES, 16, 16, 1000, NULL); + PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, + PIPE_UNLIMITED_INSTANCES, 16, 16, 1000, NULL); if (pipe == INVALID_HANDLE_VALUE) { @@ -293,8 +293,8 @@ pg_signal_thread(LPVOID param) * window of time where we will miss incoming requests. */ newpipe = CreateNamedPipe(pipename, PIPE_ACCESS_DUPLEX, - PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, - PIPE_UNLIMITED_INSTANCES, 16, 16, 1000, NULL); + PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, + PIPE_UNLIMITED_INSTANCES, 16, 16, 1000, NULL); if (newpipe == INVALID_HANDLE_VALUE) { /* @@ -311,7 +311,7 @@ pg_signal_thread(LPVOID param) */ } hThread = CreateThread(NULL, 0, - (LPTHREAD_START_ROUTINE) pg_signal_dispatch_thread, + (LPTHREAD_START_ROUTINE) pg_signal_dispatch_thread, (LPVOID) pipe, 0, NULL); if (hThread == INVALID_HANDLE_VALUE) write_stderr("could not create signal dispatch thread: error code %lu\n", diff --git a/src/backend/port/win32/socket.c b/src/backend/port/win32/socket.c index 535b9a0c67c..ba8b863d820 100644 --- a/src/backend/port/win32/socket.c +++ b/src/backend/port/win32/socket.c @@ -426,7 +426,7 @@ pgwin32_recv(SOCKET s, char *buf, int len, int f) pg_usleep(10000); } ereport(NOTICE, - (errmsg_internal("could not read from ready socket (after retries)"))); + (errmsg_internal("could not read from ready socket (after retries)"))); errno = EWOULDBLOCK; return -1; } diff --git a/src/backend/port/win32/timer.c b/src/backend/port/win32/timer.c index f1aa0f3a169..f0a45f4339e 100644 --- a/src/backend/port/win32/timer.c +++ b/src/backend/port/win32/timer.c @@ -95,8 +95,8 @@ setitimer(int which, const struct itimerval *value, struct itimerval *ovalue) timerCommArea.event = CreateEvent(NULL, TRUE, FALSE, NULL); if (timerCommArea.event == NULL) ereport(FATAL, - (errmsg_internal("could not create timer event: error code %lu", - GetLastError()))); + (errmsg_internal("could not create timer event: error code %lu", + GetLastError()))); MemSet(&timerCommArea.value, 0, sizeof(struct itimerval)); @@ -105,8 +105,8 @@ setitimer(int which, const struct itimerval *value, struct itimerval *ovalue) timerThreadHandle = CreateThread(NULL, 0, pg_timer_thread, NULL, 0, NULL); if (timerThreadHandle == INVALID_HANDLE_VALUE) ereport(FATAL, - (errmsg_internal("could not create timer thread: error code %lu", - GetLastError()))); + (errmsg_internal("could not create timer thread: error code %lu", + GetLastError()))); } /* Request the timer thread to change settings */ diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c index e62c6ad2ede..d75feda481d 100644 --- a/src/backend/postmaster/autovacuum.c +++ b/src/backend/postmaster/autovacuum.c @@ -413,7 +413,7 @@ StartAutoVacLauncher(void) { case -1: ereport(LOG, - (errmsg("could not fork autovacuum launcher process: %m"))); + (errmsg("could not fork autovacuum launcher process: %m"))); return 0; #ifndef EXEC_BACKEND @@ -1803,9 +1803,9 @@ autovac_balance_cost(void) * zero is not a valid value. */ int vac_cost_limit = (autovacuum_vac_cost_limit > 0 ? - autovacuum_vac_cost_limit : VacuumCostLimit); + autovacuum_vac_cost_limit : VacuumCostLimit); int vac_cost_delay = (autovacuum_vac_cost_delay >= 0 ? - autovacuum_vac_cost_delay : VacuumCostDelay); + autovacuum_vac_cost_delay : VacuumCostDelay); double cost_total; double cost_avail; dlist_iter iter; @@ -2674,7 +2674,7 @@ perform_work_item(AutoVacuumWorkItem *workitem) case AVW_BRINSummarizeRange: DirectFunctionCall2(brin_summarize_range, ObjectIdGetDatum(workitem->avw_relation), - Int64GetDatum((int64) workitem->avw_blockNumber)); + Int64GetDatum((int64) workitem->avw_blockNumber)); break; default: elog(WARNING, "unrecognized work item found: type %d", diff --git a/src/backend/postmaster/bgworker.c b/src/backend/postmaster/bgworker.c index 227e66b4ba8..28af6f0f07d 100644 --- a/src/backend/postmaster/bgworker.c +++ b/src/backend/postmaster/bgworker.c @@ -853,7 +853,7 @@ RegisterBackgroundWorker(BackgroundWorker *worker) if (!IsUnderPostmaster) ereport(DEBUG1, - (errmsg("registering background worker \"%s\"", worker->bgw_name))); + (errmsg("registering background worker \"%s\"", worker->bgw_name))); if (!process_shared_preload_libraries_in_progress && strcmp(worker->bgw_library_name, "postgres") != 0) diff --git a/src/backend/postmaster/checkpointer.c b/src/backend/postmaster/checkpointer.c index f37f5d5c44f..e48ebd557ff 100644 --- a/src/backend/postmaster/checkpointer.c +++ b/src/backend/postmaster/checkpointer.c @@ -462,7 +462,7 @@ CheckpointerMain(void) elapsed_secs < CheckPointWarning) ereport(LOG, (errmsg_plural("checkpoints are occurring too frequently (%d second apart)", - "checkpoints are occurring too frequently (%d seconds apart)", + "checkpoints are occurring too frequently (%d seconds apart)", elapsed_secs, elapsed_secs), errhint("Consider increasing the configuration parameter \"max_wal_size\"."))); @@ -1280,8 +1280,8 @@ CompactCheckpointerRequestQueue(void) CheckpointerShmem->requests[preserve_count++] = CheckpointerShmem->requests[n]; } ereport(DEBUG1, - (errmsg("compacted fsync request queue from %d entries to %d entries", - CheckpointerShmem->num_requests, preserve_count))); + (errmsg("compacted fsync request queue from %d entries to %d entries", + CheckpointerShmem->num_requests, preserve_count))); CheckpointerShmem->num_requests = preserve_count; /* Cleanup. */ diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c index 00afce41045..ddf9d698e04 100644 --- a/src/backend/postmaster/pgarch.c +++ b/src/backend/postmaster/pgarch.c @@ -388,7 +388,7 @@ pgarch_MainLoop(void) int rc; rc = WaitLatch(MyLatch, - WL_LATCH_SET | WL_TIMEOUT | WL_POSTMASTER_DEATH, + WL_LATCH_SET | WL_TIMEOUT | WL_POSTMASTER_DEATH, timeout * 1000L, WAIT_EVENT_ARCHIVER_MAIN); if (rc & WL_TIMEOUT) @@ -593,16 +593,16 @@ pgarch_archiveXlog(char *xlog) { #if defined(WIN32) ereport(lev, - (errmsg("archive command was terminated by exception 0x%X", - WTERMSIG(rc)), - errhint("See C include file \"ntstatus.h\" for a description of the hexadecimal value."), - errdetail("The failed archive command was: %s", - xlogarchcmd))); + (errmsg("archive command was terminated by exception 0x%X", + WTERMSIG(rc)), + errhint("See C include file \"ntstatus.h\" for a description of the hexadecimal value."), + errdetail("The failed archive command was: %s", + xlogarchcmd))); #elif defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST ereport(lev, (errmsg("archive command was terminated by signal %d: %s", WTERMSIG(rc), - WTERMSIG(rc) < NSIG ? sys_siglist[WTERMSIG(rc)] : "(unknown)"), + WTERMSIG(rc) < NSIG ? sys_siglist[WTERMSIG(rc)] : "(unknown)"), errdetail("The failed archive command was: %s", xlogarchcmd))); #else @@ -616,10 +616,10 @@ pgarch_archiveXlog(char *xlog) else { ereport(lev, - (errmsg("archive command exited with unrecognized status %d", - rc), - errdetail("The failed archive command was: %s", - xlogarchcmd))); + (errmsg("archive command exited with unrecognized status %d", + rc), + errdetail("The failed archive command was: %s", + xlogarchcmd))); } snprintf(activitymsg, sizeof(activitymsg), "failed on %s", xlog); diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index 68c1ee24634..65b7b328f1f 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -375,7 +375,7 @@ pgstat_init(void) * compile-time cross-check that we didn't. */ StaticAssertStmt(sizeof(PgStat_Msg) <= PGSTAT_MAX_MSG_SIZE, - "maximum stats message size exceeds PGSTAT_MAX_MSG_SIZE"); + "maximum stats message size exceeds PGSTAT_MAX_MSG_SIZE"); /* * Create the UDP socket for sending and receiving statistic messages @@ -415,7 +415,7 @@ pgstat_init(void) if (++tries > 1) ereport(LOG, - (errmsg("trying another address for the statistics collector"))); + (errmsg("trying another address for the statistics collector"))); /* * Create the socket. @@ -424,7 +424,7 @@ pgstat_init(void) { ereport(LOG, (errcode_for_socket_access(), - errmsg("could not create socket for statistics collector: %m"))); + errmsg("could not create socket for statistics collector: %m"))); continue; } @@ -436,7 +436,7 @@ pgstat_init(void) { ereport(LOG, (errcode_for_socket_access(), - errmsg("could not bind socket for statistics collector: %m"))); + errmsg("could not bind socket for statistics collector: %m"))); closesocket(pgStatSock); pgStatSock = PGINVALID_SOCKET; continue; @@ -463,7 +463,7 @@ pgstat_init(void) { ereport(LOG, (errcode_for_socket_access(), - errmsg("could not connect socket for statistics collector: %m"))); + errmsg("could not connect socket for statistics collector: %m"))); closesocket(pgStatSock); pgStatSock = PGINVALID_SOCKET; continue; @@ -612,7 +612,7 @@ retry2: startup_failed: ereport(LOG, - (errmsg("disabling statistics collector for lack of working socket"))); + (errmsg("disabling statistics collector for lack of working socket"))); if (addrs) pg_freeaddrinfo_all(hints.ai_family, addrs); @@ -2615,11 +2615,11 @@ BackendStatusShmemSize(void) mul_size(NAMEDATALEN, NumBackendStatSlots)); /* BackendActivityBuffer: */ size = add_size(size, - mul_size(pgstat_track_activity_query_size, NumBackendStatSlots)); + mul_size(pgstat_track_activity_query_size, NumBackendStatSlots)); #ifdef USE_SSL /* BackendSslStatusBuffer: */ size = add_size(size, - mul_size(sizeof(PgBackendSSLStatus), NumBackendStatSlots)); + mul_size(sizeof(PgBackendSSLStatus), NumBackendStatSlots)); #endif return size; } @@ -3234,13 +3234,13 @@ pgstat_read_current_status(void) localtable = (LocalPgBackendStatus *) MemoryContextAlloc(pgStatLocalContext, - sizeof(LocalPgBackendStatus) * NumBackendStatSlots); + sizeof(LocalPgBackendStatus) * NumBackendStatSlots); localappname = (char *) MemoryContextAlloc(pgStatLocalContext, NAMEDATALEN * NumBackendStatSlots); localactivity = (char *) MemoryContextAlloc(pgStatLocalContext, - pgstat_track_activity_query_size * NumBackendStatSlots); + pgstat_track_activity_query_size * NumBackendStatSlots); #ifdef USE_SSL localsslstatus = (PgBackendSSLStatus *) MemoryContextAlloc(pgStatLocalContext, @@ -4330,13 +4330,13 @@ PgstatCollectorMain(int argc, char *argv[]) case PGSTAT_MTYPE_RESETSHAREDCOUNTER: pgstat_recv_resetsharedcounter( - (PgStat_MsgResetsharedcounter *) &msg, + (PgStat_MsgResetsharedcounter *) &msg, len); break; case PGSTAT_MTYPE_RESETSINGLECOUNTER: pgstat_recv_resetsinglecounter( - (PgStat_MsgResetsinglecounter *) &msg, + (PgStat_MsgResetsinglecounter *) &msg, len); break; @@ -4388,7 +4388,7 @@ PgstatCollectorMain(int argc, char *argv[]) /* Sleep until there's something to do */ #ifndef WIN32 wr = WaitLatchOrSocket(MyLatch, - WL_LATCH_SET | WL_POSTMASTER_DEATH | WL_SOCKET_READABLE, + WL_LATCH_SET | WL_POSTMASTER_DEATH | WL_SOCKET_READABLE, pgStatSock, -1L, WAIT_EVENT_PGSTAT_MAIN); #else @@ -4404,7 +4404,7 @@ PgstatCollectorMain(int argc, char *argv[]) * backend_read_statsfile. */ wr = WaitLatchOrSocket(MyLatch, - WL_LATCH_SET | WL_POSTMASTER_DEATH | WL_SOCKET_READABLE | WL_TIMEOUT, + WL_LATCH_SET | WL_POSTMASTER_DEATH | WL_SOCKET_READABLE | WL_TIMEOUT, pgStatSock, 2 * 1000L /* msec */ , WAIT_EVENT_PGSTAT_MAIN); @@ -4683,8 +4683,8 @@ pgstat_write_statsfiles(bool permanent, bool allDbs) { ereport(LOG, (errcode_for_file_access(), - errmsg("could not write temporary statistics file \"%s\": %m", - tmpfile))); + errmsg("could not write temporary statistics file \"%s\": %m", + tmpfile))); FreeFile(fpout); unlink(tmpfile); } @@ -4692,8 +4692,8 @@ pgstat_write_statsfiles(bool permanent, bool allDbs) { ereport(LOG, (errcode_for_file_access(), - errmsg("could not close temporary statistics file \"%s\": %m", - tmpfile))); + errmsg("could not close temporary statistics file \"%s\": %m", + tmpfile))); unlink(tmpfile); } else if (rename(tmpfile, statfile) < 0) @@ -4818,8 +4818,8 @@ pgstat_write_db_statsfile(PgStat_StatDBEntry *dbentry, bool permanent) { ereport(LOG, (errcode_for_file_access(), - errmsg("could not write temporary statistics file \"%s\": %m", - tmpfile))); + errmsg("could not write temporary statistics file \"%s\": %m", + tmpfile))); FreeFile(fpout); unlink(tmpfile); } @@ -4827,8 +4827,8 @@ pgstat_write_db_statsfile(PgStat_StatDBEntry *dbentry, bool permanent) { ereport(LOG, (errcode_for_file_access(), - errmsg("could not close temporary statistics file \"%s\": %m", - tmpfile))); + errmsg("could not close temporary statistics file \"%s\": %m", + tmpfile))); unlink(tmpfile); } else if (rename(tmpfile, statfile) < 0) @@ -4986,7 +4986,7 @@ pgstat_read_statsfiles(Oid onlydb, bool permanent, bool deep) * Add to the DB hash */ dbentry = (PgStat_StatDBEntry *) hash_search(dbhash, - (void *) &dbbuf.databaseid, + (void *) &dbbuf.databaseid, HASH_ENTER, &found); if (found) @@ -5019,7 +5019,7 @@ pgstat_read_statsfiles(Oid onlydb, bool permanent, bool deep) dbentry->tables = hash_create("Per-database table", PGSTAT_TAB_HASH_SIZE, &hash_ctl, - HASH_ELEM | HASH_BLOBS | HASH_CONTEXT); + HASH_ELEM | HASH_BLOBS | HASH_CONTEXT); hash_ctl.keysize = sizeof(Oid); hash_ctl.entrysize = sizeof(PgStat_StatFuncEntry); @@ -5027,7 +5027,7 @@ pgstat_read_statsfiles(Oid onlydb, bool permanent, bool deep) dbentry->functions = hash_create("Per-database function", PGSTAT_FUNCTION_HASH_SIZE, &hash_ctl, - HASH_ELEM | HASH_BLOBS | HASH_CONTEXT); + HASH_ELEM | HASH_BLOBS | HASH_CONTEXT); /* * If requested, read the data from the database-specific @@ -5153,8 +5153,8 @@ pgstat_read_db_statsfile(Oid databaseid, HTAB *tabhash, HTAB *funchash, break; tabentry = (PgStat_StatTabEntry *) hash_search(tabhash, - (void *) &tabbuf.tableid, - HASH_ENTER, &found); + (void *) &tabbuf.tableid, + HASH_ENTER, &found); if (found) { @@ -5187,8 +5187,8 @@ pgstat_read_db_statsfile(Oid databaseid, HTAB *tabhash, HTAB *funchash, break; funcentry = (PgStat_StatFuncEntry *) hash_search(funchash, - (void *) &funcbuf.functionid, - HASH_ENTER, &found); + (void *) &funcbuf.functionid, + HASH_ENTER, &found); if (found) { @@ -5655,7 +5655,7 @@ pgstat_recv_tabstat(PgStat_MsgTabstat *msg, int len) PgStat_TableEntry *tabmsg = &(msg->m_entry[i]); tabentry = (PgStat_StatTabEntry *) hash_search(dbentry->tables, - (void *) &(tabmsg->t_id), + (void *) &(tabmsg->t_id), HASH_ENTER, &found); if (!found) @@ -6140,7 +6140,7 @@ pgstat_recv_funcstat(PgStat_MsgFuncstat *msg, int len) for (i = 0; i < msg->m_nentries; i++, funcmsg++) { funcentry = (PgStat_StatFuncEntry *) hash_search(dbentry->functions, - (void *) &(funcmsg->f_id), + (void *) &(funcmsg->f_id), HASH_ENTER, &found); if (!found) diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 3c5eee0fbc7..83e99b7ec6f 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -918,15 +918,15 @@ PostmasterMain(int argc, char *argv[]) char **p; ereport(DEBUG3, - (errmsg_internal("%s: PostmasterMain: initial environment dump:", - progname))); + (errmsg_internal("%s: PostmasterMain: initial environment dump:", + progname))); ereport(DEBUG3, - (errmsg_internal("-----------------------------------------"))); + (errmsg_internal("-----------------------------------------"))); for (p = environ; *p; ++p) ereport(DEBUG3, (errmsg_internal("\t%s", *p))); ereport(DEBUG3, - (errmsg_internal("-----------------------------------------"))); + (errmsg_internal("-----------------------------------------"))); } /* @@ -1180,7 +1180,7 @@ PostmasterMain(int argc, char *argv[]) win32ChildQueue = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 1); if (win32ChildQueue == NULL) ereport(FATAL, - (errmsg("could not create I/O completion port for child queue"))); + (errmsg("could not create I/O completion port for child queue"))); #endif /* @@ -1271,8 +1271,8 @@ PostmasterMain(int argc, char *argv[]) if (!(Log_destination & LOG_DESTINATION_STDERR)) ereport(LOG, (errmsg("ending log output to stderr"), - errhint("Future log output will go to log destination \"%s\".", - Log_destination_string))); + errhint("Future log output will go to log destination \"%s\".", + Log_destination_string))); whereToSendOutput = DestNone; @@ -1324,7 +1324,7 @@ PostmasterMain(int argc, char *argv[]) ereport(FATAL, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("postmaster became multithreaded during startup"), - errhint("Set the LC_ALL environment variable to a valid locale."))); + errhint("Set the LC_ALL environment variable to a valid locale."))); #endif /* @@ -1479,8 +1479,8 @@ checkDataDir(void) else ereport(FATAL, (errcode_for_file_access(), - errmsg("could not read permissions of directory \"%s\": %m", - DataDir))); + errmsg("could not read permissions of directory \"%s\": %m", + DataDir))); } /* eventual chdir would fail anyway, but let's test ... */ @@ -1619,7 +1619,7 @@ DetermineSleepTime(struct timeval *timeout) } this_wakeup = TimestampTzPlusMilliseconds(rw->rw_crashed_at, - 1000L * rw->rw_worker.bgw_restart_time); + 1000L * rw->rw_worker.bgw_restart_time); if (next_wakeup == 0 || this_wakeup < next_wakeup) next_wakeup = this_wakeup; } @@ -2106,9 +2106,9 @@ retry1: else if (!parse_bool(valptr, &am_walsender)) ereport(FATAL, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid value for parameter \"%s\": \"%s\"", - "replication", - valptr), + errmsg("invalid value for parameter \"%s\": \"%s\"", + "replication", + valptr), errhint("Valid values are: \"false\", 0, \"true\", 1, \"database\"."))); } else @@ -2157,7 +2157,7 @@ retry1: if (port->user_name == NULL || port->user_name[0] == '\0') ereport(FATAL, (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), - errmsg("no PostgreSQL user name specified in startup packet"))); + errmsg("no PostgreSQL user name specified in startup packet"))); /* The database defaults to the user name. */ if (port->database_name == NULL || port->database_name[0] == '\0') @@ -2610,7 +2610,7 @@ pmdie(SIGNAL_ARGS) /* autovac workers are told to shut down immediately */ /* and bgworkers too; does this need tweaking? */ SignalSomeChildren(SIGTERM, - BACKEND_TYPE_AUTOVAC | BACKEND_TYPE_BGWORKER); + BACKEND_TYPE_AUTOVAC | BACKEND_TYPE_BGWORKER); /* and the autovac launcher too */ if (AutoVacPID != 0) signal_child(AutoVacPID, SIGTERM); @@ -2687,7 +2687,7 @@ pmdie(SIGNAL_ARGS) (errmsg("aborting any active transactions"))); /* shut down all backends and workers */ SignalSomeChildren(SIGTERM, - BACKEND_TYPE_NORMAL | BACKEND_TYPE_AUTOVAC | + BACKEND_TYPE_NORMAL | BACKEND_TYPE_AUTOVAC | BACKEND_TYPE_BGWORKER); /* and the autovac launcher too */ if (AutoVacPID != 0) @@ -2801,7 +2801,7 @@ reaper(SIGNAL_ARGS) LogChildExit(LOG, _("startup process"), pid, exitstatus); ereport(LOG, - (errmsg("aborting startup due to startup process failure"))); + (errmsg("aborting startup due to startup process failure"))); ExitPostmaster(1); } @@ -2862,7 +2862,7 @@ reaper(SIGNAL_ARGS) /* at this point we are really open for business */ ereport(LOG, - (errmsg("database system is ready to accept connections"))); + (errmsg("database system is ready to accept connections"))); #ifdef USE_SYSTEMD sd_notify(0, "READY=1"); @@ -3517,7 +3517,7 @@ LogChildExit(int lev, const char *procname, int pid, int exitstatus) if (!EXIT_STATUS_0(exitstatus)) activity = pgstat_get_crashed_backend_activity(pid, activity_buffer, - sizeof(activity_buffer)); + sizeof(activity_buffer)); if (WIFEXITED(exitstatus)) ereport(lev, @@ -4148,7 +4148,7 @@ BackendInitialize(Port *port) if ((ret = pg_getnameinfo_all(&port->raddr.addr, port->raddr.salen, remote_host, sizeof(remote_host), remote_port, sizeof(remote_port), - (log_hostname ? 0 : NI_NUMERICHOST) | NI_NUMERICSERV)) != 0) + (log_hostname ? 0 : NI_NUMERICHOST) | NI_NUMERICSERV)) != 0) ereport(WARNING, (errmsg_internal("pg_getnameinfo_all() failed: %s", gai_strerror(ret)))); @@ -4655,7 +4655,7 @@ internal_forkexec(int argc, char *argv[], Port *port) pgwin32_deadchild_callback, childinfo, INFINITE, - WT_EXECUTEONLYONCE | WT_EXECUTEINWAITTHREAD)) + WT_EXECUTEONLYONCE | WT_EXECUTEINWAITTHREAD)) ereport(FATAL, (errmsg_internal("could not register process for wait: error code %lu", GetLastError()))); @@ -4934,7 +4934,7 @@ ExitPostmaster(int status) ereport(LOG, (errcode(ERRCODE_INTERNAL_ERROR), errmsg_internal("postmaster became multithreaded"), - errdetail("Please report this to <pgsql-bugs@postgresql.org>."))); + errdetail("Please report this to <pgsql-bugs@postgresql.org>."))); #endif /* should cleanup shared memory and kill all backends */ @@ -5013,7 +5013,7 @@ sigusr1_handler(SIGNAL_ARGS) PgStatPID = pgstat_start(); ereport(LOG, - (errmsg("database system is ready to accept read only connections"))); + (errmsg("database system is ready to accept read only connections"))); #ifdef USE_SYSTEMD sd_notify(0, "READY=1"); @@ -5286,7 +5286,7 @@ StartChildProcess(AuxProcType type) break; case BgWriterProcess: ereport(LOG, - (errmsg("could not fork background writer process: %m"))); + (errmsg("could not fork background writer process: %m"))); break; case CheckpointerProcess: ereport(LOG, @@ -5796,7 +5796,7 @@ maybe_start_bgworkers(void) now = GetCurrentTimestamp(); if (!TimestampDifferenceExceeds(rw->rw_crashed_at, now, - rw->rw_worker.bgw_restart_time * 1000)) + rw->rw_worker.bgw_restart_time * 1000)) { /* Set flag to remember that we have workers to start later */ HaveCrashedWorker = true; diff --git a/src/backend/postmaster/syslogger.c b/src/backend/postmaster/syslogger.c index 7e4d7a9041b..3255b42c7d2 100644 --- a/src/backend/postmaster/syslogger.c +++ b/src/backend/postmaster/syslogger.c @@ -630,8 +630,8 @@ SysLogger_Start(void) */ ereport(LOG, (errmsg("redirecting log output to logging collector process"), - errhint("Future log output will appear in directory \"%s\".", - Log_directory))); + errhint("Future log output will appear in directory \"%s\".", + Log_directory))); #ifndef WIN32 fflush(stdout); diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c index 25ce7a7bd27..9776858f032 100644 --- a/src/backend/replication/basebackup.c +++ b/src/backend/replication/basebackup.c @@ -365,7 +365,7 @@ perform_base_backup(basebackup_options *opt, DIR *tblspcdir) dir = AllocateDir("pg_wal"); if (!dir) ereport(ERROR, - (errmsg("could not open directory \"%s\": %m", "pg_wal"))); + (errmsg("could not open directory \"%s\": %m", "pg_wal"))); while ((de = ReadDir(dir, "pg_wal")) != NULL) { /* Does it look like a WAL segment, and is it in the range? */ @@ -436,7 +436,7 @@ perform_base_backup(basebackup_options *opt, DIR *tblspcdir) XLogFileName(nextfname, ThisTimeLineID, nextsegno); ereport(ERROR, - (errmsg("could not find WAL file \"%s\"", nextfname))); + (errmsg("could not find WAL file \"%s\"", nextfname))); } } if (segno != endsegno) @@ -484,7 +484,7 @@ perform_base_backup(basebackup_options *opt, DIR *tblspcdir) CheckXLogRemoved(segno, tli); ereport(ERROR, (errcode_for_file_access(), - errmsg("unexpected WAL file size \"%s\"", walFiles[i]))); + errmsg("unexpected WAL file size \"%s\"", walFiles[i]))); } /* send the WAL file itself */ @@ -510,7 +510,7 @@ perform_base_backup(basebackup_options *opt, DIR *tblspcdir) CheckXLogRemoved(segno, tli); ereport(ERROR, (errcode_for_file_access(), - errmsg("unexpected WAL file size \"%s\"", walFiles[i]))); + errmsg("unexpected WAL file size \"%s\"", walFiles[i]))); } /* XLogSegSize is a multiple of 512, so no need for padding */ @@ -652,7 +652,7 @@ parse_basebackup_options(List *options, basebackup_options *opt) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), errmsg("%d is outside the valid range for parameter \"%s\" (%d .. %d)", - (int) maxrate, "MAX_RATE", MAX_RATE_LOWER, MAX_RATE_UPPER))); + (int) maxrate, "MAX_RATE", MAX_RATE_LOWER, MAX_RATE_UPPER))); opt->maxrate = (uint32) maxrate; o_maxrate = true; @@ -992,9 +992,9 @@ sendDir(char *path, int basepathlen, bool sizeonly, List *tablespaces, ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("the standby was promoted during online backup"), - errhint("This means that the backup being taken is corrupt " - "and should not be used. " - "Try taking another online backup."))); + errhint("This means that the backup being taken is corrupt " + "and should not be used. " + "Try taking another online backup."))); /* Scan for files that should be excluded */ excludeFound = false; @@ -1113,7 +1113,7 @@ sendDir(char *path, int basepathlen, bool sizeonly, List *tablespaces, */ ereport(WARNING, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("tablespaces are not supported on this platform"))); + errmsg("tablespaces are not supported on this platform"))); continue; #endif /* HAVE_READLINK */ } @@ -1225,7 +1225,7 @@ sendFile(char *readfilename, char *tarfilename, struct stat *statbuf, /* Send the chunk as a CopyData message */ if (pq_putmessage('d', buf, cnt)) ereport(ERROR, - (errmsg("base backup could not send data, aborting backup"))); + (errmsg("base backup could not send data, aborting backup"))); len += cnt; throttle(cnt); @@ -1281,7 +1281,7 @@ _tarWriteHeader(const char *filename, const char *linktarget, if (!sizeonly) { rc = tarCreateHeader(h, filename, linktarget, statbuf->st_size, - statbuf->st_mode, statbuf->st_uid, statbuf->st_gid, + statbuf->st_mode, statbuf->st_uid, statbuf->st_gid, statbuf->st_mtime); switch (rc) @@ -1295,9 +1295,9 @@ _tarWriteHeader(const char *filename, const char *linktarget, break; case TAR_SYMLINK_TOO_LONG: ereport(ERROR, - (errmsg("symbolic link target too long for tar format: " - "file name \"%s\", target \"%s\"", - filename, linktarget))); + (errmsg("symbolic link target too long for tar format: " + "file name \"%s\", target \"%s\"", + filename, linktarget))); break; default: elog(ERROR, "unrecognized tar error: %d", rc); @@ -1366,7 +1366,7 @@ throttle(size_t increment) * the maximum time to sleep. Thus the cast to long is safe. */ wait_result = WaitLatch(MyLatch, - WL_LATCH_SET | WL_TIMEOUT | WL_POSTMASTER_DEATH, + WL_LATCH_SET | WL_TIMEOUT | WL_POSTMASTER_DEATH, (long) (sleep / 1000), WAIT_EVENT_BASE_BACKUP_THROTTLE); diff --git a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c index f6fa0e4c16a..2f0ed035fc6 100644 --- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c +++ b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c @@ -425,8 +425,8 @@ libpqrcv_endstreaming(WalReceiverConn *conn, TimeLineID *next_tli) if (PQputCopyEnd(conn->streamConn, NULL) <= 0 || PQflush(conn->streamConn)) ereport(ERROR, - (errmsg("could not send end-of-streaming message to primary: %s", - pchomp(PQerrorMessage(conn->streamConn))))); + (errmsg("could not send end-of-streaming message to primary: %s", + pchomp(PQerrorMessage(conn->streamConn))))); *next_tli = 0; @@ -797,7 +797,7 @@ libpqrcv_create_slot(WalReceiverConn *conn, const char *slotname, } *lsn = DatumGetLSN(DirectFunctionCall1Coll(pg_lsn_in, InvalidOid, - CStringGetDatum(PQgetvalue(res, 0, 1)))); + CStringGetDatum(PQgetvalue(res, 0, 1)))); if (!PQgetisnull(res, 0, 2)) snapshot = pstrdup(PQgetvalue(res, 0, 2)); else @@ -896,7 +896,7 @@ libpqrcv_exec(WalReceiverConn *conn, const char *query, if (MyDatabaseId == InvalidOid) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("the query interface requires a database connection"))); + errmsg("the query interface requires a database connection"))); pgres = libpqrcv_PQexec(conn->streamConn, query); diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c index 68825ef5981..486fd0c9885 100644 --- a/src/backend/replication/logical/decode.c +++ b/src/backend/replication/logical/decode.c @@ -333,7 +333,7 @@ DecodeStandbyOp(LogicalDecodingContext *ctx, XLogRecordBuffer *buf) (xl_invalidations *) XLogRecGetData(r); ReorderBufferImmediateInvalidation( - ctx->reorder, invalidations->nmsgs, invalidations->msgs); + ctx->reorder, invalidations->nmsgs, invalidations->msgs); } break; default: diff --git a/src/backend/replication/logical/launcher.c b/src/backend/replication/logical/launcher.c index 15dac00ffa2..86a2b14807f 100644 --- a/src/backend/replication/logical/launcher.c +++ b/src/backend/replication/logical/launcher.c @@ -265,8 +265,8 @@ logicalrep_worker_launch(Oid dbid, Oid subid, const char *subname, Oid userid, TimestampTz now; ereport(DEBUG1, - (errmsg("starting logical replication worker for subscription \"%s\"", - subname))); + (errmsg("starting logical replication worker for subscription \"%s\"", + subname))); /* Report this after the initial starting message for consistency. */ if (max_replication_slots == 0) @@ -399,7 +399,7 @@ retry: ereport(WARNING, (errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED), errmsg("out of background worker slots"), - errhint("You might need to increase max_worker_processes."))); + errhint("You might need to increase max_worker_processes."))); return; } @@ -556,8 +556,8 @@ logicalrep_worker_attach(int slot) LWLockRelease(LogicalRepWorkerLock); ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("logical replication worker slot %d is empty, cannot attach", - slot))); + errmsg("logical replication worker slot %d is empty, cannot attach", + slot))); } if (MyLogicalRepWorker->proc) @@ -565,8 +565,8 @@ logicalrep_worker_attach(int slot) LWLockRelease(LogicalRepWorkerLock); ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("logical replication worker slot %d is already used by " - "another worker, cannot attach", slot))); + errmsg("logical replication worker slot %d is already used by " + "another worker, cannot attach", slot))); } MyLogicalRepWorker->proc = MyProc; @@ -829,7 +829,7 @@ ApplyLauncherMain(Datum main_arg) { /* Use temporary context for the database list and worker info. */ subctx = AllocSetContextCreate(TopMemoryContext, - "Logical Replication Launcher sublist", + "Logical Replication Launcher sublist", ALLOCSET_DEFAULT_MINSIZE, ALLOCSET_DEFAULT_INITSIZE, ALLOCSET_DEFAULT_MAXSIZE); diff --git a/src/backend/replication/logical/logical.c b/src/backend/replication/logical/logical.c index f4d123ec05e..85721ead3ec 100644 --- a/src/backend/replication/logical/logical.c +++ b/src/backend/replication/logical/logical.c @@ -64,7 +64,7 @@ static void change_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn, Relation relation, ReorderBufferChange *change); static void message_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn, XLogRecPtr message_lsn, bool transactional, - const char *prefix, Size message_size, const char *message); + const char *prefix, Size message_size, const char *message); static void LoadOutputPlugin(OutputPluginCallbacks *callbacks, char *plugin); @@ -103,7 +103,7 @@ CheckLogicalDecodingRequirements(void) if (RecoveryInProgress()) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("logical decoding cannot be used while in recovery"))); + errmsg("logical decoding cannot be used while in recovery"))); } /* @@ -118,7 +118,7 @@ StartupDecodingContext(List *output_plugin_options, XLogPageReadCB read_page, LogicalOutputPluginWriterPrepareWrite prepare_write, LogicalOutputPluginWriterWrite do_write, - LogicalOutputPluginWriterUpdateProgress update_progress) + LogicalOutputPluginWriterUpdateProgress update_progress) { ReplicationSlot *slot; MemoryContext context, @@ -219,7 +219,7 @@ CreateInitDecodingContext(char *plugin, XLogPageReadCB read_page, LogicalOutputPluginWriterPrepareWrite prepare_write, LogicalOutputPluginWriterWrite do_write, - LogicalOutputPluginWriterUpdateProgress update_progress) + LogicalOutputPluginWriterUpdateProgress update_progress) { TransactionId xmin_horizon = InvalidTransactionId; ReplicationSlot *slot; @@ -240,13 +240,13 @@ CreateInitDecodingContext(char *plugin, if (SlotIsPhysical(slot)) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("cannot use physical replication slot for logical decoding"))); + errmsg("cannot use physical replication slot for logical decoding"))); if (slot->data.database != MyDatabaseId) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("replication slot \"%s\" was not created in this database", - NameStr(slot->data.name)))); + errmsg("replication slot \"%s\" was not created in this database", + NameStr(slot->data.name)))); if (IsTransactionState() && GetTopTransactionIdIfAny() != InvalidTransactionId) @@ -367,8 +367,8 @@ CreateDecodingContext(XLogRecPtr start_lsn, if (slot->data.database != MyDatabaseId) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - (errmsg("replication slot \"%s\" was not created in this database", - NameStr(slot->data.name))))); + (errmsg("replication slot \"%s\" was not created in this database", + NameStr(slot->data.name))))); if (start_lsn == InvalidXLogRecPtr) { diff --git a/src/backend/replication/logical/logicalfuncs.c b/src/backend/replication/logical/logicalfuncs.c index ba4d8cc5a45..363ca82cb0b 100644 --- a/src/backend/replication/logical/logicalfuncs.c +++ b/src/backend/replication/logical/logicalfuncs.c @@ -99,7 +99,7 @@ LogicalOutputWrite(LogicalDecodingContext *ctx, XLogRecPtr lsn, TransactionId xi /* ick, but cstring_to_text_with_len works for bytea perfectly fine */ values[2] = PointerGetDatum( - cstring_to_text_with_len(ctx->out->data, ctx->out->len)); + cstring_to_text_with_len(ctx->out->data, ctx->out->len)); tuplestore_putvalues(p->tupstore, p->tupdesc, values, nulls); p->returned_rows++; @@ -116,7 +116,7 @@ check_permissions(void) int logical_read_local_xlog_page(XLogReaderState *state, XLogRecPtr targetPagePtr, - int reqLen, XLogRecPtr targetRecPtr, char *cur_page, TimeLineID *pageTLI) + int reqLen, XLogRecPtr targetRecPtr, char *cur_page, TimeLineID *pageTLI) { return read_local_xlog_page(state, targetPagePtr, reqLen, targetRecPtr, cur_page, pageTLI); diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c index f73b1a6d6c8..1c665312a48 100644 --- a/src/backend/replication/logical/origin.c +++ b/src/backend/replication/logical/origin.c @@ -187,7 +187,7 @@ replorigin_check_prerequisites(bool check_slots, bool recoveryOK) if (!recoveryOK && RecoveryInProgress()) ereport(ERROR, (errcode(ERRCODE_READ_ONLY_SQL_TRANSACTION), - errmsg("cannot manipulate replication origins during recovery"))); + errmsg("cannot manipulate replication origins during recovery"))); } @@ -449,7 +449,7 @@ ReplicationOriginShmemSize(void) size = add_size(size, offsetof(ReplicationStateCtl, states)); size = add_size(size, - mul_size(max_replication_slots, sizeof(ReplicationState))); + mul_size(max_replication_slots, sizeof(ReplicationState))); return size; } @@ -664,8 +664,8 @@ StartupReplicationOrigin(void) if (magic != REPLICATION_STATE_MAGIC) ereport(PANIC, - (errmsg("replication checkpoint has wrong magic %u instead of %u", - magic, REPLICATION_STATE_MAGIC))); + (errmsg("replication checkpoint has wrong magic %u instead of %u", + magic, REPLICATION_STATE_MAGIC))); /* we can skip locking here, no other access is possible */ @@ -997,7 +997,7 @@ replorigin_session_setup(RepOriginId node) if (session_replication_state != NULL) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("cannot setup replication origin when one is already setup"))); + errmsg("cannot setup replication origin when one is already setup"))); /* Lock exclusively, as we may have to create a new table entry. */ LWLockAcquire(ReplicationOriginLock, LW_EXCLUSIVE); @@ -1026,8 +1026,8 @@ replorigin_session_setup(RepOriginId node) { ereport(ERROR, (errcode(ERRCODE_OBJECT_IN_USE), - errmsg("replication identifier %d is already active for PID %d", - curstate->roident, curstate->acquired_by))); + errmsg("replication identifier %d is already active for PID %d", + curstate->roident, curstate->acquired_by))); } /* ok, found slot */ diff --git a/src/backend/replication/logical/relation.c b/src/backend/replication/logical/relation.c index 2bd1d9f7928..77798574562 100644 --- a/src/backend/replication/logical/relation.c +++ b/src/backend/replication/logical/relation.c @@ -283,7 +283,7 @@ logicalrep_rel_open(LogicalRepRelId remoteid, LOCKMODE lockmode) continue; attnum = logicalrep_rel_att_by_name(remoterel, - NameStr(desc->attrs[i]->attname)); + NameStr(desc->attrs[i]->attname)); entry->attrmap[i] = attnum; if (attnum >= 0) @@ -294,9 +294,9 @@ logicalrep_rel_open(LogicalRepRelId remoteid, LOCKMODE lockmode) if (found < remoterel->natts) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("logical replication target relation \"%s.%s\" is missing " - "some replicated columns", - remoterel->nspname, remoterel->relname))); + errmsg("logical replication target relation \"%s.%s\" is missing " + "some replicated columns", + remoterel->nspname, remoterel->relname))); /* * Check that replica identity matches. We allow for stricter replica @@ -334,9 +334,9 @@ logicalrep_rel_open(LogicalRepRelId remoteid, LOCKMODE lockmode) if (!AttrNumberIsForUserDefinedAttr(attnum)) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("logical replication target relation \"%s.%s\" uses " - "system columns in REPLICA IDENTITY index", - remoterel->nspname, remoterel->relname))); + errmsg("logical replication target relation \"%s.%s\" uses " + "system columns in REPLICA IDENTITY index", + remoterel->nspname, remoterel->relname))); attnum = AttrNumberGetAttrOffset(attnum); diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c index 4905207893a..5567bee061d 100644 --- a/src/backend/replication/logical/reorderbuffer.c +++ b/src/backend/replication/logical/reorderbuffer.c @@ -1403,7 +1403,7 @@ ReorderBufferCommit(ReorderBuffer *rb, TransactionId xid, Assert(snapshot_now); reloid = RelidByRelfilenode(change->data.tp.relnode.spcNode, - change->data.tp.relnode.relNode); + change->data.tp.relnode.relNode); /* * Catalog tuple without data, emitted while catalog was @@ -1565,7 +1565,7 @@ ReorderBufferCommit(ReorderBuffer *rb, TransactionId xid, { /* we don't use the global one anymore */ snapshot_now = ReorderBufferCopySnap(rb, snapshot_now, - txn, command_id); + txn, command_id); } snapshot_now->curcid = command_id; @@ -2384,7 +2384,7 @@ ReorderBufferRestoreChanges(ReorderBuffer *rb, ReorderBufferTXN *txn, else if (readBytes < 0) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not read from reorderbuffer spill file: %m"))); + errmsg("could not read from reorderbuffer spill file: %m"))); else if (readBytes != sizeof(ReorderBufferDiskChange)) ereport(ERROR, (errcode_for_file_access(), @@ -2395,7 +2395,7 @@ ReorderBufferRestoreChanges(ReorderBuffer *rb, ReorderBufferTXN *txn, ondisk = (ReorderBufferDiskChange *) rb->outbuf; ReorderBufferSerializeReserve(rb, - sizeof(ReorderBufferDiskChange) + ondisk->size); + sizeof(ReorderBufferDiskChange) + ondisk->size); ondisk = (ReorderBufferDiskChange *) rb->outbuf; pgstat_report_wait_start(WAIT_EVENT_REORDER_BUFFER_READ); @@ -2406,13 +2406,13 @@ ReorderBufferRestoreChanges(ReorderBuffer *rb, ReorderBufferTXN *txn, if (readBytes < 0) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not read from reorderbuffer spill file: %m"))); + errmsg("could not read from reorderbuffer spill file: %m"))); else if (readBytes != ondisk->size - sizeof(ReorderBufferDiskChange)) ereport(ERROR, (errcode_for_file_access(), errmsg("could not read from reorderbuffer spill file: read %d instead of %u bytes", readBytes, - (uint32) (ondisk->size - sizeof(ReorderBufferDiskChange))))); + (uint32) (ondisk->size - sizeof(ReorderBufferDiskChange))))); /* * ok, read a full change from disk, now restore it into proper @@ -2521,7 +2521,7 @@ ReorderBufferRestoreChange(ReorderBuffer *rb, ReorderBufferTXN *txn, memcpy(&change->data.msg.message_size, data, sizeof(Size)); data += sizeof(Size); change->data.msg.message = MemoryContextAlloc(rb->context, - change->data.msg.message_size); + change->data.msg.message_size); memcpy(change->data.msg.message, data, change->data.msg.message_size); data += change->data.msg.message_size; @@ -2867,7 +2867,7 @@ ReorderBufferToastReplace(ReorderBuffer *rb, ReorderBufferTXN *txn, cchange = dlist_container(ReorderBufferChange, node, it.cur); ctup = cchange->data.tp.newtuple; chunk = DatumGetPointer( - fastgetattr(&ctup->tuple, 3, toast_desc, &isnull)); + fastgetattr(&ctup->tuple, 3, toast_desc, &isnull)); Assert(!isnull); Assert(!VARATT_IS_EXTERNAL(chunk)); diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c index fc9dc525b3e..281b7ab869f 100644 --- a/src/backend/replication/logical/snapbuild.c +++ b/src/backend/replication/logical/snapbuild.c @@ -662,7 +662,7 @@ SnapBuildExportSnapshot(SnapBuild *builder) ereport(LOG, (errmsg_plural("exported logical decoding snapshot: \"%s\" with %u transaction ID", - "exported logical decoding snapshot: \"%s\" with %u transaction IDs", + "exported logical decoding snapshot: \"%s\" with %u transaction IDs", snap->xcnt, snapname, snap->xcnt))); return snapname; @@ -866,7 +866,7 @@ SnapBuildAddCommittedTxn(SnapBuild *builder, TransactionId xid) (uint32) builder->committed.xcnt_space); builder->committed.xip = repalloc(builder->committed.xip, - builder->committed.xcnt_space * sizeof(TransactionId)); + builder->committed.xcnt_space * sizeof(TransactionId)); } /* @@ -1169,10 +1169,10 @@ SnapBuildProcessRunningXacts(SnapBuild *builder, XLogRecPtr lsn, xl_running_xact * we have one. */ else if (txn == NULL && - builder->reorder->current_restart_decoding_lsn != InvalidXLogRecPtr && + builder->reorder->current_restart_decoding_lsn != InvalidXLogRecPtr && builder->last_serialized_snapshot != InvalidXLogRecPtr) LogicalIncreaseRestartDecodingForSlot(lsn, - builder->last_serialized_snapshot); + builder->last_serialized_snapshot); } @@ -1222,8 +1222,8 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn ereport(DEBUG1, (errmsg_internal("skipping snapshot at %X/%X while building logical decoding snapshot, xmin horizon too low", (uint32) (lsn >> 32), (uint32) lsn), - errdetail_internal("initial xmin horizon of %u vs the snapshot's %u", - builder->initial_xmin_horizon, running->oldestRunningXid))); + errdetail_internal("initial xmin horizon of %u vs the snapshot's %u", + builder->initial_xmin_horizon, running->oldestRunningXid))); SnapBuildWaitSnapshot(running, builder->initial_xmin_horizon); @@ -1303,10 +1303,10 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn Assert(TransactionIdIsNormal(builder->xmax)); ereport(LOG, - (errmsg("logical decoding found initial starting point at %X/%X", - (uint32) (lsn >> 32), (uint32) lsn), - errdetail("Waiting for transactions (approximately %d) older than %u to end.", - running->xcnt, running->nextXid))); + (errmsg("logical decoding found initial starting point at %X/%X", + (uint32) (lsn >> 32), (uint32) lsn), + errdetail("Waiting for transactions (approximately %d) older than %u to end.", + running->xcnt, running->nextXid))); SnapBuildWaitSnapshot(running, running->nextXid); } @@ -1327,10 +1327,10 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn SnapBuildStartNextPhaseAt(builder, running->nextXid); ereport(LOG, - (errmsg("logical decoding found initial consistent point at %X/%X", - (uint32) (lsn >> 32), (uint32) lsn), - errdetail("Waiting for transactions (approximately %d) older than %u to end.", - running->xcnt, running->nextXid))); + (errmsg("logical decoding found initial consistent point at %X/%X", + (uint32) (lsn >> 32), (uint32) lsn), + errdetail("Waiting for transactions (approximately %d) older than %u to end.", + running->xcnt, running->nextXid))); SnapBuildWaitSnapshot(running, running->nextXid); } @@ -1570,7 +1570,7 @@ SnapBuildSerialize(SnapBuild *builder, XLogRecPtr lsn) INIT_CRC32C(ondisk->checksum); COMP_CRC32C(ondisk->checksum, ((char *) ondisk) + SnapBuildOnDiskNotChecksummedSize, - SnapBuildOnDiskConstantSize - SnapBuildOnDiskNotChecksummedSize); + SnapBuildOnDiskConstantSize - SnapBuildOnDiskNotChecksummedSize); ondisk_c += sizeof(SnapBuildOnDisk); memcpy(&ondisk->builder, builder, sizeof(SnapBuild)); @@ -1729,7 +1729,7 @@ SnapBuildRestore(SnapBuild *builder, XLogRecPtr lsn) INIT_CRC32C(checksum); COMP_CRC32C(checksum, ((char *) &ondisk) + SnapBuildOnDiskNotChecksummedSize, - SnapBuildOnDiskConstantSize - SnapBuildOnDiskNotChecksummedSize); + SnapBuildOnDiskConstantSize - SnapBuildOnDiskNotChecksummedSize); /* read SnapBuild */ pgstat_report_wait_start(WAIT_EVENT_SNAPBUILD_READ); diff --git a/src/backend/replication/logical/tablesync.c b/src/backend/replication/logical/tablesync.c index d5577e38d25..3ef12dfd26a 100644 --- a/src/backend/replication/logical/tablesync.c +++ b/src/backend/replication/logical/tablesync.c @@ -186,7 +186,7 @@ wait_for_relation_state_change(Oid relid, char expected_state) /* Check if the opposite worker is still running and bail if not. */ worker = logicalrep_worker_find(MyLogicalRepWorker->subid, - am_tablesync_worker() ? InvalidOid : relid, + am_tablesync_worker() ? InvalidOid : relid, false); LWLockRelease(LogicalRepWorkerLock); if (!worker) @@ -682,7 +682,7 @@ fetch_remote_table_info(char *nspname, char *relname, " a.attnum = ANY(i.indkey)" " FROM pg_catalog.pg_attribute a" " LEFT JOIN pg_catalog.pg_index i" - " ON (i.indexrelid = pg_get_replica_identity_index(%u))" + " ON (i.indexrelid = pg_get_replica_identity_index(%u))" " WHERE a.attnum > 0::pg_catalog.int2" " AND NOT a.attisdropped" " AND a.attrelid = %u" diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c index 2288675ff2b..898c497d12c 100644 --- a/src/backend/replication/logical/worker.c +++ b/src/backend/replication/logical/worker.c @@ -628,7 +628,7 @@ check_relation_updatable(LogicalRepRelMapEntry *rel) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("publisher does not send replica identity column " - "expected by the logical replication target relation \"%s.%s\"", + "expected by the logical replication target relation \"%s.%s\"", rel->remoterel.nspname, rel->remoterel.relname))); } @@ -908,7 +908,7 @@ apply_dispatch(StringInfo s) default: ereport(ERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("invalid logical replication message type %c", action))); + errmsg("invalid logical replication message type %c", action))); } } @@ -1207,7 +1207,7 @@ LogicalRepApplyLoop(XLogRecPtr last_received) if (!ping_sent) { timeout = TimestampTzPlusMilliseconds(last_recv_timestamp, - (wal_receiver_timeout / 2)); + (wal_receiver_timeout / 2)); if (now >= timeout) { requestReply = true; @@ -1375,7 +1375,7 @@ maybe_reread_subscription(void) { ereport(LOG, (errmsg("logical replication apply worker for subscription \"%s\" will " - "restart because the connection information was changed", + "restart because the connection information was changed", MySubscription->name))); proc_exit(0); @@ -1406,7 +1406,7 @@ maybe_reread_subscription(void) { ereport(LOG, (errmsg("logical replication apply worker for subscription \"%s\" will " - "restart because the replication slot name was changed", + "restart because the replication slot name was changed", MySubscription->name))); proc_exit(0); @@ -1420,7 +1420,7 @@ maybe_reread_subscription(void) { ereport(LOG, (errmsg("logical replication apply worker for subscription \"%s\" will " - "restart because subscription's publications were changed", + "restart because subscription's publications were changed", MySubscription->name))); proc_exit(0); @@ -1528,7 +1528,7 @@ ApplyWorkerMain(Datum main_arg) { ereport(LOG, (errmsg("logical replication apply worker for subscription \"%s\" will not " - "start because the subscription was disabled during startup", + "start because the subscription was disabled during startup", MySubscription->name))); proc_exit(0); @@ -1542,7 +1542,7 @@ ApplyWorkerMain(Datum main_arg) if (am_tablesync_worker()) ereport(LOG, (errmsg("logical replication table synchronization worker for subscription \"%s\", table \"%s\" has started", - MySubscription->name, get_rel_name(MyLogicalRepWorker->relid)))); + MySubscription->name, get_rel_name(MyLogicalRepWorker->relid)))); else ereport(LOG, (errmsg("logical replication apply worker for subscription \"%s\" has started", diff --git a/src/backend/replication/pgoutput/pgoutput.c b/src/backend/replication/pgoutput/pgoutput.c index 5bdfa60ae74..4a5628888a2 100644 --- a/src/backend/replication/pgoutput/pgoutput.c +++ b/src/backend/replication/pgoutput/pgoutput.c @@ -150,7 +150,7 @@ pgoutput_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt, /* Create our memory context for private allocations. */ data->context = AllocSetContextCreate(ctx->context, - "logical replication output context", + "logical replication output context", ALLOCSET_DEFAULT_MINSIZE, ALLOCSET_DEFAULT_INITSIZE, ALLOCSET_DEFAULT_MAXSIZE); @@ -177,13 +177,13 @@ pgoutput_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt, ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("client sent proto_version=%d but we only support protocol %d or lower", - data->protocol_version, LOGICALREP_PROTO_VERSION_NUM))); + data->protocol_version, LOGICALREP_PROTO_VERSION_NUM))); if (data->protocol_version < LOGICALREP_PROTO_MIN_VERSION_NUM) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("client sent proto_version=%d but we only support protocol %d or higher", - data->protocol_version, LOGICALREP_PROTO_MIN_VERSION_NUM))); + data->protocol_version, LOGICALREP_PROTO_MIN_VERSION_NUM))); if (list_length(data->publication_names) < 1) ereport(ERROR, diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c index 4bc28162411..dc7de20e113 100644 --- a/src/backend/replication/slot.c +++ b/src/backend/replication/slot.c @@ -200,8 +200,8 @@ ReplicationSlotValidateName(const char *name, int elevel) { ereport(elevel, (errcode(ERRCODE_INVALID_NAME), - errmsg("replication slot name \"%s\" contains invalid character", - name), + errmsg("replication slot name \"%s\" contains invalid character", + name), errhint("Replication slot names may only contain lower case letters, numbers, and the underscore character."))); return false; } @@ -1352,15 +1352,15 @@ RestoreSlotFromDisk(const char *name) if (cp.version != SLOT_VERSION) ereport(PANIC, (errcode_for_file_access(), - errmsg("replication slot file \"%s\" has unsupported version %u", - path, cp.version))); + errmsg("replication slot file \"%s\" has unsupported version %u", + path, cp.version))); /* boundary check on length */ if (cp.length != ReplicationSlotOnDiskV2Size) ereport(PANIC, (errcode_for_file_access(), - errmsg("replication slot file \"%s\" has corrupted length %u", - path, cp.length))); + errmsg("replication slot file \"%s\" has corrupted length %u", + path, cp.length))); /* Now that we know the size, read the entire file */ pgstat_report_wait_start(WAIT_EVENT_REPLICATION_SLOT_READ); diff --git a/src/backend/replication/syncrep.c b/src/backend/replication/syncrep.c index 8092f01edda..5fd47689dd2 100644 --- a/src/backend/replication/syncrep.c +++ b/src/backend/replication/syncrep.c @@ -393,8 +393,8 @@ SyncRepInitConfig(void) MyWalSnd->sync_standby_priority = priority; LWLockRelease(SyncRepLock); ereport(DEBUG1, - (errmsg("standby \"%s\" now has synchronous standby priority %u", - application_name, priority))); + (errmsg("standby \"%s\" now has synchronous standby priority %u", + application_name, priority))); } } @@ -455,7 +455,7 @@ SyncRepReleaseWaiters(void) if (SyncRepConfig->syncrep_method == SYNC_REP_PRIORITY) ereport(LOG, (errmsg("standby \"%s\" is now a synchronous standby with priority %u", - application_name, MyWalSnd->sync_standby_priority))); + application_name, MyWalSnd->sync_standby_priority))); else ereport(LOG, (errmsg("standby \"%s\" is now a candidate for quorum synchronous standby", @@ -606,7 +606,7 @@ SyncRepGetOldestSyncRecPtr(XLogRecPtr *writePtr, XLogRecPtr *flushPtr, */ static void SyncRepGetNthLatestSyncRecPtr(XLogRecPtr *writePtr, XLogRecPtr *flushPtr, - XLogRecPtr *applyPtr, List *sync_standbys, uint8 nth) + XLogRecPtr *applyPtr, List *sync_standbys, uint8 nth) { ListCell *cell; XLogRecPtr *write_array; diff --git a/src/backend/replication/walreceiver.c b/src/backend/replication/walreceiver.c index 8e64e8bf7aa..8a249e22b9f 100644 --- a/src/backend/replication/walreceiver.c +++ b/src/backend/replication/walreceiver.c @@ -385,13 +385,13 @@ WalReceiverMain(void) if (first_stream) ereport(LOG, (errmsg("started streaming WAL from primary at %X/%X on timeline %u", - (uint32) (startpoint >> 32), (uint32) startpoint, + (uint32) (startpoint >> 32), (uint32) startpoint, startpointTLI))); else ereport(LOG, - (errmsg("restarted WAL streaming at %X/%X on timeline %u", - (uint32) (startpoint >> 32), (uint32) startpoint, - startpointTLI))); + (errmsg("restarted WAL streaming at %X/%X on timeline %u", + (uint32) (startpoint >> 32), (uint32) startpoint, + startpointTLI))); first_stream = false; /* Initialize LogstreamResult and buffers for processing messages */ @@ -493,7 +493,7 @@ WalReceiverMain(void) */ Assert(wait_fd != PGINVALID_SOCKET); rc = WaitLatchOrSocket(walrcv->latch, - WL_POSTMASTER_DEATH | WL_SOCKET_READABLE | + WL_POSTMASTER_DEATH | WL_SOCKET_READABLE | WL_TIMEOUT | WL_LATCH_SET, wait_fd, NAPTIME_PER_CYCLE, @@ -560,7 +560,7 @@ WalReceiverMain(void) if (!ping_sent) { timeout = TimestampTzPlusMilliseconds(last_recv_timestamp, - (wal_receiver_timeout / 2)); + (wal_receiver_timeout / 2)); if (now >= timeout) { requestReply = true; @@ -1002,9 +1002,9 @@ XLogWalRcvWrite(char *buf, Size nbytes, XLogRecPtr recptr) if (lseek(recvFile, (off_t) startoff, SEEK_SET) < 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("could not seek in log segment %s to offset %u: %m", - XLogFileNameP(recvFileTLI, recvSegNo), - startoff))); + errmsg("could not seek in log segment %s to offset %u: %m", + XLogFileNameP(recvFileTLI, recvSegNo), + startoff))); recvOff = startoff; } @@ -1474,5 +1474,5 @@ pg_stat_get_wal_receiver(PG_FUNCTION_ARGS) /* Returns the record as Datum */ PG_RETURN_DATUM(HeapTupleGetDatum( - heap_form_tuple(tupdesc, values, nulls))); + heap_form_tuple(tupdesc, values, nulls))); } diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index 71057aecfac..82f7b593734 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -487,7 +487,7 @@ SendTimeLineHistory(TimeLineHistoryCmd *cmd) if (lseek(fd, 0, SEEK_SET) != 0) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not seek to beginning of file \"%s\": %m", path))); + errmsg("could not seek to beginning of file \"%s\": %m", path))); pq_sendint(&buf, histfilelen, 4); /* col2 len */ @@ -528,7 +528,7 @@ StartReplication(StartReplicationCmd *cmd) if (ThisTimeLineID == 0) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("IDENTIFY_SYSTEM has not been run before START_REPLICATION"))); + errmsg("IDENTIFY_SYSTEM has not been run before START_REPLICATION"))); /* * We assume here that we're logging enough information in the WAL for @@ -750,7 +750,7 @@ StartReplication(StartReplicationCmd *cmd) */ static int logical_read_xlog_page(XLogReaderState *state, XLogRecPtr targetPagePtr, int reqLen, - XLogRecPtr targetRecPtr, char *cur_page, TimeLineID *pageTLI) + XLogRecPtr targetRecPtr, char *cur_page, TimeLineID *pageTLI) { XLogRecPtr flushptr; int count; @@ -2059,7 +2059,7 @@ WalSndCheckTimeOut(TimestampTz now) * standby. */ ereport(COMMERROR, - (errmsg("terminating walsender process due to replication timeout"))); + (errmsg("terminating walsender process due to replication timeout"))); WalSndShutdown(); } @@ -2147,8 +2147,8 @@ WalSndLoop(WalSndSendDataCallback send_data) if (MyWalSnd->state == WALSNDSTATE_CATCHUP) { ereport(DEBUG1, - (errmsg("standby \"%s\" has now caught up with primary", - application_name))); + (errmsg("standby \"%s\" has now caught up with primary", + application_name))); WalSndSetState(WALSNDSTATE_STREAMING); } @@ -2372,7 +2372,7 @@ retry: ereport(ERROR, (errcode_for_file_access(), errmsg("requested WAL segment %s has already been removed", - XLogFileNameP(curFileTimeLine, sendSegNo)))); + XLogFileNameP(curFileTimeLine, sendSegNo)))); else ereport(ERROR, (errcode_for_file_access(), @@ -2388,9 +2388,9 @@ retry: if (lseek(sendFile, (off_t) startoff, SEEK_SET) < 0) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not seek in log segment %s to offset %u: %m", - XLogFileNameP(curFileTimeLine, sendSegNo), - startoff))); + errmsg("could not seek in log segment %s to offset %u: %m", + XLogFileNameP(curFileTimeLine, sendSegNo), + startoff))); sendOff = startoff; } diff --git a/src/backend/rewrite/rewriteDefine.c b/src/backend/rewrite/rewriteDefine.c index 5b948f03f24..9e6865bef64 100644 --- a/src/backend/rewrite/rewriteDefine.c +++ b/src/backend/rewrite/rewriteDefine.c @@ -160,7 +160,7 @@ InsertRule(char *rulname, referenced.objectSubId = 0; recordDependencyOn(&myself, &referenced, - (evtype == CMD_SELECT) ? DEPENDENCY_INTERNAL : DEPENDENCY_AUTO); + (evtype == CMD_SELECT) ? DEPENDENCY_INTERNAL : DEPENDENCY_AUTO); /* * Also install dependencies on objects referenced in action and qual. @@ -312,7 +312,7 @@ DefineQueryRewrite(char *rulename, if (list_length(action) == 0) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("INSTEAD NOTHING rules on SELECT are not implemented"), + errmsg("INSTEAD NOTHING rules on SELECT are not implemented"), errhint("Use views instead."))); /* @@ -331,7 +331,7 @@ DefineQueryRewrite(char *rulename, query->commandType != CMD_SELECT) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("rules on SELECT must have action INSTEAD SELECT"))); + errmsg("rules on SELECT must have action INSTEAD SELECT"))); /* * ... it cannot contain data-modifying WITH ... @@ -373,9 +373,9 @@ DefineQueryRewrite(char *rulename, rule = event_relation->rd_rules->rules[i]; if (rule->event == CMD_SELECT) ereport(ERROR, - (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("\"%s\" is already a view", - RelationGetRelationName(event_relation)))); + (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), + errmsg("\"%s\" is already a view", + RelationGetRelationName(event_relation)))); } } @@ -425,14 +425,14 @@ DefineQueryRewrite(char *rulename, if (event_relation->rd_rel->relkind == RELKIND_PARTITIONED_TABLE) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("could not convert partitioned table \"%s\" to a view", - RelationGetRelationName(event_relation)))); + errmsg("could not convert partitioned table \"%s\" to a view", + RelationGetRelationName(event_relation)))); if (event_relation->rd_rel->relispartition) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("could not convert partition \"%s\" to a view", - RelationGetRelationName(event_relation)))); + errmsg("could not convert partition \"%s\" to a view", + RelationGetRelationName(event_relation)))); snapshot = RegisterSnapshot(GetLatestSnapshot()); scanDesc = heap_beginscan(event_relation, snapshot, 0, NULL); @@ -499,7 +499,7 @@ DefineQueryRewrite(char *rulename, if (haveReturning) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot have multiple RETURNING lists in a rule"))); + errmsg("cannot have multiple RETURNING lists in a rule"))); haveReturning = true; if (event_qual != NULL) ereport(ERROR, @@ -673,7 +673,7 @@ checkRuleResultList(List *targetList, TupleDesc resultDesc, bool isSelect, ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), isSelect ? - errmsg("SELECT rule's target list has too many entries") : + errmsg("SELECT rule's target list has too many entries") : errmsg("RETURNING list has too many entries"))); attr = resultDesc->attrs[i - 1]; diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c index 248f0cc872e..622521630d7 100644 --- a/src/backend/rewrite/rewriteHandler.c +++ b/src/backend/rewrite/rewriteHandler.c @@ -260,7 +260,7 @@ AcquireRewriteLocks(Query *parsetree, AcquireRewriteLocks(rte->subquery, forExecute, (forUpdatePushedDown || - get_parse_rowmark(parsetree, rt_index) != NULL)); + get_parse_rowmark(parsetree, rt_index) != NULL)); break; default: @@ -600,7 +600,7 @@ rewriteRuleAction(Query *parsetree, if (*returning_flag) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot have RETURNING lists in multiple rules"))); + errmsg("cannot have RETURNING lists in multiple rules"))); *returning_flag = true; rule_action->returningList = (List *) ReplaceVarsFromTargetList((Node *) parsetree->returningList, @@ -806,7 +806,7 @@ rewriteTargetListIU(List *targetList, * tlist entry is a DEFAULT placeholder node. */ apply_default = ((new_tle == NULL && commandType == CMD_INSERT) || - (new_tle && new_tle->expr && IsA(new_tle->expr, SetToDefault))); + (new_tle && new_tle->expr && IsA(new_tle->expr, SetToDefault))); if (commandType == CMD_INSERT) { @@ -818,7 +818,7 @@ rewriteTargetListIU(List *targetList, errmsg("cannot insert into column \"%s\"", NameStr(att_tup->attname)), errdetail("Column \"%s\" is an identity column defined as GENERATED ALWAYS.", NameStr(att_tup->attname)), - errhint("Use OVERRIDING SYSTEM VALUE to override."))); + errhint("Use OVERRIDING SYSTEM VALUE to override."))); } if (att_tup->attidentity == ATTRIBUTE_IDENTITY_BY_DEFAULT && override == OVERRIDING_USER_VALUE) @@ -1142,7 +1142,7 @@ build_column_default(Relation rel, int attrno) NameStr(att_tup->attname), format_type_be(atttype), format_type_be(exprtype)), - errhint("You will need to rewrite or cast the expression."))); + errhint("You will need to rewrite or cast the expression."))); return expr; } @@ -1701,7 +1701,7 @@ fireRIRrules(Query *parsetree, List *activeRIRs, bool forUpdatePushedDown) { rte->subquery = fireRIRrules(rte->subquery, activeRIRs, (forUpdatePushedDown || - get_parse_rowmark(parsetree, rt_index) != NULL)); + get_parse_rowmark(parsetree, rt_index) != NULL)); continue; } @@ -1902,7 +1902,7 @@ fireRIRrules(Query *parsetree, List *activeRIRs, bool forUpdatePushedDown) rte->securityQuals); parsetree->withCheckOptions = list_concat(withCheckOptions, - parsetree->withCheckOptions); + parsetree->withCheckOptions); } /* @@ -2629,7 +2629,7 @@ adjust_view_column_set(Bitmapset *cols, List *targetlist) continue; var = castNode(Var, tle->expr); result = bms_add_member(result, - var->varattno - FirstLowInvalidHeapAttributeNumber); + var->varattno - FirstLowInvalidHeapAttributeNumber); } } else @@ -2646,7 +2646,7 @@ adjust_view_column_set(Bitmapset *cols, List *targetlist) Var *var = (Var *) tle->expr; result = bms_add_member(result, - var->varattno - FirstLowInvalidHeapAttributeNumber); + var->varattno - FirstLowInvalidHeapAttributeNumber); } else elog(ERROR, "attribute number %d not found in view targetlist", @@ -2750,7 +2750,7 @@ rewriteTargetView(Query *parsetree, Relation view) if (!tle->resjunk) modified_cols = bms_add_member(modified_cols, - tle->resno - FirstLowInvalidHeapAttributeNumber); + tle->resno - FirstLowInvalidHeapAttributeNumber); } if (parsetree->onConflict) @@ -2761,7 +2761,7 @@ rewriteTargetView(Query *parsetree, Relation view) if (!tle->resjunk) modified_cols = bms_add_member(modified_cols, - tle->resno - FirstLowInvalidHeapAttributeNumber); + tle->resno - FirstLowInvalidHeapAttributeNumber); } } @@ -2780,18 +2780,18 @@ rewriteTargetView(Query *parsetree, Relation view) case CMD_INSERT: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot insert into column \"%s\" of view \"%s\"", - non_updatable_col, - RelationGetRelationName(view)), - errdetail_internal("%s", _(auto_update_detail)))); + errmsg("cannot insert into column \"%s\" of view \"%s\"", + non_updatable_col, + RelationGetRelationName(view)), + errdetail_internal("%s", _(auto_update_detail)))); break; case CMD_UPDATE: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot update column \"%s\" of view \"%s\"", - non_updatable_col, - RelationGetRelationName(view)), - errdetail_internal("%s", _(auto_update_detail)))); + errmsg("cannot update column \"%s\" of view \"%s\"", + non_updatable_col, + RelationGetRelationName(view)), + errdetail_internal("%s", _(auto_update_detail)))); break; default: elog(ERROR, "unrecognized CmdType: %d", @@ -3277,10 +3277,10 @@ RewriteQuery(Query *parsetree, List *rewrite_events) /* Process the main targetlist ... */ parsetree->targetList = rewriteTargetListIU(parsetree->targetList, - parsetree->commandType, - parsetree->override, + parsetree->commandType, + parsetree->override, rt_entry_relation, - parsetree->resultRelation, + parsetree->resultRelation, &attrnos); /* ... and the VALUES expression lists */ rewriteValuesRTE(values_rte, rt_entry_relation, attrnos); @@ -3398,7 +3398,7 @@ RewriteQuery(Query *parsetree, List *rewrite_events) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), errmsg("infinite recursion detected in rules for relation \"%s\"", - RelationGetRelationName(rt_entry_relation)))); + RelationGetRelationName(rt_entry_relation)))); } rev = (rewrite_event *) palloc(sizeof(rewrite_event)); @@ -3435,21 +3435,21 @@ RewriteQuery(Query *parsetree, List *rewrite_events) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("cannot perform INSERT RETURNING on relation \"%s\"", - RelationGetRelationName(rt_entry_relation)), + RelationGetRelationName(rt_entry_relation)), errhint("You need an unconditional ON INSERT DO INSTEAD rule with a RETURNING clause."))); break; case CMD_UPDATE: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("cannot perform UPDATE RETURNING on relation \"%s\"", - RelationGetRelationName(rt_entry_relation)), + RelationGetRelationName(rt_entry_relation)), errhint("You need an unconditional ON UPDATE DO INSTEAD rule with a RETURNING clause."))); break; case CMD_DELETE: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("cannot perform DELETE RETURNING on relation \"%s\"", - RelationGetRelationName(rt_entry_relation)), + RelationGetRelationName(rt_entry_relation)), errhint("You need an unconditional ON DELETE DO INSTEAD rule with a RETURNING clause."))); break; default: diff --git a/src/backend/rewrite/rewriteManip.c b/src/backend/rewrite/rewriteManip.c index da02cfd25ca..b89b435da02 100644 --- a/src/backend/rewrite/rewriteManip.c +++ b/src/backend/rewrite/rewriteManip.c @@ -1000,7 +1000,7 @@ AddQual(Query *parsetree, Node *qual) else ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("conditional utility statements are not implemented"))); + errmsg("conditional utility statements are not implemented"))); } if (parsetree->setOperations != NULL) @@ -1166,7 +1166,7 @@ replace_rte_variables_mutator(Node *node, */ ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("WHERE CURRENT OF on a view is not implemented"))); + errmsg("WHERE CURRENT OF on a view is not implemented"))); } /* otherwise fall through to copy the expr normally */ } @@ -1397,7 +1397,7 @@ ReplaceVarsFromTargetList_callback(Var *var, */ return coerce_to_domain((Node *) makeNullConst(var->vartype, var->vartypmod, - var->varcollid), + var->varcollid), InvalidOid, -1, var->vartype, COERCE_IMPLICIT_CAST, diff --git a/src/backend/rewrite/rowsecurity.c b/src/backend/rewrite/rowsecurity.c index 5a2c78b7955..9e7e54db67b 100644 --- a/src/backend/rewrite/rowsecurity.c +++ b/src/backend/rewrite/rowsecurity.c @@ -293,7 +293,7 @@ get_row_security_policies(Query *root, RangeTblEntry *rte, int rt_index, &select_restrictive_policies); add_with_check_options(rel, rt_index, commandType == CMD_INSERT ? - WCO_RLS_INSERT_CHECK : WCO_RLS_UPDATE_CHECK, + WCO_RLS_INSERT_CHECK : WCO_RLS_UPDATE_CHECK, select_permissive_policies, select_restrictive_policies, withCheckOptions, @@ -343,8 +343,8 @@ get_row_security_policies(Query *root, RangeTblEntry *rte, int rt_index, List *conflict_select_restrictive_policies = NIL; get_policies_for_relation(rel, CMD_SELECT, user_id, - &conflict_select_permissive_policies, - &conflict_select_restrictive_policies); + &conflict_select_permissive_policies, + &conflict_select_restrictive_policies); add_with_check_options(rel, rt_index, WCO_RLS_CONFLICT_CHECK, conflict_select_permissive_policies, diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c index ef131adc915..89dece33504 100644 --- a/src/backend/statistics/dependencies.c +++ b/src/backend/statistics/dependencies.c @@ -49,13 +49,13 @@ typedef struct DependencyGeneratorData typedef DependencyGeneratorData *DependencyGenerator; static void generate_dependencies_recurse(DependencyGenerator state, - int index, AttrNumber start, AttrNumber *current); + int index, AttrNumber start, AttrNumber *current); static void generate_dependencies(DependencyGenerator state); static DependencyGenerator DependencyGenerator_init(int n, int k); static void DependencyGenerator_free(DependencyGenerator state); static AttrNumber *DependencyGenerator_next(DependencyGenerator state); static double dependency_degree(int numrows, HeapTuple *rows, int k, - AttrNumber *dependency, VacAttrStats **stats, Bitmapset *attrs); + AttrNumber *dependency, VacAttrStats **stats, Bitmapset *attrs); static bool dependency_is_fully_matched(MVDependency *dependency, Bitmapset *attnums); static bool dependency_implies_attribute(MVDependency *dependency, @@ -122,7 +122,7 @@ generate_dependencies_recurse(DependencyGenerator state, int index, if (!match) { state->dependencies = (AttrNumber *) repalloc(state->dependencies, - state->k * (state->ndependencies + 1) * sizeof(AttrNumber)); + state->k * (state->ndependencies + 1) * sizeof(AttrNumber)); memcpy(&state->dependencies[(state->k * state->ndependencies)], current, state->k * sizeof(AttrNumber)); state->ndependencies++; @@ -308,7 +308,7 @@ dependency_degree(int numrows, HeapTuple *rows, int k, AttrNumber *dependency, * to the preceding one. */ if (i == numrows || - multi_sort_compare_dims(0, k - 2, &items[i - 1], &items[i], mss) != 0) + multi_sort_compare_dims(0, k - 2, &items[i - 1], &items[i], mss) != 0) { /* * If no violations were found in the group then track the rows of @@ -430,8 +430,8 @@ statext_dependencies_build(int numrows, HeapTuple *rows, Bitmapset *attrs, dependencies->ndeps++; dependencies = (MVDependencies *) repalloc(dependencies, - offsetof(MVDependencies, deps) - + dependencies->ndeps * sizeof(MVDependency)); + offsetof(MVDependencies, deps) + + dependencies->ndeps * sizeof(MVDependency)); dependencies->deps[dependencies->ndeps - 1] = d; } diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c index 73d7ef3c271..db4987bde38 100644 --- a/src/backend/statistics/extended_stats.c +++ b/src/backend/statistics/extended_stats.c @@ -121,7 +121,7 @@ BuildRelationExtStatistics(Relation onerel, double totalrows, stat->columns, stats); else if (t == STATS_EXT_DEPENDENCIES) dependencies = statext_dependencies_build(numrows, rows, - stat->columns, stats); + stat->columns, stats); } /* store the statistics in the catalog */ diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c index 4b8d8926d29..913829233ec 100644 --- a/src/backend/statistics/mvdistinct.c +++ b/src/backend/statistics/mvdistinct.c @@ -101,7 +101,7 @@ statext_ndistinct_build(double totalrows, int numrows, HeapTuple *rows, item->attrs = NULL; for (j = 0; j < k; j++) item->attrs = bms_add_member(item->attrs, - stats[combination[j]]->attr->attnum); + stats[combination[j]]->attr->attnum); item->ndistinct = ndistinct_for_combination(totalrows, numrows, rows, stats, k, combination); @@ -275,8 +275,8 @@ statext_ndistinct_deserialize(bytea *data) if (VARSIZE_ANY_EXHDR(data) < minimum_size) ereport(ERROR, (errcode(ERRCODE_DATA_CORRUPTED), - errmsg("invalid MVNDistinct size %zd (expected at least %zd)", - VARSIZE_ANY_EXHDR(data), minimum_size))); + errmsg("invalid MVNDistinct size %zd (expected at least %zd)", + VARSIZE_ANY_EXHDR(data), minimum_size))); /* * Allocate space for the ndistinct items (no space for each item's diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index ec7460764e5..15795b0c5ad 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -541,7 +541,7 @@ PrefetchBuffer(Relation reln, ForkNumber forkNum, BlockNumber blockNum) if (RELATION_IS_OTHER_TEMP(reln)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot access temporary tables of other sessions"))); + errmsg("cannot access temporary tables of other sessions"))); /* pass it off to localbuf.c */ LocalPrefetchBuffer(reln->rd_smgr, forkNum, blockNum); @@ -804,9 +804,9 @@ ReadBuffer_common(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, bufBlock = isLocalBuf ? LocalBufHdrGetBlock(bufHdr) : BufHdrGetBlock(bufHdr); if (!PageIsNew((Page) bufBlock)) ereport(ERROR, - (errmsg("unexpected data beyond EOF in block %u of relation %s", - blockNum, relpath(smgr->smgr_rnode, forkNum)), - errhint("This has been seen to occur with buggy kernels; consider updating your system."))); + (errmsg("unexpected data beyond EOF in block %u of relation %s", + blockNum, relpath(smgr->smgr_rnode, forkNum)), + errhint("This has been seen to occur with buggy kernels; consider updating your system."))); /* * We *must* do smgrextend before succeeding, else the page will not @@ -1133,9 +1133,9 @@ BufferAlloc(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, /* OK, do the I/O */ TRACE_POSTGRESQL_BUFFER_WRITE_DIRTY_START(forkNum, blockNum, - smgr->smgr_rnode.node.spcNode, - smgr->smgr_rnode.node.dbNode, - smgr->smgr_rnode.node.relNode); + smgr->smgr_rnode.node.spcNode, + smgr->smgr_rnode.node.dbNode, + smgr->smgr_rnode.node.relNode); FlushBuffer(buf, NULL); LWLockRelease(BufferDescriptorGetContentLock(buf)); @@ -1144,9 +1144,9 @@ BufferAlloc(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, &buf->tag); TRACE_POSTGRESQL_BUFFER_WRITE_DIRTY_DONE(forkNum, blockNum, - smgr->smgr_rnode.node.spcNode, - smgr->smgr_rnode.node.dbNode, - smgr->smgr_rnode.node.relNode); + smgr->smgr_rnode.node.spcNode, + smgr->smgr_rnode.node.dbNode, + smgr->smgr_rnode.node.relNode); } else { @@ -3092,7 +3092,7 @@ PrintBufferDescs(void) "[%02d] (freeNext=%d, rel=%s, " "blockNum=%u, flags=0x%x, refcount=%u %d)", i, buf->freeNext, - relpathbackend(buf->tag.rnode, InvalidBackendId, buf->tag.forkNum), + relpathbackend(buf->tag.rnode, InvalidBackendId, buf->tag.forkNum), buf->tag.blockNum, buf->flags, buf->refcount, GetPrivateRefCount(b)); } diff --git a/src/backend/storage/buffer/freelist.c b/src/backend/storage/buffer/freelist.c index e14524bb412..9d8ae6ae8e1 100644 --- a/src/backend/storage/buffer/freelist.c +++ b/src/backend/storage/buffer/freelist.c @@ -674,7 +674,7 @@ StrategyRejectBuffer(BufferAccessStrategy strategy, BufferDesc *buf) /* Don't muck with behavior of normal buffer-replacement strategy */ if (!strategy->current_was_in_ring || - strategy->buffers[strategy->current] != BufferDescriptorGetBuffer(buf)) + strategy->buffers[strategy->current] != BufferDescriptorGetBuffer(buf)) return false; /* diff --git a/src/backend/storage/buffer/localbuf.c b/src/backend/storage/buffer/localbuf.c index c130283f36d..1d540e87e88 100644 --- a/src/backend/storage/buffer/localbuf.c +++ b/src/backend/storage/buffer/localbuf.c @@ -189,7 +189,7 @@ LocalBufferAlloc(SMgrRelation smgr, ForkNumber forkNum, BlockNumber blockNum, /* Found a usable buffer */ LocalRefCount[b]++; ResourceOwnerRememberBuffer(CurrentResourceOwner, - BufferDescriptorGetBuffer(bufHdr)); + BufferDescriptorGetBuffer(bufHdr)); break; } } diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index 5ddc5e1af16..83b061a0362 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -522,7 +522,7 @@ pg_flush_data(int fd, off_t offset, off_t nbytes) /* FATAL error because mapping would remain */ ereport(FATAL, (errcode_for_file_access(), - errmsg("could not munmap() while flushing data: %m"))); + errmsg("could not munmap() while flushing data: %m"))); } return; @@ -1757,8 +1757,8 @@ FileWrite(File file, char *buffer, int amount, uint32 wait_event_info) if (newTotal > (uint64) temp_file_limit * (uint64) 1024) ereport(ERROR, (errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED), - errmsg("temporary file size exceeds temp_file_limit (%dkB)", - temp_file_limit))); + errmsg("temporary file size exceeds temp_file_limit (%dkB)", + temp_file_limit))); } } @@ -2728,7 +2728,7 @@ RemovePgTempFiles(void) continue; snprintf(temp_path, sizeof(temp_path), "pg_tblspc/%s/%s/%s", - spc_de->d_name, TABLESPACE_VERSION_DIRECTORY, PG_TEMP_FILES_DIR); + spc_de->d_name, TABLESPACE_VERSION_DIRECTORY, PG_TEMP_FILES_DIR); RemovePgTempFilesInDir(temp_path); snprintf(temp_path, sizeof(temp_path), "pg_tblspc/%s/%s", diff --git a/src/backend/storage/ipc/dsm.c b/src/backend/storage/ipc/dsm.c index 008cd9145c0..36904d2676f 100644 --- a/src/backend/storage/ipc/dsm.c +++ b/src/backend/storage/ipc/dsm.c @@ -429,7 +429,7 @@ dsm_backend_startup(void) &dsm_control_mapped_size, WARNING); ereport(FATAL, (errcode(ERRCODE_INTERNAL_ERROR), - errmsg("dynamic shared memory control segment is not valid"))); + errmsg("dynamic shared memory control segment is not valid"))); } } #endif @@ -935,7 +935,7 @@ dsm_unpin_segment(dsm_handle handle) * dsm_impl_unpin_segment. */ dsm_impl_unpin_segment(handle, - &dsm_control->item[control_slot].impl_private_pm_handle); + &dsm_control->item[control_slot].impl_private_pm_handle); /* Note that 1 means no references (0 means unused slot). */ if (--dsm_control->item[control_slot].refcnt == 1) diff --git a/src/backend/storage/ipc/dsm_impl.c b/src/backend/storage/ipc/dsm_impl.c index d101c717d36..1500465d31c 100644 --- a/src/backend/storage/ipc/dsm_impl.c +++ b/src/backend/storage/ipc/dsm_impl.c @@ -258,8 +258,8 @@ dsm_impl_posix(dsm_op op, dsm_handle handle, Size request_size, { ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not unmap shared memory segment \"%s\": %m", - name))); + errmsg("could not unmap shared memory segment \"%s\": %m", + name))); return false; } *mapped_address = NULL; @@ -268,8 +268,8 @@ dsm_impl_posix(dsm_op op, dsm_handle handle, Size request_size, { ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not remove shared memory segment \"%s\": %m", - name))); + errmsg("could not remove shared memory segment \"%s\": %m", + name))); return false; } return true; @@ -358,8 +358,8 @@ dsm_impl_posix(dsm_op op, dsm_handle handle, Size request_size, ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not unmap shared memory segment \"%s\": %m", - name))); + errmsg("could not unmap shared memory segment \"%s\": %m", + name))); return false; } *mapped_address = NULL; @@ -530,8 +530,8 @@ dsm_impl_sysv(dsm_op op, dsm_handle handle, Size request_size, { ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not unmap shared memory segment \"%s\": %m", - name))); + errmsg("could not unmap shared memory segment \"%s\": %m", + name))); return false; } *mapped_address = NULL; @@ -540,8 +540,8 @@ dsm_impl_sysv(dsm_op op, dsm_handle handle, Size request_size, { ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not remove shared memory segment \"%s\": %m", - name))); + errmsg("could not remove shared memory segment \"%s\": %m", + name))); return false; } return true; @@ -645,8 +645,8 @@ dsm_impl_windows(dsm_op op, dsm_handle handle, Size request_size, _dosmaperr(GetLastError()); ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not unmap shared memory segment \"%s\": %m", - name))); + errmsg("could not unmap shared memory segment \"%s\": %m", + name))); return false; } if (*impl_private != NULL @@ -655,8 +655,8 @@ dsm_impl_windows(dsm_op op, dsm_handle handle, Size request_size, _dosmaperr(GetLastError()); ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not remove shared memory segment \"%s\": %m", - name))); + errmsg("could not remove shared memory segment \"%s\": %m", + name))); return false; } @@ -711,8 +711,8 @@ dsm_impl_windows(dsm_op op, dsm_handle handle, Size request_size, _dosmaperr(errcode); ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not create shared memory segment \"%s\": %m", - name))); + errmsg("could not create shared memory segment \"%s\": %m", + name))); return false; } } @@ -816,8 +816,8 @@ dsm_impl_mmap(dsm_op op, dsm_handle handle, Size request_size, { ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not unmap shared memory segment \"%s\": %m", - name))); + errmsg("could not unmap shared memory segment \"%s\": %m", + name))); return false; } *mapped_address = NULL; @@ -826,8 +826,8 @@ dsm_impl_mmap(dsm_op op, dsm_handle handle, Size request_size, { ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not remove shared memory segment \"%s\": %m", - name))); + errmsg("could not remove shared memory segment \"%s\": %m", + name))); return false; } return true; @@ -960,8 +960,8 @@ dsm_impl_mmap(dsm_op op, dsm_handle handle, Size request_size, ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not unmap shared memory segment \"%s\": %m", - name))); + errmsg("could not unmap shared memory segment \"%s\": %m", + name))); return false; } *mapped_address = NULL; @@ -1026,8 +1026,8 @@ dsm_impl_pin_segment(dsm_handle handle, void *impl_private, _dosmaperr(GetLastError()); ereport(ERROR, (errcode_for_dynamic_shared_memory(), - errmsg("could not duplicate handle for \"%s\": %m", - name))); + errmsg("could not duplicate handle for \"%s\": %m", + name))); } /* @@ -1074,8 +1074,8 @@ dsm_impl_unpin_segment(dsm_handle handle, void **impl_private) _dosmaperr(GetLastError()); ereport(ERROR, (errcode_for_dynamic_shared_memory(), - errmsg("could not duplicate handle for \"%s\": %m", - name))); + errmsg("could not duplicate handle for \"%s\": %m", + name))); } *impl_private = NULL; diff --git a/src/backend/storage/ipc/ipc.c b/src/backend/storage/ipc/ipc.c index ffd91f5b0a6..90dee4f51a5 100644 --- a/src/backend/storage/ipc/ipc.c +++ b/src/backend/storage/ipc/ipc.c @@ -198,7 +198,7 @@ proc_exit_prepare(int code) */ while (--on_proc_exit_index >= 0) (*on_proc_exit_list[on_proc_exit_index].function) (code, - on_proc_exit_list[on_proc_exit_index].arg); + on_proc_exit_list[on_proc_exit_index].arg); on_proc_exit_index = 0; } @@ -226,7 +226,7 @@ shmem_exit(int code) code, before_shmem_exit_index); while (--before_shmem_exit_index >= 0) (*before_shmem_exit_list[before_shmem_exit_index].function) (code, - before_shmem_exit_list[before_shmem_exit_index].arg); + before_shmem_exit_list[before_shmem_exit_index].arg); before_shmem_exit_index = 0; /* @@ -259,7 +259,7 @@ shmem_exit(int code) code, on_shmem_exit_index); while (--on_shmem_exit_index >= 0) (*on_shmem_exit_list[on_shmem_exit_index].function) (code, - on_shmem_exit_list[on_shmem_exit_index].arg); + on_shmem_exit_list[on_shmem_exit_index].arg); on_shmem_exit_index = 0; } diff --git a/src/backend/storage/ipc/latch.c b/src/backend/storage/ipc/latch.c index 29eb4ea54f6..07b1364de8f 100644 --- a/src/backend/storage/ipc/latch.c +++ b/src/backend/storage/ipc/latch.c @@ -1214,7 +1214,7 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout, } } else if (cur_event->events == WL_POSTMASTER_DEATH && - (cur_pollfd->revents & (POLLIN | POLLHUP | POLLERR | POLLNVAL))) + (cur_pollfd->revents & (POLLIN | POLLHUP | POLLERR | POLLNVAL))) { /* * We expect an POLLHUP when the remote end is closed, but because diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c index 2d6ae23eec5..6eb7c72ec32 100644 --- a/src/backend/storage/ipc/procarray.c +++ b/src/backend/storage/ipc/procarray.c @@ -732,8 +732,8 @@ ProcArrayApplyRecoveryInfo(RunningTransactions running) } else elog(trace_recovery(DEBUG1), - "recovery snapshot waiting for non-overflowed snapshot or " - "until oldest active xid on standby is at least %u (now %u)", + "recovery snapshot waiting for non-overflowed snapshot or " + "until oldest active xid on standby is at least %u (now %u)", standbySnapshotPendingXmin, running->oldestRunningXid); return; @@ -3243,7 +3243,7 @@ RecordKnownAssignedTransactionIds(TransactionId xid) */ void ExpireTreeKnownAssignedTransactionIds(TransactionId xid, int nsubxids, - TransactionId *subxids, TransactionId max_xid) + TransactionId *subxids, TransactionId max_xid) { Assert(standbyState >= STANDBY_INITIALIZED); diff --git a/src/backend/storage/ipc/shm_toc.c b/src/backend/storage/ipc/shm_toc.c index a532f4fa5cf..9f259441f01 100644 --- a/src/backend/storage/ipc/shm_toc.c +++ b/src/backend/storage/ipc/shm_toc.c @@ -253,6 +253,6 @@ Size shm_toc_estimate(shm_toc_estimator *e) { return add_size(offsetof(shm_toc, toc_entry), - add_size(mul_size(e->number_of_keys, sizeof(shm_toc_entry)), - e->space_for_chunks)); + add_size(mul_size(e->number_of_keys, sizeof(shm_toc_entry)), + e->space_for_chunks)); } diff --git a/src/backend/storage/ipc/shmem.c b/src/backend/storage/ipc/shmem.c index e18d4c7e1c0..81c291f6e37 100644 --- a/src/backend/storage/ipc/shmem.c +++ b/src/backend/storage/ipc/shmem.c @@ -418,8 +418,8 @@ ShmemInitStruct(const char *name, Size size, bool *foundPtr) LWLockRelease(ShmemIndexLock); ereport(ERROR, (errcode(ERRCODE_OUT_OF_MEMORY), - errmsg("could not create ShmemIndex entry for data structure \"%s\"", - name))); + errmsg("could not create ShmemIndex entry for data structure \"%s\"", + name))); } if (*foundPtr) @@ -433,9 +433,9 @@ ShmemInitStruct(const char *name, Size size, bool *foundPtr) { LWLockRelease(ShmemIndexLock); ereport(ERROR, - (errmsg("ShmemIndex entry size is wrong for data structure" - " \"%s\": expected %zu, actual %zu", - name, size, result->size))); + (errmsg("ShmemIndex entry size is wrong for data structure" + " \"%s\": expected %zu, actual %zu", + name, size, result->size))); } structPtr = result->location; } diff --git a/src/backend/storage/ipc/sinval.c b/src/backend/storage/ipc/sinval.c index 13f21e0d999..b9a73e92478 100644 --- a/src/backend/storage/ipc/sinval.c +++ b/src/backend/storage/ipc/sinval.c @@ -69,7 +69,7 @@ SendSharedInvalidMessages(const SharedInvalidationMessage *msgs, int n) */ void ReceiveSharedInvalidMessages( - void (*invalFunction) (SharedInvalidationMessage *msg), + void (*invalFunction) (SharedInvalidationMessage *msg), void (*resetFunction) (void)) { #define MAXINVALMSGS 32 diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c index 8e57f933cab..0343cc6bdfc 100644 --- a/src/backend/storage/ipc/standby.c +++ b/src/backend/storage/ipc/standby.c @@ -284,7 +284,7 @@ ResolveRecoveryConflictWithSnapshot(TransactionId latestRemovedXid, RelFileNode node.dbNode); ResolveRecoveryConflictWithVirtualXIDs(backends, - PROCSIG_RECOVERY_CONFLICT_SNAPSHOT); + PROCSIG_RECOVERY_CONFLICT_SNAPSHOT); } void @@ -312,7 +312,7 @@ ResolveRecoveryConflictWithTablespace(Oid tsid) temp_file_users = GetConflictingVirtualXIDs(InvalidTransactionId, InvalidOid); ResolveRecoveryConflictWithVirtualXIDs(temp_file_users, - PROCSIG_RECOVERY_CONFLICT_TABLESPACE); + PROCSIG_RECOVERY_CONFLICT_TABLESPACE); } void @@ -376,7 +376,7 @@ ResolveRecoveryConflictWithLock(LOCKTAG locktag) backends = GetLockConflicts(&locktag, AccessExclusiveLock); ResolveRecoveryConflictWithVirtualXIDs(backends, - PROCSIG_RECOVERY_CONFLICT_LOCK); + PROCSIG_RECOVERY_CONFLICT_LOCK); } else { @@ -529,7 +529,7 @@ CheckRecoveryConflictDeadlock(void) ereport(ERROR, (errcode(ERRCODE_T_R_DEADLOCK_DETECTED), errmsg("canceling statement due to conflict with recovery"), - errdetail("User transaction caused buffer deadlock with recovery."))); + errdetail("User transaction caused buffer deadlock with recovery."))); } @@ -986,7 +986,7 @@ LogCurrentRunningXacts(RunningTransactions CurrRunningXacts) /* array of TransactionIds */ if (xlrec.xcnt > 0) XLogRegisterData((char *) CurrRunningXacts->xids, - (xlrec.xcnt + xlrec.subxcnt) * sizeof(TransactionId)); + (xlrec.xcnt + xlrec.subxcnt) * sizeof(TransactionId)); recptr = XLogInsert(RM_STANDBY_ID, XLOG_RUNNING_XACTS); diff --git a/src/backend/storage/large_object/inv_api.c b/src/backend/storage/large_object/inv_api.c index 154516ff365..d55d40e6f81 100644 --- a/src/backend/storage/large_object/inv_api.c +++ b/src/backend/storage/large_object/inv_api.c @@ -445,8 +445,8 @@ inv_seek(LargeObjectDesc *obj_desc, int64 offset, int whence) if (newoffset < 0 || newoffset > MAX_LARGE_OBJECT_SIZE) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg_internal("invalid large object seek target: " INT64_FORMAT, - newoffset))); + errmsg_internal("invalid large object seek target: " INT64_FORMAT, + newoffset))); obj_desc->offset = newoffset; return newoffset; diff --git a/src/backend/storage/lmgr/deadlock.c b/src/backend/storage/lmgr/deadlock.c index d1a9ec8a48e..5e49c789057 100644 --- a/src/backend/storage/lmgr/deadlock.c +++ b/src/backend/storage/lmgr/deadlock.c @@ -527,8 +527,8 @@ FindLockCycleRecurse(PGPROC *checkProc, if (memberProc->links.next != NULL && memberProc->waitLock != NULL && memberProc != checkProc && - FindLockCycleRecurseMember(memberProc, checkProc, depth, softEdges, - nSoftEdges)) + FindLockCycleRecurseMember(memberProc, checkProc, depth, softEdges, + nSoftEdges)) return true; } @@ -1030,7 +1030,7 @@ TopoSort(LOCK *lock, for (c = 0; c <= last; ++c) { if (topoProcs[c] == proc || (topoProcs[c] != NULL && - topoProcs[c]->lockGroupLeader == proc)) + topoProcs[c]->lockGroupLeader == proc)) { ordering[i - nmatches] = topoProcs[c]; topoProcs[c] = NULL; @@ -1106,7 +1106,7 @@ DeadLockReport(void) appendStringInfoChar(&clientbuf, '\n'); appendStringInfo(&clientbuf, - _("Process %d waits for %s on %s; blocked by process %d."), + _("Process %d waits for %s on %s; blocked by process %d."), info->pid, GetLockmodeName(info->locktag.locktag_lockmethodid, info->lockmode), @@ -1127,7 +1127,7 @@ DeadLockReport(void) appendStringInfo(&logbuf, _("Process %d: %s"), info->pid, - pgstat_get_backend_current_activity(info->pid, false)); + pgstat_get_backend_current_activity(info->pid, false)); } pgstat_report_deadlock(); diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c index 19cec580c3e..2b261739241 100644 --- a/src/backend/storage/lmgr/lock.c +++ b/src/backend/storage/lmgr/lock.c @@ -401,7 +401,7 @@ InitLocks(void) init_table_size, max_table_size, &info, - HASH_ELEM | HASH_BLOBS | HASH_PARTITION); + HASH_ELEM | HASH_BLOBS | HASH_PARTITION); /* Assume an average of 2 holders per lock */ max_table_size *= 2; @@ -420,7 +420,7 @@ InitLocks(void) init_table_size, max_table_size, &info, - HASH_ELEM | HASH_FUNCTION | HASH_PARTITION); + HASH_ELEM | HASH_FUNCTION | HASH_PARTITION); /* * Allocate fast-path structures. @@ -772,7 +772,7 @@ LockAcquireExtended(const LOCKTAG *locktag, locallock->lockOwners = NULL; /* in case next line fails */ locallock->lockOwners = (LOCALLOCKOWNER *) MemoryContextAlloc(TopMemoryContext, - locallock->maxLockOwners * sizeof(LOCALLOCKOWNER)); + locallock->maxLockOwners * sizeof(LOCALLOCKOWNER)); } else { @@ -2207,7 +2207,7 @@ LockReleaseAll(LOCKMETHODID lockmethodid, bool allLocks) LWLockAcquire(partitionLock, LW_EXCLUSIVE); for (proclock = (PROCLOCK *) SHMQueueNext(procLocks, procLocks, - offsetof(PROCLOCK, procLink)); + offsetof(PROCLOCK, procLink)); proclock; proclock = nextplock) { @@ -2605,7 +2605,7 @@ FastPathTransferRelationLocks(LockMethod lockMethodTable, const LOCKTAG *locktag /* Find or create lock object. */ LWLockAcquire(partitionLock, LW_EXCLUSIVE); for (lockmode = FAST_PATH_LOCKNUMBER_OFFSET; - lockmode < FAST_PATH_LOCKNUMBER_OFFSET + FAST_PATH_BITS_PER_SLOT; + lockmode < FAST_PATH_LOCKNUMBER_OFFSET + FAST_PATH_BITS_PER_SLOT; ++lockmode) { PROCLOCK *proclock; @@ -2772,7 +2772,7 @@ GetLockConflicts(const LOCKTAG *locktag, LOCKMODE lockmode) if (vxids == NULL) vxids = (VirtualTransactionId *) MemoryContextAlloc(TopMemoryContext, - sizeof(VirtualTransactionId) * (MaxBackends + 1)); + sizeof(VirtualTransactionId) * (MaxBackends + 1)); } else vxids = (VirtualTransactionId *) @@ -3270,7 +3270,7 @@ PostPrepare_Locks(TransactionId xid) LWLockAcquire(partitionLock, LW_EXCLUSIVE); for (proclock = (PROCLOCK *) SHMQueueNext(procLocks, procLocks, - offsetof(PROCLOCK, procLink)); + offsetof(PROCLOCK, procLink)); proclock; proclock = nextplock) { @@ -4002,7 +4002,7 @@ lock_twophase_recover(TransactionId xid, uint16 info, ereport(ERROR, (errcode(ERRCODE_OUT_OF_MEMORY), errmsg("out of shared memory"), - errhint("You might need to increase max_locks_per_transaction."))); + errhint("You might need to increase max_locks_per_transaction."))); } /* @@ -4067,7 +4067,7 @@ lock_twophase_recover(TransactionId xid, uint16 info, ereport(ERROR, (errcode(ERRCODE_OUT_OF_MEMORY), errmsg("out of shared memory"), - errhint("You might need to increase max_locks_per_transaction."))); + errhint("You might need to increase max_locks_per_transaction."))); } /* @@ -4156,8 +4156,8 @@ lock_twophase_standby_recover(TransactionId xid, uint16 info, locktag->locktag_type == LOCKTAG_RELATION) { StandbyAcquireAccessExclusiveLock(xid, - locktag->locktag_field1 /* dboid */ , - locktag->locktag_field2 /* reloid */ ); + locktag->locktag_field1 /* dboid */ , + locktag->locktag_field2 /* reloid */ ); } } diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c index 3b355641c25..a4cb4d33add 100644 --- a/src/backend/storage/lmgr/predicate.c +++ b/src/backend/storage/lmgr/predicate.c @@ -1474,7 +1474,7 @@ SummarizeOldestCommittedSxact(void) /* Add to SLRU summary information. */ if (TransactionIdIsValid(sxact->topXid) && !SxactIsReadOnly(sxact)) OldSerXidAdd(sxact->topXid, SxactHasConflictOut(sxact) - ? sxact->SeqNo.earliestOutConflictCommit : InvalidSerCommitSeqNo); + ? sxact->SeqNo.earliestOutConflictCommit : InvalidSerCommitSeqNo); /* Summarize and release the detail. */ ReleaseOneSerializableXact(sxact, false, true); @@ -1754,8 +1754,8 @@ GetSerializableTransactionSnapshotInt(Snapshot snapshot, ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("could not import the requested snapshot"), - errdetail("The source process with pid %d is not running anymore.", - sourcepid))); + errdetail("The source process with pid %d is not running anymore.", + sourcepid))); } /* @@ -1987,17 +1987,17 @@ GetParentPredicateLockTag(const PREDICATELOCKTARGETTAG *tag, case PREDLOCKTAG_PAGE: /* parent lock is relation lock */ SET_PREDICATELOCKTARGETTAG_RELATION(*parent, - GET_PREDICATELOCKTARGETTAG_DB(*tag), - GET_PREDICATELOCKTARGETTAG_RELATION(*tag)); + GET_PREDICATELOCKTARGETTAG_DB(*tag), + GET_PREDICATELOCKTARGETTAG_RELATION(*tag)); return true; case PREDLOCKTAG_TUPLE: /* parent lock is page lock */ SET_PREDICATELOCKTARGETTAG_PAGE(*parent, - GET_PREDICATELOCKTARGETTAG_DB(*tag), - GET_PREDICATELOCKTARGETTAG_RELATION(*tag), - GET_PREDICATELOCKTARGETTAG_PAGE(*tag)); + GET_PREDICATELOCKTARGETTAG_DB(*tag), + GET_PREDICATELOCKTARGETTAG_RELATION(*tag), + GET_PREDICATELOCKTARGETTAG_PAGE(*tag)); return true; } @@ -2393,7 +2393,7 @@ CreatePredicateLock(const PREDICATELOCKTARGETTAG *targettag, locktag.myXact = sxact; lock = (PREDICATELOCK *) hash_search_with_hash_value(PredicateLockHash, &locktag, - PredicateLockHashCodeFromTargetHashCode(&locktag, targettaghash), + PredicateLockHashCodeFromTargetHashCode(&locktag, targettaghash), HASH_ENTER_NULL, &found); if (!lock) ereport(ERROR, @@ -2774,8 +2774,8 @@ TransferPredicateLocksToNewTarget(PREDICATELOCKTARGETTAG oldtargettag, hash_search_with_hash_value (PredicateLockHash, &oldpredlock->tag, - PredicateLockHashCodeFromTargetHashCode(&oldpredlock->tag, - oldtargettaghash), + PredicateLockHashCodeFromTargetHashCode(&oldpredlock->tag, + oldtargettaghash), HASH_REMOVE, &found); Assert(found); } @@ -2783,8 +2783,8 @@ TransferPredicateLocksToNewTarget(PREDICATELOCKTARGETTAG oldtargettag, newpredlock = (PREDICATELOCK *) hash_search_with_hash_value(PredicateLockHash, &newpredlocktag, - PredicateLockHashCodeFromTargetHashCode(&newpredlocktag, - newtargettaghash), + PredicateLockHashCodeFromTargetHashCode(&newpredlocktag, + newtargettaghash), HASH_ENTER_NULL, &found); if (!newpredlock) @@ -3024,8 +3024,8 @@ DropAllPredicateLocksFromTable(Relation relation, bool transfer) newpredlock = (PREDICATELOCK *) hash_search_with_hash_value(PredicateLockHash, &newpredlocktag, - PredicateLockHashCodeFromTargetHashCode(&newpredlocktag, - heaptargettaghash), + PredicateLockHashCodeFromTargetHashCode(&newpredlocktag, + heaptargettaghash), HASH_ENTER, &found); if (!found) @@ -3605,7 +3605,7 @@ ClearOldPredicateLocks(void) LWLockAcquire(SerializableXactHashLock, LW_SHARED); } else if (finishedSxact->commitSeqNo > PredXact->HavePartialClearedThrough - && finishedSxact->commitSeqNo <= PredXact->CanPartialClearThrough) + && finishedSxact->commitSeqNo <= PredXact->CanPartialClearThrough) { /* * Any active transactions that took their snapshot before this @@ -3690,8 +3690,8 @@ ClearOldPredicateLocks(void) SHMQueueDelete(&(predlock->xactLink)); hash_search_with_hash_value(PredicateLockHash, &tag, - PredicateLockHashCodeFromTargetHashCode(&tag, - targettaghash), + PredicateLockHashCodeFromTargetHashCode(&tag, + targettaghash), HASH_REMOVE, NULL); RemoveTargetIfNoLongerUsed(target, targettaghash); @@ -3774,8 +3774,8 @@ ReleaseOneSerializableXact(SERIALIZABLEXACT *sxact, bool partial, SHMQueueDelete(targetLink); hash_search_with_hash_value(PredicateLockHash, &tag, - PredicateLockHashCodeFromTargetHashCode(&tag, - targettaghash), + PredicateLockHashCodeFromTargetHashCode(&tag, + targettaghash), HASH_REMOVE, NULL); if (summarize) { @@ -3784,8 +3784,8 @@ ReleaseOneSerializableXact(SERIALIZABLEXACT *sxact, bool partial, /* Fold into dummy transaction list. */ tag.myXact = OldCommittedSxact; predlock = hash_search_with_hash_value(PredicateLockHash, &tag, - PredicateLockHashCodeFromTargetHashCode(&tag, - targettaghash), + PredicateLockHashCodeFromTargetHashCode(&tag, + targettaghash), HASH_ENTER_NULL, &found); if (!predlock) ereport(ERROR, @@ -4036,7 +4036,7 @@ CheckForSerializableConflictOut(bool visible, Relation relation, (errcode(ERRCODE_T_R_SERIALIZATION_FAILURE), errmsg("could not serialize access due to read/write dependencies among transactions"), errdetail_internal("Reason code: Canceled on conflict out to old pivot %u.", xid), - errhint("The transaction might succeed if retried."))); + errhint("The transaction might succeed if retried."))); if (SxactHasSummaryConflictIn(MySerializableXact) || !SHMQueueEmpty(&MySerializableXact->inConflicts)) @@ -4044,7 +4044,7 @@ CheckForSerializableConflictOut(bool visible, Relation relation, (errcode(ERRCODE_T_R_SERIALIZATION_FAILURE), errmsg("could not serialize access due to read/write dependencies among transactions"), errdetail_internal("Reason code: Canceled on identification as a pivot, with conflict out to old committed transaction %u.", xid), - errhint("The transaction might succeed if retried."))); + errhint("The transaction might succeed if retried."))); MySerializableXact->flags |= SXACT_FLAG_SUMMARY_CONFLICT_OUT; } @@ -4344,8 +4344,8 @@ CheckForSerializableConflictIn(Relation relation, HeapTuple tuple, SET_PREDICATELOCKTARGETTAG_TUPLE(targettag, relation->rd_node.dbNode, relation->rd_id, - ItemPointerGetBlockNumber(&(tuple->t_self)), - ItemPointerGetOffsetNumber(&(tuple->t_self))); + ItemPointerGetBlockNumber(&(tuple->t_self)), + ItemPointerGetOffsetNumber(&(tuple->t_self))); CheckTargetForConflictsIn(&targettag); } @@ -4460,7 +4460,7 @@ CheckTableForSerializableConflictIn(Relation relation) offsetof(PREDICATELOCK, targetLink)); if (predlock->tag.myXact != MySerializableXact - && !RWConflictExists(predlock->tag.myXact, MySerializableXact)) + && !RWConflictExists(predlock->tag.myXact, MySerializableXact)) { FlagRWConflict(predlock->tag.myXact, MySerializableXact); } @@ -4541,7 +4541,7 @@ OnConflict_CheckForSerializationFailure(const SERIALIZABLEXACT *reader, *------------------------------------------------------------------------ */ if (SxactIsCommitted(writer) - && (SxactHasConflictOut(writer) || SxactHasSummaryConflictOut(writer))) + && (SxactHasConflictOut(writer) || SxactHasSummaryConflictOut(writer))) failure = true; /*------------------------------------------------------------------------ @@ -4585,7 +4585,7 @@ OnConflict_CheckForSerializationFailure(const SERIALIZABLEXACT *reader, && (!SxactIsCommitted(writer) || t2->prepareSeqNo <= writer->commitSeqNo) && (!SxactIsReadOnly(reader) - || t2->prepareSeqNo <= reader->SeqNo.lastCommitBeforeSnapshot)) + || t2->prepareSeqNo <= reader->SeqNo.lastCommitBeforeSnapshot)) { failure = true; break; @@ -4630,7 +4630,7 @@ OnConflict_CheckForSerializationFailure(const SERIALIZABLEXACT *reader, && (!SxactIsCommitted(t0) || t0->commitSeqNo >= writer->prepareSeqNo) && (!SxactIsReadOnly(t0) - || t0->SeqNo.lastCommitBeforeSnapshot >= writer->prepareSeqNo)) + || t0->SeqNo.lastCommitBeforeSnapshot >= writer->prepareSeqNo)) { failure = true; break; diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c index b76c170630a..bfa84992ea3 100644 --- a/src/backend/storage/lmgr/proc.c +++ b/src/backend/storage/lmgr/proc.c @@ -1299,8 +1299,8 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable) appendStringInfo(&logbuf, _("Process %d waits for %s on %s."), MyProcPid, - GetLockmodeName(lock->tag.locktag_lockmethodid, - lockmode), + GetLockmodeName(lock->tag.locktag_lockmethodid, + lockmode), locktagbuf.data); /* release lock as quickly as possible */ @@ -1308,9 +1308,9 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable) /* send the autovacuum worker Back to Old Kent Road */ ereport(DEBUG1, - (errmsg("sending cancel to blocking autovacuum PID %d", - pid), - errdetail_log("%s", logbuf.data))); + (errmsg("sending cancel to blocking autovacuum PID %d", + pid), + errdetail_log("%s", logbuf.data))); if (kill(pid, SIGINT) < 0) { @@ -1326,8 +1326,8 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable) */ if (errno != ESRCH) ereport(WARNING, - (errmsg("could not send signal to process %d: %m", - pid))); + (errmsg("could not send signal to process %d: %m", + pid))); } pfree(logbuf.data); @@ -1385,7 +1385,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable) procLocks = &(lock->procLocks); proclock = (PROCLOCK *) SHMQueueNext(procLocks, procLocks, - offsetof(PROCLOCK, lockLink)); + offsetof(PROCLOCK, lockLink)); while (proclock) { @@ -1421,7 +1421,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable) } proclock = (PROCLOCK *) SHMQueueNext(procLocks, &proclock->lockLink, - offsetof(PROCLOCK, lockLink)); + offsetof(PROCLOCK, lockLink)); } LWLockRelease(partitionLock); @@ -1431,7 +1431,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable) (errmsg("process %d avoided deadlock for %s on %s by rearranging queue order after %ld.%03d ms", MyProcPid, modename, buf.data, msecs, usecs), (errdetail_log_plural("Process holding the lock: %s. Wait queue: %s.", - "Processes holding the lock: %s. Wait queue: %s.", + "Processes holding the lock: %s. Wait queue: %s.", lockHoldersNum, lock_holders_sbuf.data, lock_waiters_sbuf.data)))); else if (deadlock_state == DS_HARD_DEADLOCK) { @@ -1446,7 +1446,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable) (errmsg("process %d detected deadlock while waiting for %s on %s after %ld.%03d ms", MyProcPid, modename, buf.data, msecs, usecs), (errdetail_log_plural("Process holding the lock: %s. Wait queue: %s.", - "Processes holding the lock: %s. Wait queue: %s.", + "Processes holding the lock: %s. Wait queue: %s.", lockHoldersNum, lock_holders_sbuf.data, lock_waiters_sbuf.data)))); } @@ -1455,12 +1455,12 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable) (errmsg("process %d still waiting for %s on %s after %ld.%03d ms", MyProcPid, modename, buf.data, msecs, usecs), (errdetail_log_plural("Process holding the lock: %s. Wait queue: %s.", - "Processes holding the lock: %s. Wait queue: %s.", + "Processes holding the lock: %s. Wait queue: %s.", lockHoldersNum, lock_holders_sbuf.data, lock_waiters_sbuf.data)))); else if (myWaitStatus == STATUS_OK) ereport(LOG, - (errmsg("process %d acquired %s on %s after %ld.%03d ms", - MyProcPid, modename, buf.data, msecs, usecs))); + (errmsg("process %d acquired %s on %s after %ld.%03d ms", + MyProcPid, modename, buf.data, msecs, usecs))); else { Assert(myWaitStatus == STATUS_ERROR); @@ -1476,9 +1476,9 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable) if (deadlock_state != DS_HARD_DEADLOCK) ereport(LOG, (errmsg("process %d failed to acquire %s on %s after %ld.%03d ms", - MyProcPid, modename, buf.data, msecs, usecs), + MyProcPid, modename, buf.data, msecs, usecs), (errdetail_log_plural("Process holding the lock: %s. Wait queue: %s.", - "Processes holding the lock: %s. Wait queue: %s.", + "Processes holding the lock: %s. Wait queue: %s.", lockHoldersNum, lock_holders_sbuf.data, lock_waiters_sbuf.data)))); } diff --git a/src/backend/storage/lmgr/s_lock.c b/src/backend/storage/lmgr/s_lock.c index c3cfdfcb448..40d8156331f 100644 --- a/src/backend/storage/lmgr/s_lock.c +++ b/src/backend/storage/lmgr/s_lock.c @@ -145,7 +145,7 @@ perform_spin_delay(SpinDelayStatus *status) /* increase delay by a random fraction between 1X and 2X */ status->cur_delay += (int) (status->cur_delay * - ((double) random() / (double) MAX_RANDOM_VALUE) + 0.5); + ((double) random() / (double) MAX_RANDOM_VALUE) + 0.5); /* wrap back to minimum delay when max is exceeded */ if (status->cur_delay > MAX_DELAY_USEC) status->cur_delay = MIN_DELAY_USEC; diff --git a/src/backend/storage/page/bufpage.c b/src/backend/storage/page/bufpage.c index b6425e409c5..41642eb59c4 100644 --- a/src/backend/storage/page/bufpage.c +++ b/src/backend/storage/page/bufpage.c @@ -557,8 +557,8 @@ PageRepairFragmentation(Page page) if (totallen > (Size) (pd_special - pd_lower)) ereport(ERROR, (errcode(ERRCODE_DATA_CORRUPTED), - errmsg("corrupted item lengths: total %u, available space %u", - (unsigned int) totallen, pd_special - pd_lower))); + errmsg("corrupted item lengths: total %u, available space %u", + (unsigned int) totallen, pd_special - pd_lower))); compactify_tuples(itemidbase, nstorage, page); } @@ -902,8 +902,8 @@ PageIndexMultiDelete(Page page, OffsetNumber *itemnos, int nitems) offset != MAXALIGN(offset)) ereport(ERROR, (errcode(ERRCODE_DATA_CORRUPTED), - errmsg("corrupted item pointer: offset = %u, length = %u", - offset, (unsigned int) size))); + errmsg("corrupted item pointer: offset = %u, length = %u", + offset, (unsigned int) size))); if (nextitm < nitems && offnum == itemnos[nextitm]) { @@ -929,8 +929,8 @@ PageIndexMultiDelete(Page page, OffsetNumber *itemnos, int nitems) if (totallen > (Size) (pd_special - pd_lower)) ereport(ERROR, (errcode(ERRCODE_DATA_CORRUPTED), - errmsg("corrupted item lengths: total %u, available space %u", - (unsigned int) totallen, pd_special - pd_lower))); + errmsg("corrupted item lengths: total %u, available space %u", + (unsigned int) totallen, pd_special - pd_lower))); /* * Looks good. Overwrite the line pointers with the copy, from which we've diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c index c5be21dd91c..65e0abe9ec7 100644 --- a/src/backend/storage/smgr/md.c +++ b/src/backend/storage/smgr/md.c @@ -472,7 +472,7 @@ mdunlinkfork(RelFileNodeBackend rnode, ForkNumber forkNum, bool isRedo) if (errno != ENOENT) ereport(WARNING, (errcode_for_file_access(), - errmsg("could not remove file \"%s\": %m", segpath))); + errmsg("could not remove file \"%s\": %m", segpath))); break; } } @@ -997,9 +997,9 @@ mdtruncate(SMgrRelation reln, ForkNumber forknum, BlockNumber nblocks) if (FileTruncate(v->mdfd_vfd, (off_t) lastsegblocks * BLCKSZ, WAIT_EVENT_DATA_FILE_TRUNCATE) < 0) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not truncate file \"%s\" to %u blocks: %m", - FilePathName(v->mdfd_vfd), - nblocks))); + errmsg("could not truncate file \"%s\" to %u blocks: %m", + FilePathName(v->mdfd_vfd), + nblocks))); if (!SmgrIsTemp(reln)) register_dirty_segment(reln, forknum, v); } @@ -1225,7 +1225,7 @@ mdsync(void) /* Attempt to open and fsync the target segment */ seg = _mdfd_getseg(reln, forknum, - (BlockNumber) segno * (BlockNumber) RELSEG_SIZE, + (BlockNumber) segno * (BlockNumber) RELSEG_SIZE, false, EXTENSION_RETURN_NULL | EXTENSION_DONT_CHECK_SIZE); @@ -1233,7 +1233,7 @@ mdsync(void) INSTR_TIME_SET_CURRENT(sync_start); if (seg != NULL && - FileSync(seg->mdfd_vfd, WAIT_EVENT_DATA_FILE_SYNC) >= 0) + FileSync(seg->mdfd_vfd, WAIT_EVENT_DATA_FILE_SYNC) >= 0) { /* Success; update statistics about sync timing */ INSTR_TIME_SET_CURRENT(sync_end); @@ -1279,8 +1279,8 @@ mdsync(void) else ereport(DEBUG1, (errcode_for_file_access(), - errmsg("could not fsync file \"%s\" but retrying: %m", - path))); + errmsg("could not fsync file \"%s\" but retrying: %m", + path))); pfree(path); /* @@ -1925,9 +1925,9 @@ _mdfd_getseg(SMgrRelation reln, ForkNumber forknum, BlockNumber blkno, return NULL; ereport(ERROR, (errcode_for_file_access(), - errmsg("could not open file \"%s\" (target block %u): %m", - _mdfd_segpath(reln, forknum, nextsegno), - blkno))); + errmsg("could not open file \"%s\" (target block %u): %m", + _mdfd_segpath(reln, forknum, nextsegno), + blkno))); } } diff --git a/src/backend/storage/smgr/smgr.c b/src/backend/storage/smgr/smgr.c index 6955e4c577a..0ca095c4d60 100644 --- a/src/backend/storage/smgr/smgr.c +++ b/src/backend/storage/smgr/smgr.c @@ -46,13 +46,13 @@ typedef struct f_smgr void (*smgr_unlink) (RelFileNodeBackend rnode, ForkNumber forknum, bool isRedo); void (*smgr_extend) (SMgrRelation reln, ForkNumber forknum, - BlockNumber blocknum, char *buffer, bool skipFsync); + BlockNumber blocknum, char *buffer, bool skipFsync); void (*smgr_prefetch) (SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum); void (*smgr_read) (SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum, char *buffer); void (*smgr_write) (SMgrRelation reln, ForkNumber forknum, - BlockNumber blocknum, char *buffer, bool skipFsync); + BlockNumber blocknum, char *buffer, bool skipFsync); void (*smgr_writeback) (SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum, BlockNumber nblocks); BlockNumber (*smgr_nblocks) (SMgrRelation reln, ForkNumber forknum); diff --git a/src/backend/tcop/fastpath.c b/src/backend/tcop/fastpath.c index 90491c9062e..9207d76981a 100644 --- a/src/backend/tcop/fastpath.c +++ b/src/backend/tcop/fastpath.c @@ -108,8 +108,8 @@ GetOldFunctionMessage(StringInfo buf) /* FATAL here since no hope of regaining message sync */ ereport(FATAL, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("invalid argument size %d in function call message", - argsize))); + errmsg("invalid argument size %d in function call message", + argsize))); } /* and arg contents */ if (argsize > 0) @@ -460,8 +460,8 @@ parse_fcall_arguments(StringInfo msgBuf, struct fp_info *fip, if (argsize < 0) ereport(ERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("invalid argument size %d in function call message", - argsize))); + errmsg("invalid argument size %d in function call message", + argsize))); /* Reset abuf to empty, and insert raw data into it */ resetStringInfo(&abuf); @@ -523,8 +523,8 @@ parse_fcall_arguments(StringInfo msgBuf, struct fp_info *fip, if (argsize != -1 && abuf.cursor != abuf.len) ereport(ERROR, (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), - errmsg("incorrect binary data format in function argument %d", - i + 1))); + errmsg("incorrect binary data format in function argument %d", + i + 1))); } else ereport(ERROR, @@ -590,8 +590,8 @@ parse_fcall_arguments_20(StringInfo msgBuf, struct fp_info *fip, if (argsize < 0) ereport(ERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("invalid argument size %d in function call message", - argsize))); + errmsg("invalid argument size %d in function call message", + argsize))); /* Reset abuf to empty, and insert raw data into it */ resetStringInfo(&abuf); @@ -606,8 +606,8 @@ parse_fcall_arguments_20(StringInfo msgBuf, struct fp_info *fip, if (abuf.cursor != abuf.len) ereport(ERROR, (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), - errmsg("incorrect binary data format in function argument %d", - i + 1))); + errmsg("incorrect binary data format in function argument %d", + i + 1))); } /* Desired result format is always binary in protocol 2.0 */ diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 2645cbe6921..b8d860ebdbf 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -379,7 +379,7 @@ SocketBackend(StringInfo inBuf) whereToSendOutput = DestNone; ereport(DEBUG1, (errcode(ERRCODE_CONNECTION_DOES_NOT_EXIST), - errmsg("unexpected EOF on client connection"))); + errmsg("unexpected EOF on client connection"))); } return EOF; } @@ -406,7 +406,7 @@ SocketBackend(StringInfo inBuf) whereToSendOutput = DestNone; ereport(DEBUG1, (errcode(ERRCODE_CONNECTION_DOES_NOT_EXIST), - errmsg("unexpected EOF on client connection"))); + errmsg("unexpected EOF on client connection"))); } return EOF; } @@ -995,7 +995,7 @@ exec_simple_query(const char *query_string) ereport(ERROR, (errcode(ERRCODE_IN_FAILED_SQL_TRANSACTION), errmsg("current transaction is aborted, " - "commands ignored until end of transaction block"), + "commands ignored until end of transaction block"), errdetail_abort())); /* Make sure we are in a transaction command */ @@ -1277,7 +1277,7 @@ exec_parse_message(const char *query_string, /* string to execute */ if (list_length(parsetree_list) > 1) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("cannot insert multiple commands into a prepared statement"))); + errmsg("cannot insert multiple commands into a prepared statement"))); if (parsetree_list != NIL) { @@ -1305,7 +1305,7 @@ exec_parse_message(const char *query_string, /* string to execute */ ereport(ERROR, (errcode(ERRCODE_IN_FAILED_SQL_TRANSACTION), errmsg("current transaction is aborted, " - "commands ignored until end of transaction block"), + "commands ignored until end of transaction block"), errdetail_abort())); /* @@ -1346,8 +1346,8 @@ exec_parse_message(const char *query_string, /* string to execute */ if (ptype == InvalidOid || ptype == UNKNOWNOID) ereport(ERROR, (errcode(ERRCODE_INDETERMINATE_DATATYPE), - errmsg("could not determine data type of parameter $%d", - i + 1))); + errmsg("could not determine data type of parameter $%d", + i + 1))); } if (log_parser_stats) @@ -1540,8 +1540,8 @@ exec_bind_message(StringInfo input_message) if (numPFormats > 1 && numPFormats != numParams) ereport(ERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("bind message has %d parameter formats but %d parameters", - numPFormats, numParams))); + errmsg("bind message has %d parameter formats but %d parameters", + numPFormats, numParams))); if (numParams != psrc->num_params) ereport(ERROR, @@ -2581,10 +2581,10 @@ quickdie(SIGNAL_ARGS) ereport(WARNING, (errcode(ERRCODE_CRASH_SHUTDOWN), errmsg("terminating connection because of crash of another server process"), - errdetail("The postmaster has commanded this server process to roll back" - " the current transaction and exit, because another" - " server process exited abnormally and possibly corrupted" - " shared memory."), + errdetail("The postmaster has commanded this server process to roll back" + " the current transaction and exit, because another" + " server process exited abnormally and possibly corrupted" + " shared memory."), errhint("In a moment you should be able to reconnect to the" " database and repeat your command."))); @@ -2854,8 +2854,10 @@ ProcessInterrupts(void) ereport(DEBUG1, (errmsg("logical replication launcher shutting down"))); - /* The logical replication launcher can be stopped at any time. - * Use exit status 1 so the background worker is restarted. */ + /* + * The logical replication launcher can be stopped at any time. + * Use exit status 1 so the background worker is restarted. + */ proc_exit(1); } else if (RecoveryConflictPending && RecoveryConflictRetryable) @@ -2863,7 +2865,7 @@ ProcessInterrupts(void) pgstat_report_recovery_conflict(RecoveryConflictReason); ereport(FATAL, (errcode(ERRCODE_T_R_SERIALIZATION_FAILURE), - errmsg("terminating connection due to conflict with recovery"), + errmsg("terminating connection due to conflict with recovery"), errdetail_recovery_conflict())); } else if (RecoveryConflictPending) @@ -2873,13 +2875,13 @@ ProcessInterrupts(void) pgstat_report_recovery_conflict(RecoveryConflictReason); ereport(FATAL, (errcode(ERRCODE_DATABASE_DROPPED), - errmsg("terminating connection due to conflict with recovery"), + errmsg("terminating connection due to conflict with recovery"), errdetail_recovery_conflict())); } else ereport(FATAL, (errcode(ERRCODE_ADMIN_SHUTDOWN), - errmsg("terminating connection due to administrator command"))); + errmsg("terminating connection due to administrator command"))); } if (ClientConnectionLost) { @@ -2906,7 +2908,7 @@ ProcessInterrupts(void) pgstat_report_recovery_conflict(RecoveryConflictReason); ereport(FATAL, (errcode(ERRCODE_T_R_SERIALIZATION_FAILURE), - errmsg("terminating connection due to conflict with recovery"), + errmsg("terminating connection due to conflict with recovery"), errdetail_recovery_conflict(), errhint("In a moment you should be able to reconnect to the" " database and repeat your command."))); @@ -2980,7 +2982,7 @@ ProcessInterrupts(void) pgstat_report_recovery_conflict(RecoveryConflictReason); ereport(ERROR, (errcode(ERRCODE_T_R_SERIALIZATION_FAILURE), - errmsg("canceling statement due to conflict with recovery"), + errmsg("canceling statement due to conflict with recovery"), errdetail_recovery_conflict())); } @@ -3120,7 +3122,7 @@ check_stack_depth(void) (errcode(ERRCODE_STATEMENT_TOO_COMPLEX), errmsg("stack depth limit exceeded"), errhint("Increase the configuration parameter \"max_stack_depth\" (currently %dkB), " - "after ensuring the platform's stack depth limit is adequate.", + "after ensuring the platform's stack depth limit is adequate.", max_stack_depth))); } } @@ -3545,13 +3547,13 @@ process_postgres_switches(int argc, char *argv[], GucContext ctx, ereport(FATAL, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("invalid command-line argument for server process: %s", argv[optind]), - errhint("Try \"%s --help\" for more information.", progname))); + errhint("Try \"%s --help\" for more information.", progname))); else ereport(FATAL, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("%s: invalid command-line argument: %s", progname, argv[optind]), - errhint("Try \"%s --help\" for more information.", progname))); + errhint("Try \"%s --help\" for more information.", progname))); } /* @@ -4219,8 +4221,8 @@ PostgresMain(int argc, char *argv[], default: ereport(ERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("invalid CLOSE message subtype %d", - close_type))); + errmsg("invalid CLOSE message subtype %d", + close_type))); break; } @@ -4254,8 +4256,8 @@ PostgresMain(int argc, char *argv[], default: ereport(ERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("invalid DESCRIBE message subtype %d", - describe_type))); + errmsg("invalid DESCRIBE message subtype %d", + describe_type))); break; } } @@ -4429,7 +4431,7 @@ ShowUsage(const char *title) appendStringInfoString(&str, "! system usage stats:\n"); appendStringInfo(&str, - "!\t%ld.%06ld s user, %ld.%06ld s system, %ld.%06ld s elapsed\n", + "!\t%ld.%06ld s user, %ld.%06ld s system, %ld.%06ld s elapsed\n", (long) (r.ru_utime.tv_sec - Save_r.ru_utime.tv_sec), (long) (r.ru_utime.tv_usec - Save_r.ru_utime.tv_usec), (long) (r.ru_stime.tv_sec - Save_r.ru_stime.tv_sec), @@ -4450,21 +4452,21 @@ ShowUsage(const char *title) r.ru_oublock - Save_r.ru_oublock, r.ru_inblock, r.ru_oublock); appendStringInfo(&str, - "!\t%ld/%ld [%ld/%ld] page faults/reclaims, %ld [%ld] swaps\n", + "!\t%ld/%ld [%ld/%ld] page faults/reclaims, %ld [%ld] swaps\n", r.ru_majflt - Save_r.ru_majflt, r.ru_minflt - Save_r.ru_minflt, r.ru_majflt, r.ru_minflt, r.ru_nswap - Save_r.ru_nswap, r.ru_nswap); appendStringInfo(&str, - "!\t%ld [%ld] signals rcvd, %ld/%ld [%ld/%ld] messages rcvd/sent\n", + "!\t%ld [%ld] signals rcvd, %ld/%ld [%ld/%ld] messages rcvd/sent\n", r.ru_nsignals - Save_r.ru_nsignals, r.ru_nsignals, r.ru_msgrcv - Save_r.ru_msgrcv, r.ru_msgsnd - Save_r.ru_msgsnd, r.ru_msgrcv, r.ru_msgsnd); appendStringInfo(&str, - "!\t%ld/%ld [%ld/%ld] voluntary/involuntary context switches\n", + "!\t%ld/%ld [%ld/%ld] voluntary/involuntary context switches\n", r.ru_nvcsw - Save_r.ru_nvcsw, r.ru_nivcsw - Save_r.ru_nivcsw, r.ru_nvcsw, r.ru_nivcsw); @@ -4510,5 +4512,5 @@ log_disconnections(int code, Datum arg) "user=%s database=%s host=%s%s%s", hours, minutes, seconds, msecs, port->user_name, port->database_name, port->remote_host, - port->remote_port[0] ? " port=" : "", port->remote_port))); + port->remote_port[0] ? " port=" : "", port->remote_port))); } diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c index 756249ef4b7..7e820d05dd9 100644 --- a/src/backend/tcop/pquery.c +++ b/src/backend/tcop/pquery.c @@ -1177,7 +1177,7 @@ PortalRunUtility(Portal portal, PlannedStmt *pstmt, ProcessUtility(pstmt, portal->sourceText, - isTopLevel ? PROCESS_UTILITY_TOPLEVEL : PROCESS_UTILITY_QUERY, + isTopLevel ? PROCESS_UTILITY_TOPLEVEL : PROCESS_UTILITY_QUERY, portal->portalParams, portal->queryEnv, dest, diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index b0e8a84c62e..ddacac87747 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -294,8 +294,8 @@ CheckRestrictedOperation(const char *cmdname) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), /* translator: %s is name of a SQL command, eg PREPARE */ - errmsg("cannot execute %s within security-restricted operation", - cmdname))); + errmsg("cannot execute %s within security-restricted operation", + cmdname))); } @@ -1024,7 +1024,7 @@ ProcessUtilitySlow(ParseState *pstate, * table */ toast_options = transformRelOptions((Datum) 0, - ((CreateStmt *) stmt)->options, + ((CreateStmt *) stmt)->options, "toast", validnsps, true, @@ -1165,8 +1165,8 @@ ProcessUtilitySlow(ParseState *pstate, } else ereport(NOTICE, - (errmsg("relation \"%s\" does not exist, skipping", - atstmt->relation->relname))); + (errmsg("relation \"%s\" does not exist, skipping", + atstmt->relation->relname))); } /* ALTER TABLE stashes commands internally */ @@ -1464,7 +1464,7 @@ ProcessUtilitySlow(ParseState *pstate, PG_TRY(); { address = ExecRefreshMatView((RefreshMatViewStmt *) parsetree, - queryString, params, completionTag); + queryString, params, completionTag); } PG_CATCH(); { diff --git a/src/backend/tsearch/dict.c b/src/backend/tsearch/dict.c index ba8a3d79a83..63655fb592d 100644 --- a/src/backend/tsearch/dict.c +++ b/src/backend/tsearch/dict.c @@ -37,19 +37,19 @@ ts_lexize(PG_FUNCTION_ARGS) dict = lookup_ts_dictionary_cache(dictId); res = (TSLexeme *) DatumGetPointer(FunctionCall4(&dict->lexize, - PointerGetDatum(dict->dictData), - PointerGetDatum(VARDATA_ANY(in)), - Int32GetDatum(VARSIZE_ANY_EXHDR(in)), - PointerGetDatum(&dstate))); + PointerGetDatum(dict->dictData), + PointerGetDatum(VARDATA_ANY(in)), + Int32GetDatum(VARSIZE_ANY_EXHDR(in)), + PointerGetDatum(&dstate))); if (dstate.getnext) { dstate.isend = true; ptr = (TSLexeme *) DatumGetPointer(FunctionCall4(&dict->lexize, - PointerGetDatum(dict->dictData), - PointerGetDatum(VARDATA_ANY(in)), - Int32GetDatum(VARSIZE_ANY_EXHDR(in)), - PointerGetDatum(&dstate))); + PointerGetDatum(dict->dictData), + PointerGetDatum(VARDATA_ANY(in)), + Int32GetDatum(VARSIZE_ANY_EXHDR(in)), + PointerGetDatum(&dstate))); if (ptr != NULL) res = ptr; } diff --git a/src/backend/tsearch/dict_ispell.c b/src/backend/tsearch/dict_ispell.c index b4576bf1f87..8f61bd2830a 100644 --- a/src/backend/tsearch/dict_ispell.c +++ b/src/backend/tsearch/dict_ispell.c @@ -51,8 +51,8 @@ dispell_init(PG_FUNCTION_ARGS) (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("multiple DictFile parameters"))); NIImportDictionary(&(d->obj), - get_tsearch_config_filename(defGetString(defel), - "dict")); + get_tsearch_config_filename(defGetString(defel), + "dict")); dictloaded = true; } else if (pg_strcasecmp(defel->defname, "AffFile") == 0) diff --git a/src/backend/tsearch/dict_simple.c b/src/backend/tsearch/dict_simple.c index c3613628800..a13cdc0743f 100644 --- a/src/backend/tsearch/dict_simple.c +++ b/src/backend/tsearch/dict_simple.c @@ -63,8 +63,8 @@ dsimple_init(PG_FUNCTION_ARGS) { ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("unrecognized simple dictionary parameter: \"%s\"", - defel->defname))); + errmsg("unrecognized simple dictionary parameter: \"%s\"", + defel->defname))); } } diff --git a/src/backend/tsearch/dict_thesaurus.c b/src/backend/tsearch/dict_thesaurus.c index ccf057b5d64..1b6085add3a 100644 --- a/src/backend/tsearch/dict_thesaurus.c +++ b/src/backend/tsearch/dict_thesaurus.c @@ -410,10 +410,10 @@ compileTheLexeme(DictThesaurus *d) else { ptr = (TSLexeme *) DatumGetPointer(FunctionCall4(&(d->subdict->lexize), - PointerGetDatum(d->subdict->dictData), - PointerGetDatum(d->wrds[i].lexeme), - Int32GetDatum(strlen(d->wrds[i].lexeme)), - PointerGetDatum(NULL))); + PointerGetDatum(d->subdict->dictData), + PointerGetDatum(d->wrds[i].lexeme), + Int32GetDatum(strlen(d->wrds[i].lexeme)), + PointerGetDatum(NULL))); if (!ptr) ereport(ERROR, @@ -535,11 +535,11 @@ compileTheSubstitute(DictThesaurus *d) { lexized = (TSLexeme *) DatumGetPointer( FunctionCall4( - &(d->subdict->lexize), - PointerGetDatum(d->subdict->dictData), - PointerGetDatum(inptr->lexeme), - Int32GetDatum(strlen(inptr->lexeme)), - PointerGetDatum(NULL) + &(d->subdict->lexize), + PointerGetDatum(d->subdict->dictData), + PointerGetDatum(inptr->lexeme), + Int32GetDatum(strlen(inptr->lexeme)), + PointerGetDatum(NULL) ) ); } @@ -816,7 +816,7 @@ thesaurus_lexize(PG_FUNCTION_ARGS) d->subdict = lookup_ts_dictionary_cache(d->subdictOid); res = (TSLexeme *) DatumGetPointer(FunctionCall4(&(d->subdict->lexize), - PointerGetDatum(d->subdict->dictData), + PointerGetDatum(d->subdict->dictData), PG_GETARG_DATUM(1), PG_GETARG_DATUM(2), PointerGetDatum(NULL))); diff --git a/src/backend/tsearch/spell.c b/src/backend/tsearch/spell.c index 3bcc93fa1b7..10202504905 100644 --- a/src/backend/tsearch/spell.c +++ b/src/backend/tsearch/spell.c @@ -411,8 +411,8 @@ getNextFlagFromString(IspellDict *Conf, char **sflagset, char *sflag) { ereport(ERROR, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("invalid character in affix flag \"%s\"", - *sflagset))); + errmsg("invalid character in affix flag \"%s\"", + *sflagset))); } *sflagset += pg_mblen(*sflagset); @@ -1088,7 +1088,7 @@ addCompoundAffixFlagValue(IspellDict *Conf, char *s, uint32 val) Conf->mCompoundAffixFlag *= 2; Conf->CompoundAffixFlags = (CompoundAffixFlag *) repalloc((void *) Conf->CompoundAffixFlags, - Conf->mCompoundAffixFlag * sizeof(CompoundAffixFlag)); + Conf->mCompoundAffixFlag * sizeof(CompoundAffixFlag)); } else { @@ -1306,7 +1306,7 @@ NIImportOOAffixes(IspellDict *Conf, const char *filename) if (naffix == 0) ereport(ERROR, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("invalid number of flag vector aliases"))); + errmsg("invalid number of flag vector aliases"))); /* Also reserve place for empty flag set */ naffix++; @@ -1539,7 +1539,7 @@ isnewformat: if (oldformat) ereport(ERROR, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("affix file contains both old-style and new-style commands"))); + errmsg("affix file contains both old-style and new-style commands"))); tsearch_readline_end(&trst); NIImportOOAffixes(Conf, filename); @@ -1566,7 +1566,7 @@ MergeAffix(IspellDict *Conf, int a1, int a2) { Conf->lenAffixData *= 2; Conf->AffixData = (char **) repalloc(Conf->AffixData, - sizeof(char *) * Conf->lenAffixData); + sizeof(char *) * Conf->lenAffixData); } ptr = Conf->AffixData + Conf->nAffixData; @@ -1664,7 +1664,7 @@ mkSPNode(IspellDict *Conf, int low, int high, int level) */ clearCompoundOnly = (FF_COMPOUNDONLY & data->compoundflag - & makeCompoundFlags(Conf, Conf->Spell[i]->p.d.affix)) + & makeCompoundFlags(Conf, Conf->Spell[i]->p.d.affix)) ? false : true; data->affix = MergeAffix(Conf, data->affix, Conf->Spell[i]->p.d.affix); } diff --git a/src/backend/tsearch/to_tsany.c b/src/backend/tsearch/to_tsany.c index 18368d118e6..6400440756d 100644 --- a/src/backend/tsearch/to_tsany.c +++ b/src/backend/tsearch/to_tsany.c @@ -49,8 +49,8 @@ compareWORD(const void *a, const void *b) int res; res = tsCompareString( - ((const ParsedWord *) a)->word, ((const ParsedWord *) a)->len, - ((const ParsedWord *) b)->word, ((const ParsedWord *) b)->len, + ((const ParsedWord *) a)->word, ((const ParsedWord *) a)->len, + ((const ParsedWord *) b)->word, ((const ParsedWord *) b)->len, false); if (res == 0) @@ -390,8 +390,8 @@ add_to_tsvector(void *_state, char *elem_value, int elem_len) item_vector = make_tsvector(prs); state->result = (TSVector) DirectFunctionCall2(tsvector_concat, - TSVectorGetDatum(state->result), - PointerGetDatum(item_vector)); + TSVectorGetDatum(state->result), + PointerGetDatum(item_vector)); } else state->result = make_tsvector(prs); @@ -472,7 +472,7 @@ pushval_morph(Datum opaque, TSQueryParserState state, char *strval, int lenval, prs.words[count].word, prs.words[count].len, weight, - ((prs.words[count].flags & TSL_PREFIX) || prefix)); + ((prs.words[count].flags & TSL_PREFIX) || prefix)); pfree(prs.words[count].word); if (cnt) pushOperator(state, OP_AND, 0); diff --git a/src/backend/tsearch/ts_locale.c b/src/backend/tsearch/ts_locale.c index 2cc084770d2..1aa3e237338 100644 --- a/src/backend/tsearch/ts_locale.c +++ b/src/backend/tsearch/ts_locale.c @@ -296,7 +296,7 @@ lowerstr_with_len(const char *str, int len) if (wlen < 0) ereport(ERROR, (errcode(ERRCODE_CHARACTER_NOT_IN_REPERTOIRE), - errmsg("conversion from wchar_t to server encoding failed: %m"))); + errmsg("conversion from wchar_t to server encoding failed: %m"))); Assert(wlen < len); } else diff --git a/src/backend/tsearch/ts_parse.c b/src/backend/tsearch/ts_parse.c index b612fb0e2cb..ad5dddff4b0 100644 --- a/src/backend/tsearch/ts_parse.c +++ b/src/backend/tsearch/ts_parse.c @@ -205,11 +205,11 @@ LexizeExec(LexizeData *ld, ParsedLex **correspondLexem) ld->dictState.isend = ld->dictState.getnext = false; ld->dictState.private_state = NULL; res = (TSLexeme *) DatumGetPointer(FunctionCall4( - &(dict->lexize), - PointerGetDatum(dict->dictData), - PointerGetDatum(curValLemm), - Int32GetDatum(curValLenLemm), - PointerGetDatum(&ld->dictState) + &(dict->lexize), + PointerGetDatum(dict->dictData), + PointerGetDatum(curValLemm), + Int32GetDatum(curValLenLemm), + PointerGetDatum(&ld->dictState) )); if (ld->dictState.getnext) @@ -295,10 +295,10 @@ LexizeExec(LexizeData *ld, ParsedLex **correspondLexem) res = (TSLexeme *) DatumGetPointer(FunctionCall4( &(dict->lexize), - PointerGetDatum(dict->dictData), - PointerGetDatum(curVal->lemm), - Int32GetDatum(curVal->lenlemm), - PointerGetDatum(&ld->dictState) + PointerGetDatum(dict->dictData), + PointerGetDatum(curVal->lemm), + Int32GetDatum(curVal->lenlemm), + PointerGetDatum(&ld->dictState) )); if (ld->dictState.getnext) diff --git a/src/backend/tsearch/ts_typanalyze.c b/src/backend/tsearch/ts_typanalyze.c index 975623fa960..ab224b76b86 100644 --- a/src/backend/tsearch/ts_typanalyze.c +++ b/src/backend/tsearch/ts_typanalyze.c @@ -188,7 +188,7 @@ compute_tsvector_stats(VacAttrStats *stats, lexemes_tab = hash_create("Analyzed lexemes table", num_mcelem, &hash_ctl, - HASH_ELEM | HASH_FUNCTION | HASH_COMPARE | HASH_CONTEXT); + HASH_ELEM | HASH_FUNCTION | HASH_COMPARE | HASH_CONTEXT); /* Initialize counters. */ b_current = 1; @@ -396,7 +396,7 @@ compute_tsvector_stats(VacAttrStats *stats, mcelem_values[i] = PointerGetDatum(cstring_to_text_with_len(item->key.lexeme, - item->key.length)); + item->key.length)); mcelem_freqs[i] = (double) item->frequency / (double) nonnull_cnt; } mcelem_freqs[i++] = (double) minfreq / (double) nonnull_cnt; diff --git a/src/backend/tsearch/wparser.c b/src/backend/tsearch/wparser.c index 8f4727448f3..c9ce80a91af 100644 --- a/src/backend/tsearch/wparser.c +++ b/src/backend/tsearch/wparser.c @@ -186,8 +186,8 @@ prs_setup_firstcall(FuncCallContext *funcctx, Oid prsid, text *txt) st->list = (LexemeEntry *) palloc(sizeof(LexemeEntry) * st->len); prsdata = (void *) DatumGetPointer(FunctionCall2(&prs->prsstart, - PointerGetDatum(VARDATA_ANY(txt)), - Int32GetDatum(VARSIZE_ANY_EXHDR(txt)))); + PointerGetDatum(VARDATA_ANY(txt)), + Int32GetDatum(VARSIZE_ANY_EXHDR(txt)))); while ((type = DatumGetInt32(FunctionCall3(&prs->prstoken, PointerGetDatum(prsdata), @@ -319,7 +319,7 @@ ts_headline_byid_opt(PG_FUNCTION_ARGS) if (!OidIsValid(prsobj->headlineOid)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("text search parser does not support headline creation"))); + errmsg("text search parser does not support headline creation"))); memset(&prs, 0, sizeof(HeadlineParsedText)); prs.lenwords = 32; @@ -364,7 +364,7 @@ Datum ts_headline(PG_FUNCTION_ARGS) { PG_RETURN_DATUM(DirectFunctionCall3(ts_headline_byid_opt, - ObjectIdGetDatum(getTSCurrentConfig(true)), + ObjectIdGetDatum(getTSCurrentConfig(true)), PG_GETARG_DATUM(0), PG_GETARG_DATUM(1))); } @@ -373,7 +373,7 @@ Datum ts_headline_opt(PG_FUNCTION_ARGS) { PG_RETURN_DATUM(DirectFunctionCall4(ts_headline_byid_opt, - ObjectIdGetDatum(getTSCurrentConfig(true)), + ObjectIdGetDatum(getTSCurrentConfig(true)), PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), PG_GETARG_DATUM(2))); @@ -407,7 +407,7 @@ ts_headline_jsonb_byid_opt(PG_FUNCTION_ARGS) if (!OidIsValid(state->prsobj->headlineOid)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("text search parser does not support headline creation"))); + errmsg("text search parser does not support headline creation"))); out = transform_jsonb_string_values(jb, state, action); @@ -431,7 +431,7 @@ Datum ts_headline_jsonb(PG_FUNCTION_ARGS) { PG_RETURN_DATUM(DirectFunctionCall3(ts_headline_jsonb_byid_opt, - ObjectIdGetDatum(getTSCurrentConfig(true)), + ObjectIdGetDatum(getTSCurrentConfig(true)), PG_GETARG_DATUM(0), PG_GETARG_DATUM(1))); } @@ -449,7 +449,7 @@ Datum ts_headline_jsonb_opt(PG_FUNCTION_ARGS) { PG_RETURN_DATUM(DirectFunctionCall4(ts_headline_jsonb_byid_opt, - ObjectIdGetDatum(getTSCurrentConfig(true)), + ObjectIdGetDatum(getTSCurrentConfig(true)), PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), PG_GETARG_DATUM(2))); @@ -484,7 +484,7 @@ ts_headline_json_byid_opt(PG_FUNCTION_ARGS) if (!OidIsValid(state->prsobj->headlineOid)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("text search parser does not support headline creation"))); + errmsg("text search parser does not support headline creation"))); out = transform_json_string_values(json, state, action); @@ -507,7 +507,7 @@ Datum ts_headline_json(PG_FUNCTION_ARGS) { PG_RETURN_DATUM(DirectFunctionCall3(ts_headline_json_byid_opt, - ObjectIdGetDatum(getTSCurrentConfig(true)), + ObjectIdGetDatum(getTSCurrentConfig(true)), PG_GETARG_DATUM(0), PG_GETARG_DATUM(1))); } @@ -525,7 +525,7 @@ Datum ts_headline_json_opt(PG_FUNCTION_ARGS) { PG_RETURN_DATUM(DirectFunctionCall4(ts_headline_json_byid_opt, - ObjectIdGetDatum(getTSCurrentConfig(true)), + ObjectIdGetDatum(getTSCurrentConfig(true)), PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), PG_GETARG_DATUM(2))); diff --git a/src/backend/tsearch/wparser_def.c b/src/backend/tsearch/wparser_def.c index 0ce2e00eb29..e841a1ccf0e 100644 --- a/src/backend/tsearch/wparser_def.c +++ b/src/backend/tsearch/wparser_def.c @@ -2295,7 +2295,7 @@ mark_hl_fragments(HeadlineParsedText *prs, TSQuery query, int highlight, { if (!covers[i].in && !covers[i].excluded && (maxitems < covers[i].poslen || (maxitems == covers[i].poslen - && minwords > covers[i].curlen))) + && minwords > covers[i].curlen))) { maxitems = covers[i].poslen; minwords = covers[i].curlen; diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c index c4899cb3bc8..2efb6c94e11 100644 --- a/src/backend/utils/adt/acl.c +++ b/src/backend/utils/adt/acl.c @@ -320,8 +320,8 @@ aclparse(const char *s, AclItem *aip) default: ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid mode character: must be one of \"%s\"", - ACL_ALL_RIGHTS_STR))); + errmsg("invalid mode character: must be one of \"%s\"", + ACL_ALL_RIGHTS_STR))); } privs |= read; @@ -573,7 +573,7 @@ aclitemin(PG_FUNCTION_ARGS) if (*s) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("extra garbage at the end of the ACL specification"))); + errmsg("extra garbage at the end of the ACL specification"))); PG_RETURN_ACLITEM_P(aip); } @@ -1193,7 +1193,7 @@ cc_restart: if ((ACLITEM_GET_GOPTIONS(*mod_aip) & ~own_privs) != 0) ereport(ERROR, (errcode(ERRCODE_INVALID_GRANT_OPERATION), - errmsg("grant options cannot be granted back to your own grantor"))); + errmsg("grant options cannot be granted back to your own grantor"))); pfree(acl); } @@ -5176,7 +5176,7 @@ get_rolespec_tuple(const RoleSpec *role) if (!HeapTupleIsValid(tuple)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("role \"%s\" does not exist", role->rolename))); + errmsg("role \"%s\" does not exist", role->rolename))); break; case ROLESPEC_CURRENT_USER: diff --git a/src/backend/utils/adt/amutils.c b/src/backend/utils/adt/amutils.c index b3a3a4dcc3f..f53b251b301 100644 --- a/src/backend/utils/adt/amutils.c +++ b/src/backend/utils/adt/amutils.c @@ -240,7 +240,7 @@ indexam_property(FunctionCallInfo fcinfo, case AMPROP_NULLS_FIRST: if (test_indoption(index_oid, attno, routine->amcanorder, - INDOPTION_NULLS_FIRST, INDOPTION_NULLS_FIRST, &res)) + INDOPTION_NULLS_FIRST, INDOPTION_NULLS_FIRST, &res)) PG_RETURN_BOOL(res); PG_RETURN_NULL(); diff --git a/src/backend/utils/adt/array_selfuncs.c b/src/backend/utils/adt/array_selfuncs.c index 7be5e6c6777..9daf8e73bc7 100644 --- a/src/backend/utils/adt/array_selfuncs.c +++ b/src/backend/utils/adt/array_selfuncs.c @@ -165,7 +165,7 @@ scalararraysel_containment(PlannerInfo *root, sslot.numbers, sslot.nnumbers, &constval, 1, - OID_ARRAY_CONTAINS_OP, + OID_ARRAY_CONTAINS_OP, cmpfunc); else selec = mcelem_array_contained_selec(sslot.values, @@ -188,7 +188,7 @@ scalararraysel_containment(PlannerInfo *root, selec = mcelem_array_contain_overlap_selec(NULL, 0, NULL, 0, &constval, 1, - OID_ARRAY_CONTAINS_OP, + OID_ARRAY_CONTAINS_OP, cmpfunc); else selec = mcelem_array_contained_selec(NULL, 0, @@ -482,7 +482,7 @@ mcelem_array_selec(ArrayType *array, TypeCacheEntry *typentry, if (operator == OID_ARRAY_CONTAINS_OP || operator == OID_ARRAY_OVERLAP_OP) selec = mcelem_array_contain_overlap_selec(mcelem, nmcelem, numbers, nnumbers, - elem_values, nonnull_nitems, + elem_values, nonnull_nitems, operator, cmpfunc); else if (operator == OID_ARRAY_CONTAINED_OP) selec = mcelem_array_contained_selec(mcelem, nmcelem, diff --git a/src/backend/utils/adt/array_typanalyze.c b/src/backend/utils/adt/array_typanalyze.c index e3ef18cace9..78153d232fe 100644 --- a/src/backend/utils/adt/array_typanalyze.c +++ b/src/backend/utils/adt/array_typanalyze.c @@ -81,7 +81,7 @@ typedef struct } DECountItem; static void compute_array_stats(VacAttrStats *stats, - AnalyzeAttrFetchFunc fetchfunc, int samplerows, double totalrows); + AnalyzeAttrFetchFunc fetchfunc, int samplerows, double totalrows); static void prune_element_hashtable(HTAB *elements_tab, int b_current); static uint32 element_hash(const void *key, Size keysize); static int element_match(const void *key1, const void *key2, Size keysize); @@ -285,7 +285,7 @@ compute_array_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc, elements_tab = hash_create("Analyzed elements table", num_mcelem, &elem_hash_ctl, - HASH_ELEM | HASH_FUNCTION | HASH_COMPARE | HASH_CONTEXT); + HASH_ELEM | HASH_FUNCTION | HASH_COMPARE | HASH_CONTEXT); /* hashtable for array distinct elements counts */ MemSet(&count_hash_ctl, 0, sizeof(count_hash_ctl)); diff --git a/src/backend/utils/adt/array_userfuncs.c b/src/backend/utils/adt/array_userfuncs.c index dc2a1749db1..87d79f3f98b 100644 --- a/src/backend/utils/adt/array_userfuncs.c +++ b/src/backend/utils/adt/array_userfuncs.c @@ -143,7 +143,7 @@ array_append(PG_FUNCTION_ARGS) result = array_set_element(EOHPGetRWDatum(&eah->hdr), 1, &indx, newelem, isNull, - -1, my_extra->typlen, my_extra->typbyval, my_extra->typalign); + -1, my_extra->typlen, my_extra->typbyval, my_extra->typalign); PG_RETURN_DATUM(result); } @@ -200,7 +200,7 @@ array_prepend(PG_FUNCTION_ARGS) result = array_set_element(EOHPGetRWDatum(&eah->hdr), 1, &indx, newelem, isNull, - -1, my_extra->typlen, my_extra->typbyval, my_extra->typalign); + -1, my_extra->typlen, my_extra->typbyval, my_extra->typalign); /* Readjust result's LB to match the input's, as expected for prepend */ Assert(result == EOHPGetRWDatum(&eah->hdr)); @@ -352,8 +352,8 @@ array_cat(PG_FUNCTION_ARGS) ereport(ERROR, (errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR), errmsg("cannot concatenate incompatible arrays"), - errdetail("Arrays with differing element dimensions are " - "not compatible for concatenation."))); + errdetail("Arrays with differing element dimensions are " + "not compatible for concatenation."))); dims[i] = dims1[i]; lbs[i] = lbs1[i]; @@ -721,8 +721,8 @@ array_position_common(FunctionCallInfo fcinfo) if (!OidIsValid(typentry->eq_opr_finfo.fn_oid)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), - errmsg("could not identify an equality operator for type %s", - format_type_be(element_type)))); + errmsg("could not identify an equality operator for type %s", + format_type_be(element_type)))); my_extra->element_type = element_type; fmgr_info_cxt(typentry->eq_opr_finfo.fn_oid, &my_extra->proc, @@ -860,8 +860,8 @@ array_positions(PG_FUNCTION_ARGS) if (!OidIsValid(typentry->eq_opr_finfo.fn_oid)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), - errmsg("could not identify an equality operator for type %s", - format_type_be(element_type)))); + errmsg("could not identify an equality operator for type %s", + format_type_be(element_type)))); my_extra->element_type = element_type; fmgr_info_cxt(typentry->eq_opr_finfo.fn_oid, &my_extra->proc, diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c index e1ebe576817..34dadd6e19e 100644 --- a/src/backend/utils/adt/arrayfuncs.c +++ b/src/backend/utils/adt/arrayfuncs.c @@ -501,7 +501,7 @@ ArrayCount(const char *str, int *dim, char typdelim) parse_state != ARRAY_ELEM_DELIMITED) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("malformed array literal: \"%s\"", str), + errmsg("malformed array literal: \"%s\"", str), errdetail("Unexpected \"%c\" character.", '\\'))); if (parse_state != ARRAY_QUOTED_ELEM_STARTED) @@ -512,7 +512,7 @@ ArrayCount(const char *str, int *dim, char typdelim) else ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("malformed array literal: \"%s\"", str), + errmsg("malformed array literal: \"%s\"", str), errdetail("Unexpected end of input."))); break; case '"': @@ -527,7 +527,7 @@ ArrayCount(const char *str, int *dim, char typdelim) parse_state != ARRAY_ELEM_DELIMITED) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("malformed array literal: \"%s\"", str), + errmsg("malformed array literal: \"%s\"", str), errdetail("Unexpected array element."))); in_quotes = !in_quotes; if (in_quotes) @@ -547,10 +547,10 @@ ArrayCount(const char *str, int *dim, char typdelim) parse_state != ARRAY_LEVEL_STARTED && parse_state != ARRAY_LEVEL_DELIMITED) ereport(ERROR, - (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("malformed array literal: \"%s\"", str), - errdetail("Unexpected \"%c\" character.", - '{'))); + (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), + errmsg("malformed array literal: \"%s\"", str), + errdetail("Unexpected \"%c\" character.", + '{'))); parse_state = ARRAY_LEVEL_STARTED; if (nest_level >= MAXDIM) ereport(ERROR, @@ -577,26 +577,26 @@ ArrayCount(const char *str, int *dim, char typdelim) parse_state != ARRAY_LEVEL_COMPLETED && !(nest_level == 1 && parse_state == ARRAY_LEVEL_STARTED)) ereport(ERROR, - (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("malformed array literal: \"%s\"", str), - errdetail("Unexpected \"%c\" character.", - '}'))); + (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), + errmsg("malformed array literal: \"%s\"", str), + errdetail("Unexpected \"%c\" character.", + '}'))); parse_state = ARRAY_LEVEL_COMPLETED; if (nest_level == 0) ereport(ERROR, - (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("malformed array literal: \"%s\"", str), - errdetail("Unmatched \"%c\" character.", '}'))); + (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), + errmsg("malformed array literal: \"%s\"", str), + errdetail("Unmatched \"%c\" character.", '}'))); nest_level--; if (nelems_last[nest_level] != 0 && nelems[nest_level] != nelems_last[nest_level]) ereport(ERROR, - (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("malformed array literal: \"%s\"", str), - errdetail("Multidimensional arrays must have " - "sub-arrays with matching " - "dimensions."))); + (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), + errmsg("malformed array literal: \"%s\"", str), + errdetail("Multidimensional arrays must have " + "sub-arrays with matching " + "dimensions."))); nelems_last[nest_level] = nelems[nest_level]; nelems[nest_level] = 1; if (nest_level == 0) @@ -626,10 +626,10 @@ ArrayCount(const char *str, int *dim, char typdelim) parse_state != ARRAY_QUOTED_ELEM_COMPLETED && parse_state != ARRAY_LEVEL_COMPLETED) ereport(ERROR, - (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("malformed array literal: \"%s\"", str), - errdetail("Unexpected \"%c\" character.", - typdelim))); + (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), + errmsg("malformed array literal: \"%s\"", str), + errdetail("Unexpected \"%c\" character.", + typdelim))); if (parse_state == ARRAY_LEVEL_COMPLETED) parse_state = ARRAY_LEVEL_DELIMITED; else @@ -649,9 +649,9 @@ ArrayCount(const char *str, int *dim, char typdelim) parse_state != ARRAY_ELEM_STARTED && parse_state != ARRAY_ELEM_DELIMITED) ereport(ERROR, - (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("malformed array literal: \"%s\"", str), - errdetail("Unexpected array element."))); + (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), + errmsg("malformed array literal: \"%s\"", str), + errdetail("Unexpected array element."))); parse_state = ARRAY_ELEM_STARTED; } } @@ -820,9 +820,9 @@ ReadArrayStr(char *arrayStr, { if (nest_level >= ndim) ereport(ERROR, - (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("malformed array literal: \"%s\"", - origStr))); + (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), + errmsg("malformed array literal: \"%s\"", + origStr))); nest_level++; indx[nest_level - 1] = 0; srcptr++; @@ -835,9 +835,9 @@ ReadArrayStr(char *arrayStr, { if (nest_level == 0) ereport(ERROR, - (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("malformed array literal: \"%s\"", - origStr))); + (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), + errmsg("malformed array literal: \"%s\"", + origStr))); if (i == -1) i = ArrayGetOffset0(ndim, indx, prod); indx[nest_level - 1] = 0; @@ -2292,7 +2292,7 @@ array_set_element(Datum arraydatum, return PointerGetDatum(construct_md_array(&dataValue, &isNull, nSubscripts, dim, lb, elmtype, - elmlen, elmbyval, elmalign)); + elmlen, elmbyval, elmalign)); } if (ndim != nSubscripts) @@ -2520,7 +2520,7 @@ array_set_element_expanded(Datum arraydatum, eah->dims = (int *) MemoryContextAllocZero(eah->hdr.eoh_context, nSubscripts * sizeof(int)); eah->lbound = (int *) MemoryContextAllocZero(eah->hdr.eoh_context, - nSubscripts * sizeof(int)); + nSubscripts * sizeof(int)); /* Update local copies of dimension info */ ndim = nSubscripts; @@ -2792,7 +2792,7 @@ array_set_slice(Datum arraydatum, */ ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("updates on slices of fixed-length arrays not implemented"))); + errmsg("updates on slices of fixed-length arrays not implemented"))); } /* detoast arrays if necessary */ @@ -2823,9 +2823,9 @@ array_set_slice(Datum arraydatum, if (!upperProvided[i] || !lowerProvided[i]) ereport(ERROR, (errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR), - errmsg("array slice subscript must provide both boundaries"), - errdetail("When assigning to a slice of an empty array value," - " slice boundaries must be fully specified."))); + errmsg("array slice subscript must provide both boundaries"), + errdetail("When assigning to a slice of an empty array value," + " slice boundaries must be fully specified."))); dim[i] = 1 + upperIndx[i] - lowerIndx[i]; lb[i] = lowerIndx[i]; @@ -2839,7 +2839,7 @@ array_set_slice(Datum arraydatum, return PointerGetDatum(construct_md_array(dvalues, dnulls, nSubscripts, dim, lb, elmtype, - elmlen, elmbyval, elmalign)); + elmlen, elmbyval, elmalign)); } if (ndim < nSubscripts || ndim <= 0 || ndim > MAXDIM) @@ -2899,7 +2899,7 @@ array_set_slice(Datum arraydatum, if (lowerIndx[i] > upperIndx[i]) ereport(ERROR, (errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR), - errmsg("upper bound cannot be less than lower bound"))); + errmsg("upper bound cannot be less than lower bound"))); if (lowerIndx[i] < lb[i] || upperIndx[i] >= (dim[i] + lb[i])) ereport(ERROR, @@ -2914,7 +2914,7 @@ array_set_slice(Datum arraydatum, if (lowerIndx[i] > upperIndx[i]) ereport(ERROR, (errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR), - errmsg("upper bound cannot be less than lower bound"))); + errmsg("upper bound cannot be less than lower bound"))); } } @@ -3206,7 +3206,7 @@ array_map(FunctionCallInfo fcinfo, Oid retType, ArrayMapState *amstate) /* Get source element, checking for NULL */ fcinfo->arg[0] = array_iter_next(&iter, &fcinfo->argnull[0], i, - inp_typlen, inp_typbyval, inp_typalign); + inp_typlen, inp_typbyval, inp_typalign); /* * Apply the given function to source elt and extra args. @@ -3510,7 +3510,7 @@ deconstruct_array(ArrayType *array, else ereport(ERROR, (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), - errmsg("null array element not allowed in this context"))); + errmsg("null array element not allowed in this context"))); } else { @@ -3636,8 +3636,8 @@ array_eq(PG_FUNCTION_ARGS) if (!OidIsValid(typentry->eq_opr_finfo.fn_oid)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), - errmsg("could not identify an equality operator for type %s", - format_type_be(element_type)))); + errmsg("could not identify an equality operator for type %s", + format_type_be(element_type)))); fcinfo->flinfo->fn_extra = (void *) typentry; } typlen = typentry->typlen; @@ -3800,8 +3800,8 @@ array_cmp(FunctionCallInfo fcinfo) 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(element_type)))); + errmsg("could not identify a comparison function for type %s", + format_type_be(element_type)))); fcinfo->flinfo->fn_extra = (void *) typentry; } typlen = typentry->typlen; @@ -4074,8 +4074,8 @@ array_contain_compare(AnyArrayType *array1, AnyArrayType *array2, Oid collation, if (!OidIsValid(typentry->eq_opr_finfo.fn_oid)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), - errmsg("could not identify an equality operator for type %s", - format_type_be(element_type)))); + errmsg("could not identify an equality operator for type %s", + format_type_be(element_type)))); *fn_extra = (void *) typentry; } typlen = typentry->typlen; @@ -5261,7 +5261,7 @@ accumArrayResultArr(ArrayBuildStateArr *astate, if (astate->ndims != ndims + 1) ereport(ERROR, (errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR), - errmsg("cannot accumulate arrays of different dimensionality"))); + errmsg("cannot accumulate arrays of different dimensionality"))); for (i = 0; i < ndims; i++) { if (astate->dims[i + 1] != dims[i] || astate->lbs[i + 1] != lbs[i]) @@ -5633,7 +5633,7 @@ array_fill_with_lower_bounds(PG_FUNCTION_ARGS) if (PG_ARGISNULL(1) || PG_ARGISNULL(2)) ereport(ERROR, (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), - errmsg("dimension array or low bound array cannot be null"))); + errmsg("dimension array or low bound array cannot be null"))); dims = PG_GETARG_ARRAYTYPE_P(1); lbs = PG_GETARG_ARRAYTYPE_P(2); @@ -5673,7 +5673,7 @@ array_fill(PG_FUNCTION_ARGS) if (PG_ARGISNULL(1)) ereport(ERROR, (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), - errmsg("dimension array or low bound array cannot be null"))); + errmsg("dimension array or low bound array cannot be null"))); dims = PG_GETARG_ARRAYTYPE_P(1); @@ -6034,8 +6034,8 @@ array_replace_internal(ArrayType *array, if (!OidIsValid(typentry->eq_opr_finfo.fn_oid)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), - errmsg("could not identify an equality operator for type %s", - format_type_be(element_type)))); + errmsg("could not identify an equality operator for type %s", + format_type_be(element_type)))); fcinfo->flinfo->fn_extra = (void *) typentry; } typlen = typentry->typlen; @@ -6154,8 +6154,8 @@ array_replace_internal(ArrayType *array, if (!AllocSizeIsValid(nbytes)) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("array size exceeds the maximum allowed (%d)", - (int) MaxAllocSize))); + errmsg("array size exceeds the maximum allowed (%d)", + (int) MaxAllocSize))); } nresult++; } @@ -6320,8 +6320,8 @@ width_bucket_array(PG_FUNCTION_ARGS) 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(element_type)))); + errmsg("could not identify a comparison function for type %s", + format_type_be(element_type)))); fcinfo->flinfo->fn_extra = (void *) typentry; } diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c index 2b261cd5bd5..7d89d794381 100644 --- a/src/backend/utils/adt/date.c +++ b/src/backend/utils/adt/date.c @@ -143,7 +143,7 @@ date_in(PG_FUNCTION_ARGS) case DTK_CURRENT: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("date/time value \"current\" is no longer supported"))); + errmsg("date/time value \"current\" is no longer supported"))); GetCurrentDateTime(tm); break; @@ -1161,7 +1161,7 @@ abstime_date(PG_FUNCTION_ARGS) case INVALID_ABSTIME: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot convert reserved abstime value to date"))); + errmsg("cannot convert reserved abstime value to date"))); result = 0; /* keep compiler quiet */ break; @@ -2598,8 +2598,8 @@ timetz_part(PG_FUNCTION_ARGS) default: ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("\"time with time zone\" units \"%s\" not recognized", - lowunits))); + errmsg("\"time with time zone\" units \"%s\" not recognized", + lowunits))); result = 0; } } @@ -2716,9 +2716,9 @@ timetz_izone(PG_FUNCTION_ARGS) if (zone->month != 0 || zone->day != 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("interval time zone \"%s\" must not include months or days", - DatumGetCString(DirectFunctionCall1(interval_out, - PointerGetDatum(zone)))))); + errmsg("interval time zone \"%s\" must not include months or days", + DatumGetCString(DirectFunctionCall1(interval_out, + PointerGetDatum(zone)))))); tz = -(zone->time / USECS_PER_SEC); diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index 73c4e41213e..a3d7dc3697a 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -1205,8 +1205,8 @@ DecodeDateTime(char **field, int *ftype, int nf, { case DTK_CURRENT: ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("date/time value \"current\" is no longer supported"))); + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("date/time value \"current\" is no longer supported"))); return DTERR_BAD_FORMAT; break; @@ -1222,7 +1222,7 @@ DecodeDateTime(char **field, int *ftype, int nf, *dtype = DTK_DATE; GetCurrentDateTime(&cur_tm); j2date(date2j(cur_tm.tm_year, cur_tm.tm_mon, cur_tm.tm_mday) - 1, - &tm->tm_year, &tm->tm_mon, &tm->tm_mday); + &tm->tm_year, &tm->tm_mon, &tm->tm_mday); break; case DTK_TODAY: @@ -1239,7 +1239,7 @@ DecodeDateTime(char **field, int *ftype, int nf, *dtype = DTK_DATE; GetCurrentDateTime(&cur_tm); j2date(date2j(cur_tm.tm_year, cur_tm.tm_mon, cur_tm.tm_mday) + 1, - &tm->tm_year, &tm->tm_mon, &tm->tm_mday); + &tm->tm_year, &tm->tm_mon, &tm->tm_mday); break; case DTK_ZULU: @@ -2113,8 +2113,8 @@ DecodeTimeOnly(char **field, int *ftype, int nf, { case DTK_CURRENT: ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("date/time value \"current\" is no longer supported"))); + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("date/time value \"current\" is no longer supported"))); return DTERR_BAD_FORMAT; break; @@ -3778,7 +3778,7 @@ DateTimeParseError(int dterr, const char *str, const char *datatype) (errcode(ERRCODE_DATETIME_FIELD_OVERFLOW), errmsg("date/time field value out of range: \"%s\"", str), - errhint("Perhaps you need a different \"datestyle\" setting."))); + errhint("Perhaps you need a different \"datestyle\" setting."))); break; case DTERR_INTERVAL_OVERFLOW: ereport(ERROR, @@ -3891,7 +3891,7 @@ EncodeDateOnly(struct pg_tm *tm, int style, char *str) case USE_XSD_DATES: /* compatible with ISO date formats */ str = pg_ltostr_zeropad(str, - (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1), 4); + (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1), 4); *str++ = '-'; str = pg_ltostr_zeropad(str, tm->tm_mon, 2); *str++ = '-'; @@ -3914,7 +3914,7 @@ EncodeDateOnly(struct pg_tm *tm, int style, char *str) } *str++ = '/'; str = pg_ltostr_zeropad(str, - (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1), 4); + (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1), 4); break; case USE_GERMAN_DATES: @@ -3924,7 +3924,7 @@ EncodeDateOnly(struct pg_tm *tm, int style, char *str) str = pg_ltostr_zeropad(str, tm->tm_mon, 2); *str++ = '.'; str = pg_ltostr_zeropad(str, - (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1), 4); + (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1), 4); break; case USE_POSTGRES_DATES: @@ -3944,7 +3944,7 @@ EncodeDateOnly(struct pg_tm *tm, int style, char *str) } *str++ = '-'; str = pg_ltostr_zeropad(str, - (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1), 4); + (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1), 4); break; } @@ -4014,7 +4014,7 @@ EncodeDateTime(struct pg_tm *tm, fsec_t fsec, bool print_tz, int tz, const char case USE_XSD_DATES: /* Compatible with ISO-8601 date formats */ str = pg_ltostr_zeropad(str, - (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1), 4); + (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1), 4); *str++ = '-'; str = pg_ltostr_zeropad(str, tm->tm_mon, 2); *str++ = '-'; @@ -4045,7 +4045,7 @@ EncodeDateTime(struct pg_tm *tm, fsec_t fsec, bool print_tz, int tz, const char } *str++ = '/'; str = pg_ltostr_zeropad(str, - (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1), 4); + (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1), 4); *str++ = ' '; str = pg_ltostr_zeropad(str, tm->tm_hour, 2); *str++ = ':'; @@ -4077,7 +4077,7 @@ EncodeDateTime(struct pg_tm *tm, fsec_t fsec, bool print_tz, int tz, const char str = pg_ltostr_zeropad(str, tm->tm_mon, 2); *str++ = '.'; str = pg_ltostr_zeropad(str, - (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1), 4); + (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1), 4); *str++ = ' '; str = pg_ltostr_zeropad(str, tm->tm_hour, 2); *str++ = ':'; @@ -4127,7 +4127,7 @@ EncodeDateTime(struct pg_tm *tm, fsec_t fsec, bool print_tz, int tz, const char str = AppendTimestampSeconds(str, tm, fsec); *str++ = ' '; str = pg_ltostr_zeropad(str, - (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1), 4); + (tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1), 4); if (print_tz) { @@ -4860,7 +4860,7 @@ pg_timezone_names(PG_FUNCTION_ARGS) * reasonably omit from the pg_timezone_names view. */ if (tzn && (strcmp(tzn, "-00") == 0 || - strcmp(tzn, "Local time zone must be set--see zic manual page") == 0)) + strcmp(tzn, "Local time zone must be set--see zic manual page") == 0)) continue; /* Found a displayable zone */ diff --git a/src/backend/utils/adt/dbsize.c b/src/backend/utils/adt/dbsize.c index ac4feddbfd3..515e30d1777 100644 --- a/src/backend/utils/adt/dbsize.c +++ b/src/backend/utils/adt/dbsize.c @@ -333,7 +333,7 @@ pg_relation_size(PG_FUNCTION_ARGS) PG_RETURN_NULL(); size = calculate_relation_size(&(rel->rd_node), rel->rd_backend, - forkname_to_number(text_to_cstring(forkName))); + forkname_to_number(text_to_cstring(forkName))); relation_close(rel, AccessShareLock); @@ -838,10 +838,10 @@ pg_size_bytes(PG_FUNCTION_ARGS) Numeric mul_num; mul_num = DatumGetNumeric(DirectFunctionCall1(int8_numeric, - Int64GetDatum(multiplier))); + Int64GetDatum(multiplier))); num = DatumGetNumeric(DirectFunctionCall2(numeric_mul, - NumericGetDatum(mul_num), + NumericGetDatum(mul_num), NumericGetDatum(num))); } } @@ -978,7 +978,7 @@ pg_relation_filepath(PG_FUNCTION_ARGS) rnode.relNode = relform->relfilenode; else /* Consult the relation mapper */ rnode.relNode = RelationMapOidToFilenode(relid, - relform->relisshared); + relform->relisshared); break; default: diff --git a/src/backend/utils/adt/domains.c b/src/backend/utils/adt/domains.c index 73deaa7e1cf..e61d91bd885 100644 --- a/src/backend/utils/adt/domains.c +++ b/src/backend/utils/adt/domains.c @@ -174,7 +174,7 @@ domain_check_input(Datum value, bool isnull, DomainIOData *my_extra) */ econtext->domainValue_datum = MakeExpandedObjectReadOnly(value, isnull, - my_extra->constraint_ref.tcache->typlen); + my_extra->constraint_ref.tcache->typlen); econtext->domainValue_isNull = isnull; if (!ExecCheck(con->check_exprstate, econtext)) diff --git a/src/backend/utils/adt/encode.c b/src/backend/utils/adt/encode.c index 8773538b8d5..742ce6f97e8 100644 --- a/src/backend/utils/adt/encode.c +++ b/src/backend/utils/adt/encode.c @@ -175,7 +175,7 @@ hex_decode(const char *src, unsigned len, char *dst) if (s >= srcend) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid hexadecimal data: odd number of digits"))); + errmsg("invalid hexadecimal data: odd number of digits"))); v2 = get_hex(*s++); *p++ = v1 | v2; diff --git a/src/backend/utils/adt/enum.c b/src/backend/utils/adt/enum.c index b1d2a6f0c3b..973397cc85b 100644 --- a/src/backend/utils/adt/enum.c +++ b/src/backend/utils/adt/enum.c @@ -115,7 +115,7 @@ check_safe_enum_use(HeapTuple enumval_tup) errmsg("unsafe use of new value \"%s\" of enum type %s", NameStr(en->enumlabel), format_type_be(en->enumtypid)), - errhint("New enum values must be committed before they can be used."))); + errhint("New enum values must be committed before they can be used."))); } diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c index 30746ef908c..18b3b949acb 100644 --- a/src/backend/utils/adt/float.c +++ b/src/backend/utils/adt/float.c @@ -534,8 +534,8 @@ float8in_internal(char *num, char **endptr_p, errnumber[endptr - num] = '\0'; ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("\"%s\" is out of range for type double precision", - errnumber))); + errmsg("\"%s\" is out of range for type double precision", + errnumber))); } } else @@ -3534,7 +3534,7 @@ width_bucket_float8(PG_FUNCTION_ARGS) if (isnan(operand) || isnan(bound1) || isnan(bound2)) ereport(ERROR, (errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION), - errmsg("operand, lower bound, and upper bound cannot be NaN"))); + errmsg("operand, lower bound, and upper bound cannot be NaN"))); /* Note that we allow "operand" to be infinite */ if (isinf(bound1) || isinf(bound2)) diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index 807ce589da8..31f04ff5ed5 100644 --- a/src/backend/utils/adt/formatting.c +++ b/src/backend/utils/adt/formatting.c @@ -988,7 +988,7 @@ static char *get_last_relevant_decnum(char *num); static void NUM_numpart_from_char(NUMProc *Np, int id, int input_len); static void NUM_numpart_to_char(NUMProc *Np, int id); static char *NUM_processor(FormatNode *node, NUMDesc *Num, char *inout, - char *number, int from_char_input_len, int to_char_out_pre_spaces, + char *number, int from_char_input_len, int to_char_out_pre_spaces, int sign, bool is_to_char, Oid collid); static DCHCacheEntry *DCH_cache_getnew(const char *str); static DCHCacheEntry *DCH_cache_search(const char *str); @@ -1112,7 +1112,7 @@ NUMDesc_prepare(NUMDesc *num, FormatNode *n) if (IS_MULTI(num)) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("cannot use \"V\" and decimal point together"))); + errmsg("cannot use \"V\" and decimal point together"))); num->flag |= NUM_F_DECIMAL; break; @@ -1195,7 +1195,7 @@ NUMDesc_prepare(NUMDesc *num, FormatNode *n) if (IS_DECIMAL(num)) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("cannot use \"V\" and decimal point together"))); + errmsg("cannot use \"V\" and decimal point together"))); num->flag |= NUM_F_MULTI; break; @@ -1209,7 +1209,7 @@ NUMDesc_prepare(NUMDesc *num, FormatNode *n) IS_ROMAN(num) || IS_MULTI(num)) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("\"EEEE\" is incompatible with other formats"), + errmsg("\"EEEE\" is incompatible with other formats"), errdetail("\"EEEE\" may only be used together with digit and decimal point patterns."))); num->flag |= NUM_F_EEEE; break; @@ -2175,8 +2175,8 @@ from_char_set_int(int *dest, const int value, const FormatNode *node) if (*dest != 0 && *dest != value) ereport(ERROR, (errcode(ERRCODE_INVALID_DATETIME_FORMAT), - errmsg("conflicting values for \"%s\" field in formatting string", - node->key->name), + errmsg("conflicting values for \"%s\" field in formatting string", + node->key->name), errdetail("This value contradicts a previous setting for " "the same field type."))); *dest = value; @@ -2238,8 +2238,8 @@ from_char_parse_int_len(int *dest, char **src, const int len, FormatNode *node) if (used < len) ereport(ERROR, (errcode(ERRCODE_INVALID_DATETIME_FORMAT), - errmsg("source string too short for \"%s\" formatting field", - node->key->name), + errmsg("source string too short for \"%s\" formatting field", + node->key->name), errdetail("Field requires %d characters, but only %d " "remain.", len, used), @@ -2465,7 +2465,7 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out, Oid col * intervals */ sprintf(s, "%0*d", S_FM(n->suffix) ? 0 : (tm->tm_hour >= 0) ? 2 : 3, - tm->tm_hour % (HOURS_PER_DAY / 2) == 0 ? HOURS_PER_DAY / 2 : + tm->tm_hour % (HOURS_PER_DAY / 2) == 0 ? HOURS_PER_DAY / 2 : tm->tm_hour % (HOURS_PER_DAY / 2)); if (S_THth(n->suffix)) str_numth(s, s, S_TH_TYPE(n->suffix)); @@ -2583,7 +2583,7 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out, Oid col else ereport(ERROR, (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE), - errmsg("localized string format value too long"))); + errmsg("localized string format value too long"))); } else sprintf(s, "%*s", S_FM(n->suffix) ? 0 : -9, @@ -2603,7 +2603,7 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out, Oid col else ereport(ERROR, (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE), - errmsg("localized string format value too long"))); + errmsg("localized string format value too long"))); } else sprintf(s, "%*s", S_FM(n->suffix) ? 0 : -9, @@ -2623,7 +2623,7 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out, Oid col else ereport(ERROR, (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE), - errmsg("localized string format value too long"))); + errmsg("localized string format value too long"))); } else sprintf(s, "%*s", S_FM(n->suffix) ? 0 : -9, @@ -2643,7 +2643,7 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out, Oid col else ereport(ERROR, (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE), - errmsg("localized string format value too long"))); + errmsg("localized string format value too long"))); } else strcpy(s, asc_toupper_z(months[tm->tm_mon - 1])); @@ -2662,7 +2662,7 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out, Oid col else ereport(ERROR, (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE), - errmsg("localized string format value too long"))); + errmsg("localized string format value too long"))); } else strcpy(s, months[tm->tm_mon - 1]); @@ -2681,7 +2681,7 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out, Oid col else ereport(ERROR, (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE), - errmsg("localized string format value too long"))); + errmsg("localized string format value too long"))); } else strcpy(s, asc_tolower_z(months[tm->tm_mon - 1])); @@ -2705,7 +2705,7 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out, Oid col else ereport(ERROR, (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE), - errmsg("localized string format value too long"))); + errmsg("localized string format value too long"))); } else sprintf(s, "%*s", S_FM(n->suffix) ? 0 : -9, @@ -2723,7 +2723,7 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out, Oid col else ereport(ERROR, (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE), - errmsg("localized string format value too long"))); + errmsg("localized string format value too long"))); } else sprintf(s, "%*s", S_FM(n->suffix) ? 0 : -9, @@ -2741,7 +2741,7 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out, Oid col else ereport(ERROR, (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE), - errmsg("localized string format value too long"))); + errmsg("localized string format value too long"))); } else sprintf(s, "%*s", S_FM(n->suffix) ? 0 : -9, @@ -2759,7 +2759,7 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out, Oid col else ereport(ERROR, (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE), - errmsg("localized string format value too long"))); + errmsg("localized string format value too long"))); } else strcpy(s, asc_toupper_z(days_short[tm->tm_wday])); @@ -2776,7 +2776,7 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out, Oid col else ereport(ERROR, (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE), - errmsg("localized string format value too long"))); + errmsg("localized string format value too long"))); } else strcpy(s, days_short[tm->tm_wday]); @@ -2793,7 +2793,7 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out, Oid col else ereport(ERROR, (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE), - errmsg("localized string format value too long"))); + errmsg("localized string format value too long"))); } else strcpy(s, asc_tolower_z(days_short[tm->tm_wday])); @@ -2804,7 +2804,7 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out, Oid col sprintf(s, "%0*d", S_FM(n->suffix) ? 0 : 3, (n->key->id == DCH_DDD) ? tm->tm_yday : - date2isoyearday(tm->tm_year, tm->tm_mon, tm->tm_mday)); + date2isoyearday(tm->tm_year, tm->tm_mon, tm->tm_mday)); if (S_THth(n->suffix)) str_numth(s, s, S_TH_TYPE(n->suffix)); s += strlen(s); @@ -3080,8 +3080,8 @@ DCH_from_char(FormatNode *node, char *in, TmFromChar *out) case DCH_OF: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("formatting field \"%s\" is only supported in to_char", - n->key->name))); + errmsg("formatting field \"%s\" is only supported in to_char", + n->key->name))); break; case DCH_A_D: case DCH_B_C: @@ -3191,7 +3191,7 @@ DCH_from_char(FormatNode *node, char *in, TmFromChar *out) if (matched < 2) ereport(ERROR, (errcode(ERRCODE_INVALID_DATETIME_FORMAT), - errmsg("invalid input string for \"Y,YYY\""))); + errmsg("invalid input string for \"Y,YYY\""))); years += (millennia * 1000); from_char_set_int(&out->year, years, n); out->yysz = 4; @@ -3805,7 +3805,7 @@ do_to_timestamp(text *date_txt, text *fmt, if (!tm->tm_year && !tmfc.bc) ereport(ERROR, (errcode(ERRCODE_INVALID_DATETIME_FORMAT), - errmsg("cannot calculate day of year without year information"))); + errmsg("cannot calculate day of year without year information"))); if (tmfc.mode == FROM_CHAR_DATE_ISOWEEK) { @@ -4646,7 +4646,7 @@ NUM_numpart_to_char(NUMProc *Np, int id) static char * NUM_processor(FormatNode *node, NUMDesc *Num, char *inout, - char *number, int from_char_input_len, int to_char_out_pre_spaces, + char *number, int from_char_input_len, int to_char_out_pre_spaces, int sign, bool is_to_char, Oid collid) { FormatNode *n; @@ -5129,15 +5129,15 @@ numeric_to_number(PG_FUNCTION_ARGS) result = DirectFunctionCall3(numeric_in, CStringGetDatum(numstr), ObjectIdGetDatum(InvalidOid), - Int32GetDatum(((precision << 16) | scale) + VARHDRSZ)); + Int32GetDatum(((precision << 16) | scale) + VARHDRSZ)); if (IS_MULTI(&Num)) { Numeric x; Numeric a = DatumGetNumeric(DirectFunctionCall1(int4_numeric, - Int32GetDatum(10))); + Int32GetDatum(10))); Numeric b = DatumGetNumeric(DirectFunctionCall1(int4_numeric, - Int32GetDatum(-Num.multi))); + Int32GetDatum(-Num.multi))); x = DatumGetNumeric(DirectFunctionCall2(numeric_power, NumericGetDatum(a), @@ -5183,7 +5183,7 @@ numeric_to_char(PG_FUNCTION_ARGS) Int32GetDatum(0))); numstr = orgnum = int_to_roman(DatumGetInt32(DirectFunctionCall1(numeric_int4, - NumericGetDatum(x)))); + NumericGetDatum(x)))); } else if (IS_EEEE(&Num)) { @@ -5224,9 +5224,9 @@ numeric_to_char(PG_FUNCTION_ARGS) if (IS_MULTI(&Num)) { Numeric a = DatumGetNumeric(DirectFunctionCall1(int4_numeric, - Int32GetDatum(10))); + Int32GetDatum(10))); Numeric b = DatumGetNumeric(DirectFunctionCall1(int4_numeric, - Int32GetDatum(Num.multi))); + Int32GetDatum(Num.multi))); x = DatumGetNumeric(DirectFunctionCall2(numeric_power, NumericGetDatum(a), @@ -5329,7 +5329,7 @@ int4_to_char(PG_FUNCTION_ARGS) else { orgnum = DatumGetCString(DirectFunctionCall1(int4out, - Int32GetDatum(value))); + Int32GetDatum(value))); } if (*orgnum == '-') @@ -5397,7 +5397,7 @@ int8_to_char(PG_FUNCTION_ARGS) { /* Currently don't support int8 conversion to roman... */ numstr = orgnum = int_to_roman(DatumGetInt32( - DirectFunctionCall1(int84, Int64GetDatum(value)))); + DirectFunctionCall1(int84, Int64GetDatum(value)))); } else if (IS_EEEE(&Num)) { @@ -5434,8 +5434,8 @@ int8_to_char(PG_FUNCTION_ARGS) value = DatumGetInt64(DirectFunctionCall2(int8mul, Int64GetDatum(value), - DirectFunctionCall1(dtoi8, - Float8GetDatum(multi)))); + DirectFunctionCall1(dtoi8, + Float8GetDatum(multi)))); Num.pre += Num.multi; } diff --git a/src/backend/utils/adt/genfile.c b/src/backend/utils/adt/genfile.c index 5b15562ba5b..5285aa54f1c 100644 --- a/src/backend/utils/adt/genfile.c +++ b/src/backend/utils/adt/genfile.c @@ -60,7 +60,7 @@ convert_and_check_filename(text *arg) if (path_contains_parent_reference(filename)) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - (errmsg("reference to parent directory (\"..\") not allowed")))); + (errmsg("reference to parent directory (\"..\") not allowed")))); /* * Allow absolute paths if within DataDir or Log_directory, even @@ -112,7 +112,7 @@ read_binary_file(const char *filename, int64 seek_offset, int64 bytes_to_read, else ereport(ERROR, (errcode_for_file_access(), - errmsg("could not stat file \"%s\": %m", filename))); + errmsg("could not stat file \"%s\": %m", filename))); } bytes_to_read = fst.st_size - seek_offset; diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c index 97210e8db3f..0348855b11c 100644 --- a/src/backend/utils/adt/geo_ops.c +++ b/src/backend/utils/adt/geo_ops.c @@ -1401,7 +1401,7 @@ path_recv(PG_FUNCTION_ARGS) if (npts <= 0 || npts >= (int32) ((INT_MAX - offsetof(PATH, p)) / sizeof(Point))) ereport(ERROR, (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), - errmsg("invalid number of points in external \"path\" value"))); + errmsg("invalid number of points in external \"path\" value"))); size = offsetof(PATH, p) + sizeof(path->p[0]) * npts; path = (PATH *) palloc(size); @@ -1907,7 +1907,7 @@ point_dt(Point *pt1, Point *pt2) { #ifdef GEODEBUG printf("point_dt- segment (%f,%f),(%f,%f) length is %f\n", - pt1->x, pt1->y, pt2->x, pt2->y, HYPOT(pt1->x - pt2->x, pt1->y - pt2->y)); + pt1->x, pt1->y, pt2->x, pt2->y, HYPOT(pt1->x - pt2->x, pt1->y - pt2->y)); #endif return HYPOT(pt1->x - pt2->x, pt1->y - pt2->y); } @@ -3225,10 +3225,10 @@ on_sl(PG_FUNCTION_ARGS) LINE *line = PG_GETARG_LINE_P(1); PG_RETURN_BOOL(DatumGetBool(DirectFunctionCall2(on_pl, - PointPGetDatum(&lseg->p[0]), + PointPGetDatum(&lseg->p[0]), LinePGetDatum(line))) && DatumGetBool(DirectFunctionCall2(on_pl, - PointPGetDatum(&lseg->p[1]), + PointPGetDatum(&lseg->p[1]), LinePGetDatum(line)))); } @@ -3239,10 +3239,10 @@ on_sb(PG_FUNCTION_ARGS) BOX *box = PG_GETARG_BOX_P(1); PG_RETURN_BOOL(DatumGetBool(DirectFunctionCall2(on_pb, - PointPGetDatum(&lseg->p[0]), + PointPGetDatum(&lseg->p[0]), BoxPGetDatum(box))) && DatumGetBool(DirectFunctionCall2(on_pb, - PointPGetDatum(&lseg->p[1]), + PointPGetDatum(&lseg->p[1]), BoxPGetDatum(box)))); } @@ -3484,7 +3484,7 @@ poly_recv(PG_FUNCTION_ARGS) if (npts <= 0 || npts >= (int32) ((INT_MAX - offsetof(POLYGON, p)) / sizeof(Point))) ereport(ERROR, (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), - errmsg("invalid number of points in external \"polygon\" value"))); + errmsg("invalid number of points in external \"polygon\" value"))); size = offsetof(POLYGON, p) + sizeof(poly->p[0]) * npts; poly = (POLYGON *) palloc0(size); /* zero any holes */ @@ -5164,7 +5164,7 @@ circle_poly(PG_FUNCTION_ARGS) if (FPzero(circle->radius)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot convert circle with radius zero to polygon"))); + errmsg("cannot convert circle with radius zero to polygon"))); if (npts < 2) ereport(ERROR, diff --git a/src/backend/utils/adt/inet_cidr_ntop.c b/src/backend/utils/adt/inet_cidr_ntop.c index d5d1289d7d9..2973d566587 100644 --- a/src/backend/utils/adt/inet_cidr_ntop.c +++ b/src/backend/utils/adt/inet_cidr_ntop.c @@ -241,8 +241,8 @@ inet_cidr_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size) } if (zero_l != words && zero_s == 0 && ((zero_l == 6) || - ((zero_l == 5 && s[10] == 0xff && s[11] == 0xff) || - ((zero_l == 7 && s[14] != 0 && s[15] != 1))))) + ((zero_l == 5 && s[10] == 0xff && s[11] == 0xff) || + ((zero_l == 7 && s[14] != 0 && s[15] != 1))))) is_ipv4 = 1; /* Format whole words. */ diff --git a/src/backend/utils/adt/json.c b/src/backend/utils/adt/json.c index 8b822b27366..4dd7d977e8a 100644 --- a/src/backend/utils/adt/json.c +++ b/src/backend/utils/adt/json.c @@ -837,11 +837,11 @@ json_lex_string(JsonLexContext *lex) { if (hi_surrogate != -1) ereport(ERROR, - (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for type %s", - "json"), - errdetail("Unicode high surrogate must not follow a high surrogate."), - report_json_context(lex))); + (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), + errmsg("invalid input syntax for type %s", + "json"), + errdetail("Unicode high surrogate must not follow a high surrogate."), + report_json_context(lex))); hi_surrogate = (ch & 0x3ff) << 10; continue; } @@ -849,10 +849,10 @@ json_lex_string(JsonLexContext *lex) { if (hi_surrogate == -1) ereport(ERROR, - (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for type %s", "json"), - errdetail("Unicode low surrogate must follow a high surrogate."), - report_json_context(lex))); + (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), + errmsg("invalid input syntax for type %s", "json"), + errdetail("Unicode low surrogate must follow a high surrogate."), + report_json_context(lex))); ch = 0x10000 + hi_surrogate + (ch & 0x3ff); hi_surrogate = -1; } @@ -860,7 +860,7 @@ json_lex_string(JsonLexContext *lex) if (hi_surrogate != -1) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for type %s", "json"), + errmsg("invalid input syntax for type %s", "json"), errdetail("Unicode low surrogate must follow a high surrogate."), report_json_context(lex))); @@ -876,8 +876,8 @@ json_lex_string(JsonLexContext *lex) /* We can't allow this, since our TEXT type doesn't */ ereport(ERROR, (errcode(ERRCODE_UNTRANSLATABLE_CHARACTER), - errmsg("unsupported Unicode escape sequence"), - errdetail("\\u0000 cannot be converted to text."), + errmsg("unsupported Unicode escape sequence"), + errdetail("\\u0000 cannot be converted to text."), report_json_context(lex))); } else if (GetDatabaseEncoding() == PG_UTF8) @@ -899,7 +899,7 @@ json_lex_string(JsonLexContext *lex) { ereport(ERROR, (errcode(ERRCODE_UNTRANSLATABLE_CHARACTER), - errmsg("unsupported Unicode escape sequence"), + errmsg("unsupported Unicode escape sequence"), errdetail("Unicode escape values cannot be used for code point values above 007F when the server encoding is not UTF8."), report_json_context(lex))); } @@ -945,8 +945,8 @@ json_lex_string(JsonLexContext *lex) (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), errmsg("invalid input syntax for type %s", "json"), - errdetail("Escape sequence \"\\%s\" is invalid.", - extract_mb_char(s)), + errdetail("Escape sequence \"\\%s\" is invalid.", + extract_mb_char(s)), report_json_context(lex))); } } @@ -987,7 +987,7 @@ json_lex_string(JsonLexContext *lex) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), errmsg("invalid input syntax for type %s", "json"), - errdetail("Unicode low surrogate must follow a high surrogate."), + errdetail("Unicode low surrogate must follow a high surrogate."), report_json_context(lex))); /* Hooray, we found the end of the string! */ @@ -1181,16 +1181,16 @@ report_parse_error(JsonParseContext ctx, JsonLexContext *lex) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), errmsg("invalid input syntax for type %s", "json"), - errdetail("Expected \",\" or \"]\", but found \"%s\".", - token), + errdetail("Expected \",\" or \"]\", but found \"%s\".", + token), report_json_context(lex))); break; case JSON_PARSE_OBJECT_START: ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), errmsg("invalid input syntax for type %s", "json"), - errdetail("Expected string or \"}\", but found \"%s\".", - token), + errdetail("Expected string or \"}\", but found \"%s\".", + token), report_json_context(lex))); break; case JSON_PARSE_OBJECT_LABEL: @@ -1205,8 +1205,8 @@ report_parse_error(JsonParseContext ctx, JsonLexContext *lex) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), errmsg("invalid input syntax for type %s", "json"), - errdetail("Expected \",\" or \"}\", but found \"%s\".", - token), + errdetail("Expected \",\" or \"}\", but found \"%s\".", + token), report_json_context(lex))); break; case JSON_PARSE_OBJECT_COMMA: @@ -1471,7 +1471,7 @@ datum_to_json(Datum val, bool is_null, StringInfo result, tcategory == JSONTYPE_CAST)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("key value must be scalar, not array, composite, or json"))); + errmsg("key value must be scalar, not array, composite, or json"))); switch (tcategory) { @@ -2008,7 +2008,7 @@ json_object_agg_transfn(PG_FUNCTION_ARGS) if (arg_type == InvalidOid) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("could not determine data type for argument %d", 1))); + errmsg("could not determine data type for argument %d", 1))); json_categorize_type(arg_type, &state->key_category, &state->key_output_func); @@ -2018,7 +2018,7 @@ json_object_agg_transfn(PG_FUNCTION_ARGS) if (arg_type == InvalidOid) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("could not determine data type for argument %d", 2))); + errmsg("could not determine data type for argument %d", 2))); json_categorize_type(arg_type, &state->val_category, &state->val_output_func); diff --git a/src/backend/utils/adt/jsonb.c b/src/backend/utils/adt/jsonb.c index 3e206c21213..49f41f9f999 100644 --- a/src/backend/utils/adt/jsonb.c +++ b/src/backend/utils/adt/jsonb.c @@ -320,8 +320,8 @@ jsonb_put_escaped_value(StringInfo out, JsonbValue *scalarVal) break; case jbvNumeric: appendStringInfoString(out, - DatumGetCString(DirectFunctionCall1(numeric_out, - PointerGetDatum(scalarVal->val.numeric)))); + DatumGetCString(DirectFunctionCall1(numeric_out, + PointerGetDatum(scalarVal->val.numeric)))); break; case jbvBool: if (scalarVal->val.boolean) @@ -664,7 +664,7 @@ jsonb_categorize_type(Oid typoid, CoercionPathType ctype; ctype = find_coercion_pathway(JSONOID, typoid, - COERCION_EXPLICIT, &castfunc); + COERCION_EXPLICIT, &castfunc); if (ctype == COERCION_PATH_FUNC && OidIsValid(castfunc)) { *tcategory = JSONBTYPE_JSONCAST; @@ -722,7 +722,7 @@ datum_to_jsonb(Datum val, bool is_null, JsonbInState *result, { ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("key value must be scalar, not array, composite, or json"))); + errmsg("key value must be scalar, not array, composite, or json"))); } else { @@ -1212,7 +1212,7 @@ jsonb_build_object(PG_FUNCTION_ARGS) if (val_type == InvalidOid || val_type == UNKNOWNOID) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("could not determine data type for argument %d", i + 1))); + errmsg("could not determine data type for argument %d", i + 1))); add_jsonb(arg, false, &result, val_type, true); @@ -1235,7 +1235,7 @@ jsonb_build_object(PG_FUNCTION_ARGS) if (val_type == InvalidOid || val_type == UNKNOWNOID) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("could not determine data type for argument %d", i + 2))); + errmsg("could not determine data type for argument %d", i + 2))); add_jsonb(arg, PG_ARGISNULL(i + 1), &result, val_type, false); } @@ -1295,7 +1295,7 @@ jsonb_build_array(PG_FUNCTION_ARGS) if (val_type == InvalidOid || val_type == UNKNOWNOID) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("could not determine data type for argument %d", i + 1))); + errmsg("could not determine data type for argument %d", i + 1))); add_jsonb(arg, PG_ARGISNULL(i), &result, val_type, false); } @@ -1662,7 +1662,7 @@ jsonb_agg_transfn(PG_FUNCTION_ARGS) /* same for numeric */ v.val.numeric = DatumGetNumeric(DirectFunctionCall1(numeric_uplus, - NumericGetDatum(v.val.numeric))); + NumericGetDatum(v.val.numeric))); } result->res = pushJsonbValue(&result->parseState, type, &v); @@ -1892,7 +1892,7 @@ jsonb_object_agg_transfn(PG_FUNCTION_ARGS) /* same for numeric */ v.val.numeric = DatumGetNumeric(DirectFunctionCall1(numeric_uplus, - NumericGetDatum(v.val.numeric))); + NumericGetDatum(v.val.numeric))); } result->res = pushJsonbValue(&result->parseState, single_scalar ? WJB_VALUE : type, diff --git a/src/backend/utils/adt/jsonb_util.c b/src/backend/utils/adt/jsonb_util.c index 0d2abb35b96..4850569bb5e 100644 --- a/src/backend/utils/adt/jsonb_util.c +++ b/src/backend/utils/adt/jsonb_util.c @@ -557,7 +557,7 @@ pushJsonbValueScalar(JsonbParseState **pstate, JsonbIteratorToken seq, (*pstate)->contVal.type = jbvArray; (*pstate)->contVal.val.array.nElems = 0; (*pstate)->contVal.val.array.rawScalar = (scalarVal && - scalarVal->val.array.rawScalar); + scalarVal->val.array.rawScalar); if (scalarVal && scalarVal->val.array.nElems > 0) { /* Assume that this array is still really a scalar */ @@ -872,7 +872,7 @@ recurse: JBE_ADVANCE_OFFSET((*it)->curDataOffset, (*it)->children[(*it)->curIndex]); JBE_ADVANCE_OFFSET((*it)->curValueOffset, - (*it)->children[(*it)->curIndex + (*it)->nElems]); + (*it)->children[(*it)->curIndex + (*it)->nElems]); (*it)->curIndex++; /* @@ -1228,7 +1228,7 @@ JsonbHashScalarValue(const JsonbValue *scalarVal, uint32 *hash) case jbvNumeric: /* Must hash equal numerics to equal hash codes */ tmp = DatumGetUInt32(DirectFunctionCall1(hash_numeric, - NumericGetDatum(scalarVal->val.numeric))); + NumericGetDatum(scalarVal->val.numeric))); break; case jbvBool: tmp = scalarVal->val.boolean ? 0x02 : 0x04; @@ -1265,8 +1265,8 @@ equalsJsonbScalarValue(JsonbValue *aScalar, JsonbValue *bScalar) return lengthCompareJsonbStringValue(aScalar, bScalar) == 0; case jbvNumeric: return DatumGetBool(DirectFunctionCall2(numeric_eq, - PointerGetDatum(aScalar->val.numeric), - PointerGetDatum(bScalar->val.numeric))); + PointerGetDatum(aScalar->val.numeric), + PointerGetDatum(bScalar->val.numeric))); case jbvBool: return aScalar->val.boolean == bScalar->val.boolean; @@ -1301,8 +1301,8 @@ compareJsonbScalarValue(JsonbValue *aScalar, JsonbValue *bScalar) DEFAULT_COLLATION_OID); case jbvNumeric: return DatumGetInt32(DirectFunctionCall2(numeric_cmp, - PointerGetDatum(aScalar->val.numeric), - PointerGetDatum(bScalar->val.numeric))); + PointerGetDatum(aScalar->val.numeric), + PointerGetDatum(bScalar->val.numeric))); case jbvBool: if (aScalar->val.boolean == bScalar->val.boolean) return 0; diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c index aa0dc165f02..4779e74895c 100644 --- a/src/backend/utils/adt/jsonfuncs.c +++ b/src/backend/utils/adt/jsonfuncs.c @@ -426,7 +426,7 @@ static Datum populate_scalar(ScalarIOData *io, Oid typid, int32 typmod, JsValue static void prepare_column_cache(ColumnIOData *column, Oid typid, int32 typmod, MemoryContext mcxt, bool json); static Datum populate_record_field(ColumnIOData *col, Oid typid, int32 typmod, - const char *colname, MemoryContext mcxt, Datum defaultval, + const char *colname, MemoryContext mcxt, Datum defaultval, JsValue *jsv, bool *isnull); static RecordIOData *allocate_record_info(MemoryContext mcxt, int ncolumns); static bool JsObjectGetField(JsObject *obj, char *field, JsValue *jsv); @@ -766,7 +766,7 @@ jsonb_object_field_text(PG_FUNCTION_ARGS) break; case jbvNumeric: result = cstring_to_text(DatumGetCString(DirectFunctionCall1(numeric_out, - PointerGetDatum(v->val.numeric)))); + PointerGetDatum(v->val.numeric)))); break; case jbvBinary: { @@ -883,7 +883,7 @@ jsonb_array_element_text(PG_FUNCTION_ARGS) break; case jbvNumeric: result = cstring_to_text(DatumGetCString(DirectFunctionCall1(numeric_out, - PointerGetDatum(v->val.numeric)))); + PointerGetDatum(v->val.numeric)))); break; case jbvBinary: { @@ -1446,7 +1446,7 @@ get_jsonb_path_all(FunctionCallInfo fcinfo, bool as_text) jbvp = findJsonbValueFromContainerLen(container, JB_FOBJECT, VARDATA(pathtext[i]), - VARSIZE(pathtext[i]) - VARHDRSZ); + VARSIZE(pathtext[i]) - VARHDRSZ); } else if (have_array) { @@ -2161,7 +2161,7 @@ elements_worker(FunctionCallInfo fcinfo, const char *funcname, bool as_text) state->next_scalar = false; state->lex = lex; state->tmp_cxt = AllocSetContextCreate(CurrentMemoryContext, - "json_array_elements temporary cxt", + "json_array_elements temporary cxt", ALLOCSET_DEFAULT_SIZES); pg_parse_json(lex, sem); @@ -2818,7 +2818,7 @@ populate_scalar(ScalarIOData *io, Oid typid, int32 typmod, JsValue *jsv) str = pstrdup(jbv->val.boolean ? "true" : "false"); else if (jbv->type == jbvNumeric) str = DatumGetCString(DirectFunctionCall1(numeric_out, - PointerGetDatum(jbv->val.numeric))); + PointerGetDatum(jbv->val.numeric))); else if (jbv->type == jbvBinary) str = JsonbToCString(NULL, jbv->val.binary.data, jbv->val.binary.len); @@ -2887,7 +2887,7 @@ prepare_column_cache(ColumnIOData *column, column->io.domain.base_typid = type->typbasetype; column->io.domain.base_typmod = type->typtypmod; column->io.domain.base_io = MemoryContextAllocZero(mcxt, - sizeof(ColumnIOData)); + sizeof(ColumnIOData)); column->io.domain.domain_info = NULL; } else if (type->typtype == TYPTYPE_COMPOSITE || typid == RECORDOID) @@ -2900,7 +2900,7 @@ prepare_column_cache(ColumnIOData *column, { column->typcat = TYPECAT_ARRAY; column->io.array.element_info = MemoryContextAllocZero(mcxt, - sizeof(ColumnIOData)); + sizeof(ColumnIOData)); column->io.array.element_type = type->typelem; /* array element typemod stored in attribute's typmod */ column->io.array.element_typmod = typmod; @@ -3379,7 +3379,7 @@ hash_array_start(void *state) if (_state->lex->lex_level == 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("cannot call %s on an array", _state->function_name))); + errmsg("cannot call %s on an array", _state->function_name))); } static void @@ -3390,7 +3390,7 @@ hash_scalar(void *state, char *token, JsonTokenType tokentype) if (_state->lex->lex_level == 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("cannot call %s on a scalar", _state->function_name))); + errmsg("cannot call %s on a scalar", _state->function_name))); if (_state->lex->lex_level == 1) { @@ -3580,8 +3580,8 @@ populate_recordset_worker(FunctionCallInfo fcinfo, const char *funcname, !JsonContainerIsObject(v.val.binary.data)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("argument of %s must be an array of objects", - funcname))); + errmsg("argument of %s must be an array of objects", + funcname))); obj.is_json = false; obj.val.jsonb_cont = v.val.binary.data; @@ -4712,8 +4712,8 @@ setPathArray(JsonbIterator **it, Datum *path_elems, bool *path_nulls, lindex < INT_MIN) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("path element at position %d is not an integer: \"%s\"", - level + 1, c))); + errmsg("path element at position %d is not an integer: \"%s\"", + level + 1, c))); idx = lindex; } else @@ -4871,7 +4871,7 @@ iterate_string_values_scalar(void *state, char *token, JsonTokenType tokentype) */ Jsonb * transform_jsonb_string_values(Jsonb *jsonb, void *action_state, - JsonTransformStringValuesAction transform_action) + JsonTransformStringValuesAction transform_action) { JsonbIterator *it; JsonbValue v, diff --git a/src/backend/utils/adt/levenshtein.c b/src/backend/utils/adt/levenshtein.c index 4f40f279db2..97e034b453e 100644 --- a/src/backend/utils/adt/levenshtein.c +++ b/src/backend/utils/adt/levenshtein.c @@ -130,8 +130,8 @@ varstr_levenshtein(const char *source, int slen, n > MAX_LEVENSHTEIN_STRLEN)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("levenshtein argument exceeds maximum length of %d characters", - MAX_LEVENSHTEIN_STRLEN))); + errmsg("levenshtein argument exceeds maximum length of %d characters", + MAX_LEVENSHTEIN_STRLEN))); #ifdef LEVENSHTEIN_LESS_EQUAL /* Initialize start and stop columns. */ diff --git a/src/backend/utils/adt/like.c b/src/backend/utils/adt/like.c index d4d173480d0..37394f4972c 100644 --- a/src/backend/utils/adt/like.c +++ b/src/backend/utils/adt/like.c @@ -180,7 +180,7 @@ Generic_Text_IC_like(text *str, text *pat, Oid collation) */ ereport(ERROR, (errcode(ERRCODE_INDETERMINATE_COLLATION), - errmsg("could not determine which collation to use for ILIKE"), + errmsg("could not determine which collation to use for ILIKE"), errhint("Use the COLLATE clause to set the collation explicitly."))); } locale = pg_newlocale_from_collation(collation); diff --git a/src/backend/utils/adt/like_match.c b/src/backend/utils/adt/like_match.c index 087a720625b..8ed362a8ff2 100644 --- a/src/backend/utils/adt/like_match.c +++ b/src/backend/utils/adt/like_match.c @@ -104,7 +104,7 @@ MatchText(char *t, int tlen, char *p, int plen, if (plen <= 0) ereport(ERROR, (errcode(ERRCODE_INVALID_ESCAPE_SEQUENCE), - errmsg("LIKE pattern must not end with escape character"))); + errmsg("LIKE pattern must not end with escape character"))); if (GETCHAR(*p) != GETCHAR(*t)) return LIKE_FALSE; } @@ -290,7 +290,7 @@ do_like_escape(text *pat, text *esc) ereport(ERROR, (errcode(ERRCODE_INVALID_ESCAPE_SEQUENCE), errmsg("invalid escape string"), - errhint("Escape string must be empty or one character."))); + errhint("Escape string must be empty or one character."))); e = VARDATA_ANY(esc); diff --git a/src/backend/utils/adt/lockfuncs.c b/src/backend/utils/adt/lockfuncs.c index ef4824f79cc..9e0a8ab79d4 100644 --- a/src/backend/utils/adt/lockfuncs.c +++ b/src/backend/utils/adt/lockfuncs.c @@ -661,7 +661,7 @@ PreventAdvisoryLocksInParallelMode(void) if (IsInParallelMode()) ereport(ERROR, (errcode(ERRCODE_INVALID_TRANSACTION_STATE), - errmsg("cannot use advisory locks during a parallel operation"))); + errmsg("cannot use advisory locks during a parallel operation"))); } /* diff --git a/src/backend/utils/adt/mac.c b/src/backend/utils/adt/mac.c index c2b52d80468..d1c20c30865 100644 --- a/src/backend/utils/adt/mac.c +++ b/src/backend/utils/adt/mac.c @@ -99,7 +99,7 @@ macaddr_in(PG_FUNCTION_ARGS) (e < 0) || (e > 255) || (f < 0) || (f > 255)) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("invalid octet value in \"macaddr\" value: \"%s\"", str))); + errmsg("invalid octet value in \"macaddr\" value: \"%s\"", str))); result = (macaddr *) palloc(sizeof(macaddr)); @@ -460,7 +460,7 @@ macaddr_abbrev_abort(int memtupcount, SortSupport ssup) if (trace_sort) elog(LOG, "macaddr_abbrev: aborting abbreviation at cardinality %f" - " below threshold %f after " INT64_FORMAT " values (%d rows)", + " below threshold %f after " INT64_FORMAT " values (%d rows)", abbr_card, uss->input_count / 2000.0 + 0.5, uss->input_count, memtupcount); #endif diff --git a/src/backend/utils/adt/mac8.c b/src/backend/utils/adt/mac8.c index 1ed4183be7f..482d1fb5bf3 100644 --- a/src/backend/utils/adt/mac8.c +++ b/src/backend/utils/adt/mac8.c @@ -163,8 +163,8 @@ macaddr8_in(PG_FUNCTION_ARGS) /* must be trailing garbage... */ ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for type %s: \"%s\"", "macaddr8", - str))); + errmsg("invalid input syntax for type %s: \"%s\"", "macaddr8", + str))); } /* Move forward to where the next byte should be */ @@ -181,8 +181,8 @@ macaddr8_in(PG_FUNCTION_ARGS) else if (spacer != *ptr) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for type %s: \"%s\"", "macaddr8", - str))); + errmsg("invalid input syntax for type %s: \"%s\"", "macaddr8", + str))); /* move past the spacer */ ptr++; @@ -218,8 +218,8 @@ macaddr8_in(PG_FUNCTION_ARGS) else if (count != 8) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for type %s: \"%s\"", "macaddr8", - str))); + errmsg("invalid input syntax for type %s: \"%s\"", "macaddr8", + str))); result = (macaddr8 *) palloc0(sizeof(macaddr8)); @@ -552,10 +552,10 @@ macaddr8tomacaddr(PG_FUNCTION_ARGS) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), errmsg("macaddr8 data out of range to convert to macaddr"), - errhint("Only addresses that have FF and FE as values in the " - "4th and 5th bytes, from the left, for example: " - "XX-XX-XX-FF-FE-XX-XX-XX, are eligible to be converted " - "from macaddr8 to macaddr."))); + errhint("Only addresses that have FF and FE as values in the " + "4th and 5th bytes, from the left, for example: " + "XX-XX-XX-FF-FE-XX-XX-XX, are eligible to be converted " + "from macaddr8 to macaddr."))); result->a = addr->a; result->b = addr->b; diff --git a/src/backend/utils/adt/misc.c b/src/backend/utils/adt/misc.c index 9cc0b08e969..62341b84d1c 100644 --- a/src/backend/utils/adt/misc.c +++ b/src/backend/utils/adt/misc.c @@ -310,7 +310,7 @@ pg_terminate_backend(PG_FUNCTION_ARGS) if (r == SIGNAL_BACKEND_NOSUPERUSER) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - (errmsg("must be a superuser to terminate superuser process")))); + (errmsg("must be a superuser to terminate superuser process")))); if (r == SIGNAL_BACKEND_NOPERMISSION) ereport(ERROR, @@ -352,7 +352,7 @@ pg_rotate_logfile(PG_FUNCTION_ARGS) if (!Logging_collector) { ereport(WARNING, - (errmsg("rotation not possible because log collection not active"))); + (errmsg("rotation not possible because log collection not active"))); PG_RETURN_BOOL(false); } @@ -410,7 +410,7 @@ pg_tablespace_databases(PG_FUNCTION_ARGS) errmsg("could not open directory \"%s\": %m", fctx->location))); ereport(WARNING, - (errmsg("%u is not a tablespace OID", tablespaceOid))); + (errmsg("%u is not a tablespace OID", tablespaceOid))); } } funcctx->user_fctx = fctx; @@ -789,9 +789,9 @@ parse_ident(PG_FUNCTION_ARGS) if (endp == NULL) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("string is not a valid identifier: \"%s\"", - text_to_cstring(qualname)), - errdetail("String has unclosed double quotes."))); + errmsg("string is not a valid identifier: \"%s\"", + text_to_cstring(qualname)), + errdetail("String has unclosed double quotes."))); if (endp[1] != '"') break; memmove(endp, endp + 1, strlen(endp)); @@ -952,7 +952,7 @@ pg_current_logfile(PG_FUNCTION_ARGS) { /* Uh oh. No newline found, so file content is corrupted. */ elog(ERROR, - "missing newline character in \"%s\"", LOG_METAINFO_DATAFILE); + "missing newline character in \"%s\"", LOG_METAINFO_DATAFILE); break; } *nlpos = '\0'; diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c index e3a858c7c7b..2c5948052d3 100644 --- a/src/backend/utils/adt/nabstime.c +++ b/src/backend/utils/adt/nabstime.c @@ -159,7 +159,7 @@ tm2abstime(struct pg_tm *tm, int tz) tm->tm_mday < 1 || tm->tm_mday > 31 || tm->tm_hour < 0 || tm->tm_hour > HOURS_PER_DAY || /* test for > 24:00:00 */ - (tm->tm_hour == HOURS_PER_DAY && (tm->tm_min > 0 || tm->tm_sec > 0)) || + (tm->tm_hour == HOURS_PER_DAY && (tm->tm_min > 0 || tm->tm_sec > 0)) || tm->tm_min < 0 || tm->tm_min > MINS_PER_HOUR - 1 || tm->tm_sec < 0 || tm->tm_sec > SECS_PER_MINUTE) return INVALID_ABSTIME; @@ -479,7 +479,7 @@ abstime_timestamp(PG_FUNCTION_ARGS) case INVALID_ABSTIME: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot convert abstime \"invalid\" to timestamp"))); + errmsg("cannot convert abstime \"invalid\" to timestamp"))); TIMESTAMP_NOBEGIN(result); break; @@ -552,7 +552,7 @@ abstime_timestamptz(PG_FUNCTION_ARGS) case INVALID_ABSTIME: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot convert abstime \"invalid\" to timestamp"))); + errmsg("cannot convert abstime \"invalid\" to timestamp"))); TIMESTAMP_NOBEGIN(result); break; @@ -741,12 +741,12 @@ tintervalout(PG_FUNCTION_ARGS) else { p = DatumGetCString(DirectFunctionCall1(abstimeout, - AbsoluteTimeGetDatum(tinterval->data[0]))); + AbsoluteTimeGetDatum(tinterval->data[0]))); strcat(i_str, p); pfree(p); strcat(i_str, "\" \""); p = DatumGetCString(DirectFunctionCall1(abstimeout, - AbsoluteTimeGetDatum(tinterval->data[1]))); + AbsoluteTimeGetDatum(tinterval->data[1]))); strcat(i_str, p); pfree(p); } @@ -849,7 +849,7 @@ reltime_interval(PG_FUNCTION_ARGS) case INVALID_RELTIME: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot convert reltime \"invalid\" to interval"))); + errmsg("cannot convert reltime \"invalid\" to interval"))); result->time = 0; result->day = 0; result->month = 0; @@ -958,10 +958,10 @@ intinterval(PG_FUNCTION_ARGS) { if (DatumGetBool(DirectFunctionCall2(abstimege, AbsoluteTimeGetDatum(t), - AbsoluteTimeGetDatum(tinterval->data[0]))) && + AbsoluteTimeGetDatum(tinterval->data[0]))) && DatumGetBool(DirectFunctionCall2(abstimele, AbsoluteTimeGetDatum(t), - AbsoluteTimeGetDatum(tinterval->data[1])))) + AbsoluteTimeGetDatum(tinterval->data[1])))) PG_RETURN_BOOL(true); } PG_RETURN_BOOL(false); @@ -1108,7 +1108,7 @@ tintervalsame(PG_FUNCTION_ARGS) if (DatumGetBool(DirectFunctionCall2(abstimeeq, AbsoluteTimeGetDatum(i1->data[0]), - AbsoluteTimeGetDatum(i2->data[0]))) && + AbsoluteTimeGetDatum(i2->data[0]))) && DatumGetBool(DirectFunctionCall2(abstimeeq, AbsoluteTimeGetDatum(i1->data[1]), AbsoluteTimeGetDatum(i2->data[1])))) @@ -1353,7 +1353,7 @@ tintervalct(PG_FUNCTION_ARGS) PG_RETURN_BOOL(false); if (DatumGetBool(DirectFunctionCall2(abstimele, AbsoluteTimeGetDatum(i1->data[0]), - AbsoluteTimeGetDatum(i2->data[0]))) && + AbsoluteTimeGetDatum(i2->data[0]))) && DatumGetBool(DirectFunctionCall2(abstimege, AbsoluteTimeGetDatum(i1->data[1]), AbsoluteTimeGetDatum(i2->data[1])))) @@ -1374,7 +1374,7 @@ tintervalov(PG_FUNCTION_ARGS) PG_RETURN_BOOL(false); if (DatumGetBool(DirectFunctionCall2(abstimelt, AbsoluteTimeGetDatum(i1->data[1]), - AbsoluteTimeGetDatum(i2->data[0]))) || + AbsoluteTimeGetDatum(i2->data[0]))) || DatumGetBool(DirectFunctionCall2(abstimegt, AbsoluteTimeGetDatum(i1->data[0]), AbsoluteTimeGetDatum(i2->data[1])))) diff --git a/src/backend/utils/adt/network_selfuncs.c b/src/backend/utils/adt/network_selfuncs.c index 1d29ecd5217..c9927fff9be 100644 --- a/src/backend/utils/adt/network_selfuncs.c +++ b/src/backend/utils/adt/network_selfuncs.c @@ -287,7 +287,7 @@ networkjoinsel_inner(Oid operator, mcv1_exists = get_attstatsslot(&mcv1_slot, vardata1->statsTuple, STATISTIC_KIND_MCV, InvalidOid, - ATTSTATSSLOT_VALUES | ATTSTATSSLOT_NUMBERS); + ATTSTATSSLOT_VALUES | ATTSTATSSLOT_NUMBERS); hist1_exists = get_attstatsslot(&hist1_slot, vardata1->statsTuple, STATISTIC_KIND_HISTOGRAM, InvalidOid, ATTSTATSSLOT_VALUES); @@ -309,7 +309,7 @@ networkjoinsel_inner(Oid operator, mcv2_exists = get_attstatsslot(&mcv2_slot, vardata2->statsTuple, STATISTIC_KIND_MCV, InvalidOid, - ATTSTATSSLOT_VALUES | ATTSTATSSLOT_NUMBERS); + ATTSTATSSLOT_VALUES | ATTSTATSSLOT_NUMBERS); hist2_exists = get_attstatsslot(&hist2_slot, vardata2->statsTuple, STATISTIC_KIND_HISTOGRAM, InvalidOid, ATTSTATSSLOT_VALUES); @@ -360,7 +360,7 @@ networkjoinsel_inner(Oid operator, selec += (1.0 - nullfrac1 - sumcommon1) * (1.0 - nullfrac2 - sumcommon2) * inet_hist_inclusion_join_sel(hist1_slot.values, hist1_slot.nvalues, - hist2_slot.values, hist2_slot.nvalues, + hist2_slot.values, hist2_slot.nvalues, opr_codenum); /* @@ -417,7 +417,7 @@ networkjoinsel_semi(Oid operator, mcv1_exists = get_attstatsslot(&mcv1_slot, vardata1->statsTuple, STATISTIC_KIND_MCV, InvalidOid, - ATTSTATSSLOT_VALUES | ATTSTATSSLOT_NUMBERS); + ATTSTATSSLOT_VALUES | ATTSTATSSLOT_NUMBERS); hist1_exists = get_attstatsslot(&hist1_slot, vardata1->statsTuple, STATISTIC_KIND_HISTOGRAM, InvalidOid, ATTSTATSSLOT_VALUES); @@ -439,7 +439,7 @@ networkjoinsel_semi(Oid operator, mcv2_exists = get_attstatsslot(&mcv2_slot, vardata2->statsTuple, STATISTIC_KIND_MCV, InvalidOid, - ATTSTATSSLOT_VALUES | ATTSTATSSLOT_NUMBERS); + ATTSTATSSLOT_VALUES | ATTSTATSSLOT_NUMBERS); hist2_exists = get_attstatsslot(&hist2_slot, vardata2->statsTuple, STATISTIC_KIND_HISTOGRAM, InvalidOid, ATTSTATSSLOT_VALUES); diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c index 1a182a0725c..1d0ca1b7943 100644 --- a/src/backend/utils/adt/numeric.c +++ b/src/backend/utils/adt/numeric.c @@ -1026,8 +1026,8 @@ numerictypmodin(PG_FUNCTION_ARGS) if (tl[1] < 0 || tl[1] > tl[0]) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("NUMERIC scale %d must be between 0 and precision %d", - tl[1], tl[0]))); + errmsg("NUMERIC scale %d must be between 0 and precision %d", + tl[1], tl[0]))); typmod = ((tl[0] << 16) | tl[1]) + VARHDRSZ; } else if (n == 1) @@ -1497,7 +1497,7 @@ width_bucket_numeric(PG_FUNCTION_ARGS) NUMERIC_IS_NAN(bound2)) ereport(ERROR, (errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION), - errmsg("operand, lower bound, and upper bound cannot be NaN"))); + errmsg("operand, lower bound, and upper bound cannot be NaN"))); init_var(&result_var); init_var(&count_var); @@ -1509,8 +1509,8 @@ width_bucket_numeric(PG_FUNCTION_ARGS) { case 0: ereport(ERROR, - (errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION), - errmsg("lower bound cannot equal upper bound"))); + (errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION), + errmsg("lower bound cannot equal upper bound"))); /* bound1 < bound2 */ case -1: @@ -1770,7 +1770,7 @@ numeric_abbrev_abort(int memtupcount, SortSupport ssup) if (trace_sort) elog(LOG, "numeric_abbrev: aborting abbreviation at cardinality %f" - " below threshold %f after " INT64_FORMAT " values (%d rows)", + " below threshold %f after " INT64_FORMAT " values (%d rows)", abbr_card, nss->input_count / 10000.0 + 0.5, nss->input_count, memtupcount); #endif @@ -8361,7 +8361,7 @@ cmp_abs(NumericVar *var1, NumericVar *var2) */ static int cmp_abs_common(const NumericDigit *var1digits, int var1ndigits, int var1weight, - const NumericDigit *var2digits, int var2ndigits, int var2weight) + const NumericDigit *var2digits, int var2ndigits, int var2weight) { int i1 = 0; int i2 = 0; diff --git a/src/backend/utils/adt/numutils.c b/src/backend/utils/adt/numutils.c index 4ea2892c983..07682723b78 100644 --- a/src/backend/utils/adt/numutils.c +++ b/src/backend/utils/adt/numutils.c @@ -86,7 +86,7 @@ pg_atoi(const char *s, int size, int c) if (errno == ERANGE || l < SCHAR_MIN || l > SCHAR_MAX) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("value \"%s\" is out of range for 8-bit integer", s))); + errmsg("value \"%s\" is out of range for 8-bit integer", s))); break; default: elog(ERROR, "unsupported result size: %d", size); diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c index 7554fbb22c3..ad3fe74bbd6 100644 --- a/src/backend/utils/adt/pg_locale.c +++ b/src/backend/utils/adt/pg_locale.c @@ -1358,8 +1358,8 @@ pg_newlocale_from_collation(Oid collid) collator = ucol_open(collcollate, &status); if (U_FAILURE(status)) ereport(ERROR, - (errmsg("could not open collator for locale \"%s\": %s", - collcollate, u_errorName(status)))); + (errmsg("could not open collator for locale \"%s\": %s", + collcollate, u_errorName(status)))); result->info.icu.locale = strdup(collcollate); result->info.icu.ucol = collator; @@ -1368,7 +1368,7 @@ pg_newlocale_from_collation(Oid collid) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("ICU is not supported in this build"), \ - errhint("You need to rebuild PostgreSQL using --with-icu."))); + errhint("You need to rebuild PostgreSQL using --with-icu."))); #endif /* not USE_ICU */ } @@ -1398,13 +1398,13 @@ pg_newlocale_from_collation(Oid collid) (errmsg("collation \"%s\" has version mismatch", NameStr(collform->collname)), errdetail("The collation in the database was created using version %s, " - "but the operating system provides version %s.", + "but the operating system provides version %s.", collversionstr, actual_versionstr), errhint("Rebuild all objects affected by this collation and run " "ALTER COLLATION %s REFRESH VERSION, " - "or build PostgreSQL with the right library version.", + "or build PostgreSQL with the right library version.", quote_qualified_identifier(get_namespace_name(collform->collnamespace), - NameStr(collform->collname))))); + NameStr(collform->collname))))); } ReleaseSysCache(tp); @@ -1480,8 +1480,8 @@ init_icu_converter(void) conv = ucnv_open(icu_encoding_name, &status); if (U_FAILURE(status)) ereport(ERROR, - (errmsg("could not open ICU converter for encoding \"%s\": %s", - icu_encoding_name, u_errorName(status)))); + (errmsg("could not open ICU converter for encoding \"%s\": %s", + icu_encoding_name, u_errorName(status)))); icu_converter = conv; } diff --git a/src/backend/utils/adt/pg_upgrade_support.c b/src/backend/utils/adt/pg_upgrade_support.c index 4b340055f0f..c0b04746287 100644 --- a/src/backend/utils/adt/pg_upgrade_support.c +++ b/src/backend/utils/adt/pg_upgrade_support.c @@ -172,7 +172,7 @@ binary_upgrade_create_empty_extension(PG_FUNCTION_ARGS) InsertExtensionTuple(text_to_cstring(extName), GetUserId(), - get_namespace_oid(text_to_cstring(schemaName), false), + get_namespace_oid(text_to_cstring(schemaName), false), relocatable, text_to_cstring(extVersion), extConfig, diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c index e0cae1ba1e8..20ce48b2d82 100644 --- a/src/backend/utils/adt/pgstatfuncs.c +++ b/src/backend/utils/adt/pgstatfuncs.c @@ -784,7 +784,7 @@ pg_stat_get_activity(PG_FUNCTION_ARGS) { clean_ipv6_addr(beentry->st_clientaddr.addr.ss_family, remote_host); values[12] = DirectFunctionCall1(inet_in, - CStringGetDatum(remote_host)); + CStringGetDatum(remote_host)); if (beentry->st_clienthostname && beentry->st_clienthostname[0]) values[13] = CStringGetTextDatum(beentry->st_clienthostname); @@ -1859,5 +1859,5 @@ pg_stat_get_archiver(PG_FUNCTION_ARGS) /* Returns the record as Datum */ PG_RETURN_DATUM(HeapTupleGetDatum( - heap_form_tuple(tupdesc, values, nulls))); + heap_form_tuple(tupdesc, values, nulls))); } diff --git a/src/backend/utils/adt/rangetypes.c b/src/backend/utils/adt/rangetypes.c index 94a77c9b6a3..09a4f14a179 100644 --- a/src/backend/utils/adt/rangetypes.c +++ b/src/backend/utils/adt/rangetypes.c @@ -331,13 +331,13 @@ get_range_io_data(FunctionCallInfo fcinfo, Oid rngtypid, IOFuncSelector func) if (func == IOFunc_receive) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), - errmsg("no binary input function available for type %s", - format_type_be(cache->typcache->rngelemtype->type_id)))); + errmsg("no binary input function available for type %s", + format_type_be(cache->typcache->rngelemtype->type_id)))); else ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), - errmsg("no binary output function available for type %s", - format_type_be(cache->typcache->rngelemtype->type_id)))); + errmsg("no binary output function available for type %s", + format_type_be(cache->typcache->rngelemtype->type_id)))); } fmgr_info_cxt(cache->typiofunc, &cache->proc, fcinfo->flinfo->fn_mcxt); @@ -402,7 +402,7 @@ range_constructor3(PG_FUNCTION_ARGS) if (PG_ARGISNULL(2)) ereport(ERROR, (errcode(ERRCODE_DATA_EXCEPTION), - errmsg("range constructor flags argument must not be null"))); + errmsg("range constructor flags argument must not be null"))); flags = range_parse_flags(text_to_cstring(PG_GETARG_TEXT_PP(2))); @@ -989,7 +989,7 @@ range_minus(PG_FUNCTION_ARGS) if (cmp_l1l2 < 0 && cmp_u1u2 > 0) ereport(ERROR, (errcode(ERRCODE_DATA_EXCEPTION), - errmsg("result of range difference would not be contiguous"))); + errmsg("result of range difference would not be contiguous"))); if (cmp_l1u2 > 0 || cmp_u1l2 < 0) PG_RETURN_RANGE(r1); @@ -1914,7 +1914,7 @@ range_parse_flags(const char *flags_str) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("invalid range bound flags"), - errhint("Valid values are \"[]\", \"[)\", \"(]\", and \"()\"."))); + errhint("Valid values are \"[]\", \"[)\", \"(]\", and \"()\"."))); switch (flags_str[0]) { @@ -1927,7 +1927,7 @@ range_parse_flags(const char *flags_str) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("invalid range bound flags"), - errhint("Valid values are \"[]\", \"[)\", \"(]\", and \"()\"."))); + errhint("Valid values are \"[]\", \"[)\", \"(]\", and \"()\"."))); } switch (flags_str[1]) @@ -1941,7 +1941,7 @@ range_parse_flags(const char *flags_str) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("invalid range bound flags"), - errhint("Valid values are \"[]\", \"[)\", \"(]\", and \"()\"."))); + errhint("Valid values are \"[]\", \"[)\", \"(]\", and \"()\"."))); } return flags; diff --git a/src/backend/utils/adt/rangetypes_selfuncs.c b/src/backend/utils/adt/rangetypes_selfuncs.c index e803f72924a..ed13c27fcb8 100644 --- a/src/backend/utils/adt/rangetypes_selfuncs.c +++ b/src/backend/utils/adt/rangetypes_selfuncs.c @@ -47,15 +47,15 @@ static float8 get_distance(TypeCacheEntry *typcache, RangeBound *bound1, static int length_hist_bsearch(Datum *length_hist_values, int length_hist_nvalues, double value, bool equal); static double calc_length_hist_frac(Datum *length_hist_values, - int length_hist_nvalues, double length1, double length2, bool equal); + int length_hist_nvalues, double length1, double length2, bool equal); static double calc_hist_selectivity_contained(TypeCacheEntry *typcache, RangeBound *lower, RangeBound *upper, RangeBound *hist_lower, int hist_nvalues, - Datum *length_hist_values, int length_hist_nvalues); + Datum *length_hist_values, int length_hist_nvalues); static double calc_hist_selectivity_contains(TypeCacheEntry *typcache, RangeBound *lower, RangeBound *upper, RangeBound *hist_lower, int hist_nvalues, - Datum *length_hist_values, int length_hist_nvalues); + Datum *length_hist_values, int length_hist_nvalues); /* * Returns a default selectivity estimate for given operator, when we don't @@ -535,7 +535,7 @@ calc_hist_selectivity(TypeCacheEntry *typcache, VariableStatData *vardata, case OID_RANGE_CONTAINS_OP: hist_selec = calc_hist_selectivity_contains(typcache, &const_lower, - &const_upper, hist_lower, nhist, + &const_upper, hist_lower, nhist, lslot.values, lslot.nvalues); break; @@ -554,14 +554,14 @@ calc_hist_selectivity(TypeCacheEntry *typcache, VariableStatData *vardata, { hist_selec = 1.0 - calc_hist_selectivity_scalar(typcache, &const_lower, - hist_lower, nhist, false); + hist_lower, nhist, false); } else { hist_selec = calc_hist_selectivity_contained(typcache, &const_lower, - &const_upper, hist_lower, nhist, - lslot.values, lslot.nvalues); + &const_upper, hist_lower, nhist, + lslot.values, lslot.nvalues); } break; @@ -599,7 +599,7 @@ calc_hist_selectivity_scalar(TypeCacheEntry *typcache, RangeBound *constbound, /* Adjust using linear interpolation within the bin */ if (index >= 0 && index < hist_nvalues - 1) selec += get_position(typcache, constbound, &hist[index], - &hist[index + 1]) / (Selectivity) (hist_nvalues - 1); + &hist[index + 1]) / (Selectivity) (hist_nvalues - 1); return selec; } @@ -694,7 +694,7 @@ get_position(TypeCacheEntry *typcache, RangeBound *value, RangeBound *hist1, /* Calculate relative position using subdiff function. */ bin_width = DatumGetFloat8(FunctionCall2Coll( - &typcache->rng_subdiff_finfo, + &typcache->rng_subdiff_finfo, typcache->rng_collation, hist2->val, hist1->val)); @@ -702,7 +702,7 @@ get_position(TypeCacheEntry *typcache, RangeBound *value, RangeBound *hist1, return 0.5; /* zero width bin */ position = DatumGetFloat8(FunctionCall2Coll( - &typcache->rng_subdiff_finfo, + &typcache->rng_subdiff_finfo, typcache->rng_collation, value->val, hist1->val)) @@ -998,7 +998,7 @@ static double calc_hist_selectivity_contained(TypeCacheEntry *typcache, RangeBound *lower, RangeBound *upper, RangeBound *hist_lower, int hist_nvalues, - Datum *length_hist_values, int length_hist_nvalues) + Datum *length_hist_values, int length_hist_nvalues) { int i, upper_index; @@ -1108,7 +1108,7 @@ static double calc_hist_selectivity_contains(TypeCacheEntry *typcache, RangeBound *lower, RangeBound *upper, RangeBound *hist_lower, int hist_nvalues, - Datum *length_hist_values, int length_hist_nvalues) + Datum *length_hist_values, int length_hist_nvalues) { int i, lower_index; diff --git a/src/backend/utils/adt/rangetypes_spgist.c b/src/backend/utils/adt/rangetypes_spgist.c index a887e55b926..e82c4e1a9e1 100644 --- a/src/backend/utils/adt/rangetypes_spgist.c +++ b/src/backend/utils/adt/rangetypes_spgist.c @@ -213,7 +213,7 @@ spg_range_quad_picksplit(PG_FUNCTION_ARGS) *upperBounds; typcache = range_get_typcache(fcinfo, - RangeTypeGetOid(DatumGetRangeType(in->datums[0]))); + RangeTypeGetOid(DatumGetRangeType(in->datums[0]))); /* Allocate memory for bounds */ lowerBounds = palloc(sizeof(RangeBound) * in->nTuples); @@ -347,7 +347,7 @@ spg_range_quad_inner_consistent(PG_FUNCTION_ARGS) */ if (strategy != RANGESTRAT_CONTAINS_ELEM) empty = RangeIsEmpty( - DatumGetRangeType(in->scankeys[i].sk_argument)); + DatumGetRangeType(in->scankeys[i].sk_argument)); else empty = false; @@ -417,7 +417,7 @@ spg_range_quad_inner_consistent(PG_FUNCTION_ARGS) /* This node has a centroid. Fetch it. */ centroid = DatumGetRangeType(in->prefixDatum); typcache = range_get_typcache(fcinfo, - RangeTypeGetOid(DatumGetRangeType(centroid))); + RangeTypeGetOid(DatumGetRangeType(centroid))); range_deserialize(typcache, centroid, ¢roidLower, ¢roidUpper, ¢roidEmpty); @@ -574,7 +574,7 @@ spg_range_quad_inner_consistent(PG_FUNCTION_ARGS) */ cmp = adjacent_inner_consistent(typcache, &lower, ¢roidUpper, - prevCentroid ? &prevUpper : NULL); + prevCentroid ? &prevUpper : NULL); if (cmp > 0) which1 = (1 << 1) | (1 << 4); else if (cmp < 0) @@ -590,7 +590,7 @@ spg_range_quad_inner_consistent(PG_FUNCTION_ARGS) */ cmp = adjacent_inner_consistent(typcache, &upper, ¢roidLower, - prevCentroid ? &prevLower : NULL); + prevCentroid ? &prevLower : NULL); if (cmp > 0) which2 = (1 << 1) | (1 << 2); else if (cmp < 0) @@ -973,7 +973,7 @@ spg_range_quad_leaf_consistent(PG_FUNCTION_ARGS) break; case RANGESTRAT_CONTAINED_BY: res = range_contained_by_internal(typcache, leafRange, - DatumGetRangeType(keyDatum)); + DatumGetRangeType(keyDatum)); break; case RANGESTRAT_CONTAINS_ELEM: res = range_contains_elem_internal(typcache, leafRange, diff --git a/src/backend/utils/adt/rangetypes_typanalyze.c b/src/backend/utils/adt/rangetypes_typanalyze.c index 879540fc1ae..324bbe48e5f 100644 --- a/src/backend/utils/adt/rangetypes_typanalyze.c +++ b/src/backend/utils/adt/rangetypes_typanalyze.c @@ -33,7 +33,7 @@ static int float8_qsort_cmp(const void *a1, const void *a2); static int range_bound_qsort_cmp(const void *a1, const void *a2, void *arg); static void compute_range_stats(VacAttrStats *stats, - AnalyzeAttrFetchFunc fetchfunc, int samplerows, double totalrows); + AnalyzeAttrFetchFunc fetchfunc, int samplerows, double totalrows); /* * range_typanalyze -- typanalyze function for range columns @@ -165,9 +165,9 @@ compute_range_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc, * and lower bound values. */ length = DatumGetFloat8(FunctionCall2Coll( - &typcache->rng_subdiff_finfo, - typcache->rng_collation, - upper.val, lower.val)); + &typcache->rng_subdiff_finfo, + typcache->rng_collation, + upper.val, lower.val)); } else { @@ -246,7 +246,7 @@ compute_range_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc, for (i = 0; i < num_hist; i++) { bound_hist_values[i] = PointerGetDatum(range_serialize( - typcache, &lowers[pos], &uppers[pos], false)); + typcache, &lowers[pos], &uppers[pos], false)); pos += delta; posfrac += deltafrac; if (posfrac >= (num_hist - 1)) diff --git a/src/backend/utils/adt/regexp.c b/src/backend/utils/adt/regexp.c index 3a1647bc521..139bb583b1c 100644 --- a/src/backend/utils/adt/regexp.c +++ b/src/backend/utils/adt/regexp.c @@ -696,7 +696,7 @@ similar_escape(PG_FUNCTION_ARGS) ereport(ERROR, (errcode(ERRCODE_INVALID_ESCAPE_SEQUENCE), errmsg("invalid escape string"), - errhint("Escape string must be empty or one character."))); + errhint("Escape string must be empty or one character."))); } } @@ -1028,7 +1028,7 @@ setup_regexp_matches(text *orig_str, text *pattern, pg_re_flags *re_flags, { array_len *= 2; matchctx->match_locs = (int *) repalloc(matchctx->match_locs, - sizeof(int) * array_len); + sizeof(int) * array_len); } /* save this match's locations */ @@ -1118,7 +1118,7 @@ build_regexp_match_result(regexp_matches_ctx *matchctx) else { elems[i] = DirectFunctionCall3(text_substr, - PointerGetDatum(matchctx->orig_str), + PointerGetDatum(matchctx->orig_str), Int32GetDatum(so + 1), Int32GetDatum(eo - so)); nulls[i] = false; @@ -1216,7 +1216,7 @@ regexp_split_to_array(PG_FUNCTION_ARGS) if (re_flags.glob) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("regexp_split_to_array does not support the global option"))); + errmsg("regexp_split_to_array does not support the global option"))); /* But we find all the matches anyway */ re_flags.glob = true; diff --git a/src/backend/utils/adt/regproc.c b/src/backend/utils/adt/regproc.c index ba879e81cd4..6fe81fab7e4 100644 --- a/src/backend/utils/adt/regproc.c +++ b/src/backend/utils/adt/regproc.c @@ -76,7 +76,7 @@ regprocin(PG_FUNCTION_ARGS) strspn(pro_name_or_oid, "0123456789") == strlen(pro_name_or_oid)) { result = DatumGetObjectId(DirectFunctionCall1(oidin, - CStringGetDatum(pro_name_or_oid))); + CStringGetDatum(pro_name_or_oid))); PG_RETURN_OID(result); } @@ -247,7 +247,7 @@ regprocedurein(PG_FUNCTION_ARGS) strspn(pro_name_or_oid, "0123456789") == strlen(pro_name_or_oid)) { result = DatumGetObjectId(DirectFunctionCall1(oidin, - CStringGetDatum(pro_name_or_oid))); + CStringGetDatum(pro_name_or_oid))); PG_RETURN_OID(result); } @@ -497,7 +497,7 @@ regoperin(PG_FUNCTION_ARGS) strspn(opr_name_or_oid, "0123456789") == strlen(opr_name_or_oid)) { result = DatumGetObjectId(DirectFunctionCall1(oidin, - CStringGetDatum(opr_name_or_oid))); + CStringGetDatum(opr_name_or_oid))); PG_RETURN_OID(result); } @@ -670,7 +670,7 @@ regoperatorin(PG_FUNCTION_ARGS) strspn(opr_name_or_oid, "0123456789") == strlen(opr_name_or_oid)) { result = DatumGetObjectId(DirectFunctionCall1(oidin, - CStringGetDatum(opr_name_or_oid))); + CStringGetDatum(opr_name_or_oid))); PG_RETURN_OID(result); } @@ -916,7 +916,7 @@ regclassin(PG_FUNCTION_ARGS) strspn(class_name_or_oid, "0123456789") == strlen(class_name_or_oid)) { result = DatumGetObjectId(DirectFunctionCall1(oidin, - CStringGetDatum(class_name_or_oid))); + CStringGetDatum(class_name_or_oid))); PG_RETURN_OID(result); } @@ -1074,7 +1074,7 @@ regtypein(PG_FUNCTION_ARGS) strspn(typ_name_or_oid, "0123456789") == strlen(typ_name_or_oid)) { result = DatumGetObjectId(DirectFunctionCall1(oidin, - CStringGetDatum(typ_name_or_oid))); + CStringGetDatum(typ_name_or_oid))); PG_RETURN_OID(result); } @@ -1210,7 +1210,7 @@ regconfigin(PG_FUNCTION_ARGS) strspn(cfg_name_or_oid, "0123456789") == strlen(cfg_name_or_oid)) { result = DatumGetObjectId(DirectFunctionCall1(oidin, - CStringGetDatum(cfg_name_or_oid))); + CStringGetDatum(cfg_name_or_oid))); PG_RETURN_OID(result); } @@ -1321,7 +1321,7 @@ regdictionaryin(PG_FUNCTION_ARGS) strspn(dict_name_or_oid, "0123456789") == strlen(dict_name_or_oid)) { result = DatumGetObjectId(DirectFunctionCall1(oidin, - CStringGetDatum(dict_name_or_oid))); + CStringGetDatum(dict_name_or_oid))); PG_RETURN_OID(result); } @@ -1432,7 +1432,7 @@ regrolein(PG_FUNCTION_ARGS) strspn(role_name_or_oid, "0123456789") == strlen(role_name_or_oid)) { result = DatumGetObjectId(DirectFunctionCall1(oidin, - CStringGetDatum(role_name_or_oid))); + CStringGetDatum(role_name_or_oid))); PG_RETURN_OID(result); } @@ -1557,7 +1557,7 @@ regnamespacein(PG_FUNCTION_ARGS) strspn(nsp_name_or_oid, "0123456789") == strlen(nsp_name_or_oid)) { result = DatumGetObjectId(DirectFunctionCall1(oidin, - CStringGetDatum(nsp_name_or_oid))); + CStringGetDatum(nsp_name_or_oid))); PG_RETURN_OID(result); } diff --git a/src/backend/utils/adt/ri_triggers.c b/src/backend/utils/adt/ri_triggers.c index 1c02f143ba0..c2891e6fa1e 100644 --- a/src/backend/utils/adt/ri_triggers.c +++ b/src/backend/utils/adt/ri_triggers.c @@ -2718,7 +2718,7 @@ ri_CheckTrigger(FunctionCallInfo fcinfo, const char *funcname, int tgkind) !TRIGGER_FIRED_FOR_ROW(trigdata->tg_event)) ereport(ERROR, (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), - errmsg("function \"%s\" must be fired AFTER ROW", funcname))); + errmsg("function \"%s\" must be fired AFTER ROW", funcname))); switch (tgkind) { @@ -2761,8 +2761,8 @@ ri_FetchConstraintInfo(Trigger *trigger, Relation trig_rel, bool rel_is_pk) if (!OidIsValid(constraintOid)) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("no pg_constraint entry for trigger \"%s\" on table \"%s\"", - trigger->tgname, RelationGetRelationName(trig_rel)), + errmsg("no pg_constraint entry for trigger \"%s\" on table \"%s\"", + trigger->tgname, RelationGetRelationName(trig_rel)), errhint("Remove this referential integrity trigger and its mates, then do ALTER TABLE ADD CONSTRAINT."))); /* Find or create a hashtable entry for the constraint */ @@ -2834,7 +2834,7 @@ ri_LoadConstraintInfo(Oid constraintOid) /* And extract data */ Assert(riinfo->constraint_id == constraintOid); riinfo->oidHashValue = GetSysCacheHashValue1(CONSTROID, - ObjectIdGetDatum(constraintOid)); + ObjectIdGetDatum(constraintOid)); memcpy(&riinfo->conname, &conForm->conname, sizeof(NameData)); riinfo->pk_relid = conForm->confrelid; riinfo->fk_relid = conForm->conrelid; @@ -3156,7 +3156,7 @@ ri_PerformCheck(const RI_ConstraintInfo *riinfo, /* XXX wouldn't it be clearer to do this part at the caller? */ if (qkey->constr_queryno != RI_PLAN_CHECK_LOOKUPPK_FROM_PK && expect_OK == SPI_OK_SELECT && - (SPI_processed == 0) == (qkey->constr_queryno == RI_PLAN_CHECK_LOOKUPPK)) + (SPI_processed == 0) == (qkey->constr_queryno == RI_PLAN_CHECK_LOOKUPPK)) ri_ReportViolation(riinfo, pk_rel, fk_rel, new_tuple ? new_tuple : old_tuple, @@ -3327,9 +3327,9 @@ ri_ReportViolation(const RI_ConstraintInfo *riinfo, NameStr(riinfo->conname), RelationGetRelationName(fk_rel)), has_perm ? - errdetail("Key (%s)=(%s) is still referenced from table \"%s\".", - key_names.data, key_values.data, - RelationGetRelationName(fk_rel)) : + errdetail("Key (%s)=(%s) is still referenced from table \"%s\".", + key_names.data, key_values.data, + RelationGetRelationName(fk_rel)) : errdetail("Key is still referenced from table \"%s\".", RelationGetRelationName(fk_rel)), errtableconstraint(fk_rel, NameStr(riinfo->conname)))); diff --git a/src/backend/utils/adt/rowtypes.c b/src/backend/utils/adt/rowtypes.c index 08b37b270e2..44acd13c6b1 100644 --- a/src/backend/utils/adt/rowtypes.c +++ b/src/backend/utils/adt/rowtypes.c @@ -100,7 +100,7 @@ record_in(PG_FUNCTION_ARGS) if (tupType == RECORDOID && tupTypmod < 0) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("input of anonymous composite types is not implemented"))); + errmsg("input of anonymous composite types is not implemented"))); /* * This comes from the composite type's pg_type.oid and stores system oids @@ -476,7 +476,7 @@ record_recv(PG_FUNCTION_ARGS) if (tupType == RECORDOID && tupTypmod < 0) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("input of anonymous composite types is not implemented"))); + errmsg("input of anonymous composite types is not implemented"))); tupdesc = lookup_rowtype_tupdesc(tupType, tupTypmod); ncolumns = tupdesc->natts; @@ -924,8 +924,8 @@ record_cmp(FunctionCallInfo fcinfo) 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(typentry->type_id)))); + errmsg("could not identify a comparison function for type %s", + format_type_be(typentry->type_id)))); my_extra->columns[j].typentry = typentry; } @@ -1164,8 +1164,8 @@ record_eq(PG_FUNCTION_ARGS) if (!OidIsValid(typentry->eq_opr_finfo.fn_oid)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), - errmsg("could not identify an equality operator for type %s", - format_type_be(typentry->type_id)))); + errmsg("could not identify an equality operator for type %s", + format_type_be(typentry->type_id)))); my_extra->columns[j].typentry = typentry; } diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index b8ad47a20c8..18d9e27d1ed 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -925,7 +925,7 @@ pg_get_triggerdef_worker(Oid trigid, bool pretty) { if (OidIsValid(trigrec->tgconstrrelid)) appendStringInfo(&buf, "FROM %s ", - generate_relation_name(trigrec->tgconstrrelid, NIL)); + generate_relation_name(trigrec->tgconstrrelid, NIL)); if (!trigrec->tgdeferrable) appendStringInfoString(&buf, "NOT "); appendStringInfoString(&buf, "DEFERRABLE INITIALLY "); @@ -1309,7 +1309,7 @@ pg_get_indexdef_worker(Oid indexrelid, int colno, { /* Need parens if it's not a bare function call */ if (indexkey && IsA(indexkey, FuncExpr) && - ((FuncExpr *) indexkey)->funcformat == COERCE_EXPLICIT_CALL) + ((FuncExpr *) indexkey)->funcformat == COERCE_EXPLICIT_CALL) appendStringInfoString(&buf, str); else appendStringInfo(&buf, "(%s)", str); @@ -1477,7 +1477,7 @@ pg_get_statisticsobj_worker(Oid statextid, bool missing_ok) nsp = get_namespace_name(statextrec->stxnamespace); appendStringInfo(&buf, "CREATE STATISTICS %s", quote_qualified_identifier(nsp, - NameStr(statextrec->stxname))); + NameStr(statextrec->stxname))); /* * Decode the stxkind column so that we know which stats types to print. @@ -1631,7 +1631,7 @@ pg_get_partkeydef_worker(Oid relid, int prettyFlags, char *exprsString; exprsDatum = SysCacheGetAttr(PARTRELID, tuple, - Anum_pg_partitioned_table_partexprs, &isnull); + Anum_pg_partitioned_table_partexprs, &isnull); Assert(!isnull); exprsString = TextDatumGetCString(exprsDatum); partexprs = (List *) stringToNode(exprsString); @@ -2023,7 +2023,7 @@ pg_get_constraintdef_worker(Oid constraintId, bool fullCommand, tblspc = get_rel_tablespace(indexId); if (OidIsValid(tblspc)) appendStringInfo(&buf, " USING INDEX TABLESPACE %s", - quote_identifier(get_tablespace_name(tblspc))); + quote_identifier(get_tablespace_name(tblspc))); } break; @@ -2458,7 +2458,7 @@ pg_get_functiondef(PG_FUNCTION_ARGS) print_function_trftypes(&buf, proctup); appendStringInfo(&buf, "\n LANGUAGE %s\n", - quote_identifier(get_language_name(proc->prolang, false))); + quote_identifier(get_language_name(proc->prolang, false))); /* Emit some miscellaneous options on one line */ oldlen = buf.len; @@ -5088,19 +5088,19 @@ get_select_query_def(Query *query, deparse_context *context, break; case LCS_FORKEYSHARE: appendContextKeyword(context, " FOR KEY SHARE", - -PRETTYINDENT_STD, PRETTYINDENT_STD, 0); + -PRETTYINDENT_STD, PRETTYINDENT_STD, 0); break; case LCS_FORSHARE: appendContextKeyword(context, " FOR SHARE", - -PRETTYINDENT_STD, PRETTYINDENT_STD, 0); + -PRETTYINDENT_STD, PRETTYINDENT_STD, 0); break; case LCS_FORNOKEYUPDATE: appendContextKeyword(context, " FOR NO KEY UPDATE", - -PRETTYINDENT_STD, PRETTYINDENT_STD, 0); + -PRETTYINDENT_STD, PRETTYINDENT_STD, 0); break; case LCS_FORUPDATE: appendContextKeyword(context, " FOR UPDATE", - -PRETTYINDENT_STD, PRETTYINDENT_STD, 0); + -PRETTYINDENT_STD, PRETTYINDENT_STD, 0); break; } @@ -5956,8 +5956,8 @@ get_insert_query_def(Query *query, deparse_context *context) * tle->resname, since resname will fail to track RENAME. */ appendStringInfoString(buf, - quote_identifier(get_relid_attribute_name(rte->relid, - tle->resno))); + quote_identifier(get_relid_attribute_name(rte->relid, + tle->resno))); /* * Print any indirection needed (subfields or subscripts), and strip @@ -6237,7 +6237,7 @@ get_update_query_targetlist_def(Query *query, List *targetList, cur_ma_sublink = (SubLink *) lfirst(next_ma_cell); next_ma_cell = lnext(next_ma_cell); remaining_ma_columns = count_nonjunk_tlist_entries( - ((Query *) cur_ma_sublink->subselect)->targetList); + ((Query *) cur_ma_sublink->subselect)->targetList); Assert(((Param *) expr)->paramid == ((cur_ma_sublink->subLinkId << 16) | 1)); appendStringInfoChar(buf, '('); @@ -6249,8 +6249,8 @@ get_update_query_targetlist_def(Query *query, List *targetList, * tle->resname, since resname will fail to track RENAME. */ appendStringInfoString(buf, - quote_identifier(get_relid_attribute_name(rte->relid, - tle->resno))); + quote_identifier(get_relid_attribute_name(rte->relid, + tle->resno))); /* * Print any indirection needed (subfields or subscripts), and strip @@ -7733,7 +7733,7 @@ get_rule_expr(Node *node, deparse_context *context, appendStringInfo(buf, " %s %s (", generate_operator_name(expr->opno, exprType(arg1), - get_base_element_type(exprType(arg2))), + get_base_element_type(exprType(arg2))), expr->useOr ? "ANY" : "ALL"); get_rule_expr_paren(arg2, context, true, node); @@ -7753,7 +7753,7 @@ get_rule_expr(Node *node, deparse_context *context, ((SubLink *) arg2)->subLinkType == EXPR_SUBLINK) appendStringInfo(buf, "::%s", format_type_with_typemod(exprType(arg2), - exprTypmod(arg2))); + exprTypmod(arg2))); appendStringInfoChar(buf, ')'); if (!PRETTY_PAREN(context)) appendStringInfoChar(buf, ')'); @@ -8111,7 +8111,7 @@ get_rule_expr(Node *node, deparse_context *context, */ if (arrayexpr->elements == NIL) appendStringInfo(buf, "::%s", - format_type_with_typemod(arrayexpr->array_typeid, -1)); + format_type_with_typemod(arrayexpr->array_typeid, -1)); } break; @@ -8173,7 +8173,7 @@ get_rule_expr(Node *node, deparse_context *context, appendStringInfoChar(buf, ')'); if (rowexpr->row_format == COERCE_EXPLICIT_CAST) appendStringInfo(buf, "::%s", - format_type_with_typemod(rowexpr->row_typeid, -1)); + format_type_with_typemod(rowexpr->row_typeid, -1)); } break; @@ -8206,9 +8206,9 @@ get_rule_expr(Node *node, deparse_context *context, * be perfect. */ appendStringInfo(buf, ") %s ROW(", - generate_operator_name(linitial_oid(rcexpr->opnos), - exprType(linitial(rcexpr->largs)), - exprType(linitial(rcexpr->rargs)))); + generate_operator_name(linitial_oid(rcexpr->opnos), + exprType(linitial(rcexpr->largs)), + exprType(linitial(rcexpr->rargs)))); sep = ""; foreach(arg, rcexpr->rargs) { @@ -8406,7 +8406,7 @@ get_rule_expr(Node *node, deparse_context *context, Assert(!con->constisnull); if (DatumGetBool(con->constvalue)) appendStringInfoString(buf, - " PRESERVE WHITESPACE"); + " PRESERVE WHITESPACE"); else appendStringInfoString(buf, " STRIP WHITESPACE"); @@ -8434,15 +8434,15 @@ get_rule_expr(Node *node, deparse_context *context, { case XML_STANDALONE_YES: appendStringInfoString(buf, - ", STANDALONE YES"); + ", STANDALONE YES"); break; case XML_STANDALONE_NO: appendStringInfoString(buf, - ", STANDALONE NO"); + ", STANDALONE NO"); break; case XML_STANDALONE_NO_VALUE: appendStringInfoString(buf, - ", STANDALONE NO VALUE"); + ", STANDALONE NO VALUE"); break; default: break; @@ -8628,7 +8628,7 @@ get_rule_expr(Node *node, deparse_context *context, if (iexpr->infercollid) appendStringInfo(buf, " COLLATE %s", - generate_collation_name(iexpr->infercollid)); + generate_collation_name(iexpr->infercollid)); /* Add the operator class name, if not default */ if (iexpr->inferopclass) @@ -9400,8 +9400,8 @@ get_sublink_expr(SubLink *sublink, deparse_context *context) get_rule_expr(linitial(opexpr->args), context, true); if (!opname) opname = generate_operator_name(opexpr->opno, - exprType(linitial(opexpr->args)), - exprType(lsecond(opexpr->args))); + exprType(linitial(opexpr->args)), + exprType(lsecond(opexpr->args))); sep = ", "; } appendStringInfoChar(buf, ')'); @@ -9415,7 +9415,7 @@ get_sublink_expr(SubLink *sublink, deparse_context *context) get_rule_expr((Node *) rcexpr->largs, context, true); opname = generate_operator_name(linitial_oid(rcexpr->opnos), exprType(linitial(rcexpr->largs)), - exprType(linitial(rcexpr->rargs))); + exprType(linitial(rcexpr->rargs))); appendStringInfoChar(buf, ')'); } else @@ -10216,7 +10216,7 @@ processIndirection(Node *node, deparse_context *context) */ Assert(list_length(fstore->fieldnums) == 1); fieldname = get_relid_attribute_name(typrelid, - linitial_int(fstore->fieldnums)); + linitial_int(fstore->fieldnums)); appendStringInfo(buf, ".%s", quote_identifier(fieldname)); /* diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index 63a25db5d39..ce4c5b50783 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -171,7 +171,7 @@ static double eqjoinsel_semi(Oid operator, VariableStatData *vardata1, VariableStatData *vardata2, RelOptInfo *inner_rel); static bool estimate_multivariate_ndistinct(PlannerInfo *root, - RelOptInfo *rel, List **varinfos, double *ndistinct); + RelOptInfo *rel, List **varinfos, double *ndistinct); static bool convert_to_scalar(Datum value, Oid valuetypid, double *scaledvalue, Datum lobound, Datum hibound, Oid boundstypid, double *scaledlobound, double *scaledhibound); @@ -334,7 +334,7 @@ var_eq_const(VariableStatData *vardata, Oid operator, } else if (HeapTupleIsValid(vardata->statsTuple) && statistic_proc_security_check(vardata, - (opfuncoid = get_opcode(operator)))) + (opfuncoid = get_opcode(operator)))) { AttStatsSlot sslot; bool match = false; @@ -360,12 +360,12 @@ var_eq_const(VariableStatData *vardata, Oid operator, /* be careful to apply operator right way 'round */ if (varonleft) match = DatumGetBool(FunctionCall2Coll(&eqproc, - DEFAULT_COLLATION_OID, + DEFAULT_COLLATION_OID, sslot.values[i], constval)); else match = DatumGetBool(FunctionCall2Coll(&eqproc, - DEFAULT_COLLATION_OID, + DEFAULT_COLLATION_OID, constval, sslot.values[i])); if (match) @@ -848,7 +848,7 @@ ineq_histogram_selectivity(PlannerInfo *root, vardata, sslot.staop, NULL, - &sslot.values[probe]); + &sslot.values[probe]); ltcmp = DatumGetBool(FunctionCall2Coll(opproc, DEFAULT_COLLATION_OID, @@ -1268,7 +1268,7 @@ patternsel(PG_FUNCTION_ARGS, Pattern_Type ptype, bool negate) break; case BYTEAOID: prefixstr = DatumGetCString(DirectFunctionCall1(byteaout, - prefix->constvalue)); + prefix->constvalue)); break; default: elog(ERROR, "unrecognized consttype: %u", @@ -1933,17 +1933,17 @@ scalararraysel(PlannerInfo *root, s2 = DatumGetFloat8(FunctionCall5Coll(&oprselproc, clause->inputcollid, PointerGetDatum(root), - ObjectIdGetDatum(operator), + ObjectIdGetDatum(operator), PointerGetDatum(args), Int16GetDatum(jointype), - PointerGetDatum(sjinfo))); + PointerGetDatum(sjinfo))); else s2 = DatumGetFloat8(FunctionCall4Coll(&oprselproc, clause->inputcollid, PointerGetDatum(root), - ObjectIdGetDatum(operator), + ObjectIdGetDatum(operator), PointerGetDatum(args), - Int32GetDatum(varRelid))); + Int32GetDatum(varRelid))); if (useOr) { @@ -2000,17 +2000,17 @@ scalararraysel(PlannerInfo *root, s2 = DatumGetFloat8(FunctionCall5Coll(&oprselproc, clause->inputcollid, PointerGetDatum(root), - ObjectIdGetDatum(operator), + ObjectIdGetDatum(operator), PointerGetDatum(args), Int16GetDatum(jointype), - PointerGetDatum(sjinfo))); + PointerGetDatum(sjinfo))); else s2 = DatumGetFloat8(FunctionCall4Coll(&oprselproc, clause->inputcollid, PointerGetDatum(root), - ObjectIdGetDatum(operator), + ObjectIdGetDatum(operator), PointerGetDatum(args), - Int32GetDatum(varRelid))); + Int32GetDatum(varRelid))); if (useOr) { @@ -2295,7 +2295,7 @@ eqjoinsel_inner(Oid operator, if (statistic_proc_security_check(vardata1, opfuncoid)) have_mcvs1 = get_attstatsslot(&sslot1, vardata1->statsTuple, STATISTIC_KIND_MCV, InvalidOid, - ATTSTATSSLOT_VALUES | ATTSTATSSLOT_NUMBERS); + ATTSTATSSLOT_VALUES | ATTSTATSSLOT_NUMBERS); } if (HeapTupleIsValid(vardata2->statsTuple)) @@ -2305,7 +2305,7 @@ eqjoinsel_inner(Oid operator, if (statistic_proc_security_check(vardata2, opfuncoid)) have_mcvs2 = get_attstatsslot(&sslot2, vardata2->statsTuple, STATISTIC_KIND_MCV, InvalidOid, - ATTSTATSSLOT_VALUES | ATTSTATSSLOT_NUMBERS); + ATTSTATSSLOT_VALUES | ATTSTATSSLOT_NUMBERS); } if (have_mcvs1 && have_mcvs2) @@ -2545,7 +2545,7 @@ eqjoinsel_semi(Oid operator, if (statistic_proc_security_check(vardata1, opfuncoid)) have_mcvs1 = get_attstatsslot(&sslot1, vardata1->statsTuple, STATISTIC_KIND_MCV, InvalidOid, - ATTSTATSSLOT_VALUES | ATTSTATSSLOT_NUMBERS); + ATTSTATSSLOT_VALUES | ATTSTATSSLOT_NUMBERS); } if (HeapTupleIsValid(vardata2->statsTuple) && @@ -4612,7 +4612,7 @@ examine_variable(PlannerInfo *root, Node *node, int varRelid, if (varRelid == 0 || bms_is_member(varRelid, varnos)) { onerel = find_base_rel(root, - (varRelid ? varRelid : bms_singleton_member(varnos))); + (varRelid ? varRelid : bms_singleton_member(varnos))); vardata->rel = onerel; node = basenode; /* strip any relabeling */ } @@ -4714,7 +4714,7 @@ examine_variable(PlannerInfo *root, Node *node, int varRelid, { vardata->statsTuple = SearchSysCache3(STATRELATTINH, - ObjectIdGetDatum(index->indexoid), + ObjectIdGetDatum(index->indexoid), Int16GetDatum(pos + 1), BoolGetDatum(false)); vardata->freefunc = ReleaseSysCache; @@ -4735,7 +4735,7 @@ examine_variable(PlannerInfo *root, Node *node, int varRelid, */ vardata->acl_ok = (pg_class_aclcheck(rte->relid, GetUserId(), - ACL_SELECT) == ACLCHECK_OK); + ACL_SELECT) == ACLCHECK_OK); } else { @@ -5545,7 +5545,7 @@ like_fixed_prefix(Const *patt_const, bool case_insensitive, Oid collation, if (typeid == BYTEAOID) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("case insensitive matching not supported on type bytea"))); + errmsg("case insensitive matching not supported on type bytea"))); /* If case-insensitive, we need locale info */ if (lc_ctype_is_c(collation)) @@ -5601,7 +5601,7 @@ like_fixed_prefix(Const *patt_const, bool case_insensitive, Oid collation, /* Stop if case-varying character (it's sort of a wildcard) */ if (case_insensitive && - pattern_char_isalpha(patt[pos], is_multibyte, locale, locale_is_c)) + pattern_char_isalpha(patt[pos], is_multibyte, locale, locale_is_c)) break; match[match_pos++] = patt[pos]; @@ -5647,7 +5647,7 @@ regex_fixed_prefix(Const *patt_const, bool case_insensitive, Oid collation, if (typeid == BYTEAOID) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("regular-expression matching not supported on type bytea"))); + errmsg("regular-expression matching not supported on type bytea"))); /* Use the regexp machinery to extract the prefix, if any */ prefix = regexp_fixed_prefix(DatumGetTextPP(patt_const->constvalue), @@ -7827,7 +7827,7 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count, */ if (HeapTupleIsValid(vardata.statsTuple) && !vardata.freefunc) elog(ERROR, - "no function provided to release variable stats with"); + "no function provided to release variable stats with"); } else { @@ -7850,7 +7850,7 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count, attnum = qinfo->indexcol + 1; if (get_index_stats_hook && - (*get_index_stats_hook) (root, index->indexoid, attnum, &vardata)) + (*get_index_stats_hook) (root, index->indexoid, attnum, &vardata)) { /* * The hook took control of acquiring a stats tuple. If it @@ -7863,7 +7863,7 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count, else { vardata.statsTuple = SearchSysCache3(STATRELATTINH, - ObjectIdGetDatum(index->indexoid), + ObjectIdGetDatum(index->indexoid), Int16GetDatum(attnum), BoolGetDatum(false)); vardata.freefunc = ReleaseSysCache; diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c index d477e235507..6fa126d295b 100644 --- a/src/backend/utils/adt/timestamp.c +++ b/src/backend/utils/adt/timestamp.c @@ -110,9 +110,9 @@ anytimestamp_typmod_check(bool istz, int32 typmod) { ereport(WARNING, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("TIMESTAMP(%d)%s precision reduced to maximum allowed, %d", - typmod, (istz ? " WITH TIME ZONE" : ""), - MAX_TIMESTAMP_PRECISION))); + errmsg("TIMESTAMP(%d)%s precision reduced to maximum allowed, %d", + typmod, (istz ? " WITH TIME ZONE" : ""), + MAX_TIMESTAMP_PRECISION))); typmod = MAX_TIMESTAMP_PRECISION; } @@ -191,7 +191,7 @@ timestamp_in(PG_FUNCTION_ARGS) case DTK_INVALID: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("date/time value \"%s\" is no longer supported", str))); + errmsg("date/time value \"%s\" is no longer supported", str))); TIMESTAMP_NOEND(result); break; @@ -359,8 +359,8 @@ AdjustTimestampForTypmod(Timestamp *time, int32 typmod) if (typmod < 0 || typmod > MAX_TIMESTAMP_PRECISION) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("timestamp(%d) precision must be between %d and %d", - typmod, 0, MAX_TIMESTAMP_PRECISION))); + errmsg("timestamp(%d) precision must be between %d and %d", + typmod, 0, MAX_TIMESTAMP_PRECISION))); if (*time >= INT64CONST(0)) { @@ -431,7 +431,7 @@ timestamptz_in(PG_FUNCTION_ARGS) case DTK_INVALID: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("date/time value \"%s\" is no longer supported", str))); + errmsg("date/time value \"%s\" is no longer supported", str))); TIMESTAMP_NOEND(result); break; @@ -496,7 +496,7 @@ parse_sane_timezone(struct pg_tm *tm, text *zone) if (rt == DTERR_TZDISP_OVERFLOW) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("numeric time zone \"%s\" out of range", tzname))); + errmsg("numeric time zone \"%s\" out of range", tzname))); else if (rt != DTERR_BAD_FORMAT) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), @@ -938,7 +938,7 @@ interval_in(PG_FUNCTION_ARGS) case DTK_INVALID: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("date/time value \"%s\" is no longer supported", str))); + errmsg("date/time value \"%s\" is no longer supported", str))); break; default: @@ -1087,8 +1087,8 @@ intervaltypmodin(PG_FUNCTION_ARGS) { ereport(WARNING, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("INTERVAL(%d) precision reduced to maximum allowed, %d", - tl[1], MAX_INTERVAL_PRECISION))); + errmsg("INTERVAL(%d) precision reduced to maximum allowed, %d", + tl[1], MAX_INTERVAL_PRECISION))); typmod = INTERVAL_TYPMOD(MAX_INTERVAL_PRECISION, tl[0]); } else @@ -1459,8 +1459,8 @@ AdjustIntervalForTypmod(Interval *interval, int32 typmod) if (precision < 0 || precision > MAX_INTERVAL_PRECISION) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("interval(%d) precision must be between %d and %d", - precision, 0, MAX_INTERVAL_PRECISION))); + errmsg("interval(%d) precision must be between %d and %d", + precision, 0, MAX_INTERVAL_PRECISION))); if (interval->time >= INT64CONST(0)) { @@ -1694,7 +1694,7 @@ timestamptz_to_time_t(TimestampTz t) pg_time_t result; result = (pg_time_t) (t / USECS_PER_SEC + - ((POSTGRES_EPOCH_JDATE - UNIX_EPOCH_JDATE) * SECS_PER_DAY)); + ((POSTGRES_EPOCH_JDATE - UNIX_EPOCH_JDATE) * SECS_PER_DAY)); return result; } @@ -2625,7 +2625,7 @@ timestamp_mi(PG_FUNCTION_ARGS) *---------- */ result = DatumGetIntervalP(DirectFunctionCall1(interval_justify_hours, - IntervalPGetDatum(result))); + IntervalPGetDatum(result))); PG_RETURN_INTERVAL_P(result); } @@ -3161,7 +3161,7 @@ interval_mul(PG_FUNCTION_ARGS) month_remainder_days = (orig_month * factor - result->month) * DAYS_PER_MONTH; month_remainder_days = TSROUND(month_remainder_days); sec_remainder = (orig_day * factor - result->day + - month_remainder_days - (int) month_remainder_days) * SECS_PER_DAY; + month_remainder_days - (int) month_remainder_days) * SECS_PER_DAY; sec_remainder = TSROUND(sec_remainder); /* @@ -3224,7 +3224,7 @@ interval_div(PG_FUNCTION_ARGS) month_remainder_days = (orig_month / factor - result->month) * DAYS_PER_MONTH; month_remainder_days = TSROUND(month_remainder_days); sec_remainder = (orig_day / factor - result->day + - month_remainder_days - (int) month_remainder_days) * SECS_PER_DAY; + month_remainder_days - (int) month_remainder_days) * SECS_PER_DAY; sec_remainder = TSROUND(sec_remainder); if (Abs(sec_remainder) >= SECS_PER_DAY) { @@ -3272,7 +3272,7 @@ interval_accum(PG_FUNCTION_ARGS) newsum = DatumGetIntervalP(DirectFunctionCall2(interval_pl, IntervalPGetDatum(&sumX), - IntervalPGetDatum(newval))); + IntervalPGetDatum(newval))); N.time += 1; transdatums[0] = IntervalPGetDatum(newsum); @@ -3356,7 +3356,7 @@ interval_accum_inv(PG_FUNCTION_ARGS) newsum = DatumGetIntervalP(DirectFunctionCall2(interval_mi, IntervalPGetDatum(&sumX), - IntervalPGetDatum(newval))); + IntervalPGetDatum(newval))); N.time -= 1; transdatums[0] = IntervalPGetDatum(newsum); @@ -3911,8 +3911,8 @@ timestamptz_trunc(PG_FUNCTION_ARGS) { ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("timestamp with time zone units \"%s\" not recognized", - lowunits))); + errmsg("timestamp with time zone units \"%s\" not recognized", + lowunits))); result = 0; } @@ -3985,7 +3985,7 @@ interval_trunc(PG_FUNCTION_ARGS) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("interval units \"%s\" not supported " - "because months usually have fractional weeks", + "because months usually have fractional weeks", lowunits))); else ereport(ERROR, @@ -4206,8 +4206,8 @@ NonFiniteTimestampTzPart(int type, int unit, char *lowunits, if (isTz) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("timestamp with time zone units \"%s\" not recognized", - lowunits))); + errmsg("timestamp with time zone units \"%s\" not recognized", + lowunits))); else ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), @@ -4252,8 +4252,8 @@ NonFiniteTimestampTzPart(int type, int unit, char *lowunits, if (isTz) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("timestamp with time zone units \"%s\" not supported", - lowunits))); + errmsg("timestamp with time zone units \"%s\" not supported", + lowunits))); else ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), @@ -4391,7 +4391,7 @@ timestamp_part(PG_FUNCTION_ARGS) case DTK_JULIAN: result = date2j(tm->tm_year, tm->tm_mon, tm->tm_mday); result += ((((tm->tm_hour * MINS_PER_HOUR) + tm->tm_min) * SECS_PER_MINUTE) + - tm->tm_sec + (fsec / 1000000.0)) / (double) SECS_PER_DAY; + tm->tm_sec + (fsec / 1000000.0)) / (double) SECS_PER_DAY; break; case DTK_ISOYEAR: @@ -4595,7 +4595,7 @@ timestamptz_part(PG_FUNCTION_ARGS) case DTK_JULIAN: result = date2j(tm->tm_year, tm->tm_mon, tm->tm_mday); result += ((((tm->tm_hour * MINS_PER_HOUR) + tm->tm_min) * SECS_PER_MINUTE) + - tm->tm_sec + (fsec / 1000000.0)) / (double) SECS_PER_DAY; + tm->tm_sec + (fsec / 1000000.0)) / (double) SECS_PER_DAY; break; case DTK_ISOYEAR: @@ -4625,8 +4625,8 @@ timestamptz_part(PG_FUNCTION_ARGS) default: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("timestamp with time zone units \"%s\" not supported", - lowunits))); + errmsg("timestamp with time zone units \"%s\" not supported", + lowunits))); result = 0; } @@ -4647,8 +4647,8 @@ timestamptz_part(PG_FUNCTION_ARGS) default: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("timestamp with time zone units \"%s\" not supported", - lowunits))); + errmsg("timestamp with time zone units \"%s\" not supported", + lowunits))); result = 0; } } @@ -4656,8 +4656,8 @@ timestamptz_part(PG_FUNCTION_ARGS) { ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("timestamp with time zone units \"%s\" not recognized", - lowunits))); + errmsg("timestamp with time zone units \"%s\" not recognized", + lowunits))); result = 0; } @@ -4916,9 +4916,9 @@ timestamp_izone(PG_FUNCTION_ARGS) if (zone->month != 0 || zone->day != 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("interval time zone \"%s\" must not include months or days", - DatumGetCString(DirectFunctionCall1(interval_out, - PointerGetDatum(zone)))))); + errmsg("interval time zone \"%s\" must not include months or days", + DatumGetCString(DirectFunctionCall1(interval_out, + PointerGetDatum(zone)))))); tz = zone->time / USECS_PER_SEC; @@ -5113,9 +5113,9 @@ timestamptz_izone(PG_FUNCTION_ARGS) if (zone->month != 0 || zone->day != 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("interval time zone \"%s\" must not include months or days", - DatumGetCString(DirectFunctionCall1(interval_out, - PointerGetDatum(zone)))))); + errmsg("interval time zone \"%s\" must not include months or days", + DatumGetCString(DirectFunctionCall1(interval_out, + PointerGetDatum(zone)))))); tz = -(zone->time / USECS_PER_SEC); @@ -5196,9 +5196,9 @@ generate_series_timestamp(PG_FUNCTION_ARGS) { /* increment current in preparation for next iteration */ fctx->current = DatumGetTimestamp( - DirectFunctionCall2(timestamp_pl_interval, - TimestampGetDatum(fctx->current), - PointerGetDatum(&fctx->step))); + DirectFunctionCall2(timestamp_pl_interval, + TimestampGetDatum(fctx->current), + PointerGetDatum(&fctx->step))); /* do when there is more left to send */ SRF_RETURN_NEXT(funcctx, TimestampGetDatum(result)); @@ -5277,9 +5277,9 @@ generate_series_timestamptz(PG_FUNCTION_ARGS) { /* increment current in preparation for next iteration */ fctx->current = DatumGetTimestampTz( - DirectFunctionCall2(timestamptz_pl_interval, - TimestampTzGetDatum(fctx->current), - PointerGetDatum(&fctx->step))); + DirectFunctionCall2(timestamptz_pl_interval, + TimestampTzGetDatum(fctx->current), + PointerGetDatum(&fctx->step))); /* do when there is more left to send */ SRF_RETURN_NEXT(funcctx, TimestampTzGetDatum(result)); diff --git a/src/backend/utils/adt/tsquery.c b/src/backend/utils/adt/tsquery.c index 53e36afbe8e..ee047bd8d57 100644 --- a/src/backend/utils/adt/tsquery.c +++ b/src/backend/utils/adt/tsquery.c @@ -458,7 +458,7 @@ cleanOpStack(TSQueryParserState state, { /* NOT is right associative unlike to others */ if ((op != OP_NOT && opPriority > OP_PRIORITY(stack[*lenstack - 1].op)) || - (op == OP_NOT && opPriority >= OP_PRIORITY(stack[*lenstack - 1].op))) + (op == OP_NOT && opPriority >= OP_PRIORITY(stack[*lenstack - 1].op))) break; (*lenstack)--; diff --git a/src/backend/utils/adt/tsvector_op.c b/src/backend/utils/adt/tsvector_op.c index 66c5255f8b4..2d7407c29cb 100644 --- a/src/backend/utils/adt/tsvector_op.c +++ b/src/backend/utils/adt/tsvector_op.c @@ -674,7 +674,7 @@ tsvector_unnest(PG_FUNCTION_ARGS) Datum values[3]; values[0] = PointerGetDatum( - cstring_to_text_with_len(data + arrin[i].pos, arrin[i].len) + cstring_to_text_with_len(data + arrin[i].pos, arrin[i].len) ); if (arrin[i].haspos) @@ -697,14 +697,14 @@ tsvector_unnest(PG_FUNCTION_ARGS) positions[j] = Int16GetDatum(WEP_GETPOS(posv->pos[j])); weight = 'D' - WEP_GETWEIGHT(posv->pos[j]); weights[j] = PointerGetDatum( - cstring_to_text_with_len(&weight, 1) + cstring_to_text_with_len(&weight, 1) ); } values[1] = PointerGetDatum( - construct_array(positions, posv->npos, INT2OID, 2, true, 's')); + construct_array(positions, posv->npos, INT2OID, 2, true, 's')); values[2] = PointerGetDatum( - construct_array(weights, posv->npos, TEXTOID, -1, false, 'i')); + construct_array(weights, posv->npos, TEXTOID, -1, false, 'i')); } else { @@ -738,7 +738,7 @@ tsvector_to_array(PG_FUNCTION_ARGS) for (i = 0; i < tsin->size; i++) { elements[i] = PointerGetDatum( - cstring_to_text_with_len(STRPTR(tsin) + arrin[i].pos, arrin[i].len) + cstring_to_text_with_len(STRPTR(tsin) + arrin[i].pos, arrin[i].len) ); } diff --git a/src/backend/utils/adt/uuid.c b/src/backend/utils/adt/uuid.c index eaf2f8064d4..5f15c8e6196 100644 --- a/src/backend/utils/adt/uuid.c +++ b/src/backend/utils/adt/uuid.c @@ -340,7 +340,7 @@ uuid_abbrev_abort(int memtupcount, SortSupport ssup) if (trace_sort) elog(LOG, "uuid_abbrev: aborting abbreviation at cardinality %f" - " below threshold %f after " INT64_FORMAT " values (%d rows)", + " below threshold %f after " INT64_FORMAT " values (%d rows)", abbr_card, uss->input_count / 2000.0 + 0.5, uss->input_count, memtupcount); #endif diff --git a/src/backend/utils/adt/varbit.c b/src/backend/utils/adt/varbit.c index 41238dd763f..0cf1c6f6d60 100644 --- a/src/backend/utils/adt/varbit.c +++ b/src/backend/utils/adt/varbit.c @@ -161,8 +161,8 @@ bit_in(PG_FUNCTION_ARGS) if (slen > VARBITMAXLEN / 4) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("bit string length exceeds the maximum allowed (%d)", - VARBITMAXLEN))); + errmsg("bit string length exceeds the maximum allowed (%d)", + VARBITMAXLEN))); bitlen = slen * 4; } @@ -473,8 +473,8 @@ varbit_in(PG_FUNCTION_ARGS) if (slen > VARBITMAXLEN / 4) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("bit string length exceeds the maximum allowed (%d)", - VARBITMAXLEN))); + errmsg("bit string length exceeds the maximum allowed (%d)", + VARBITMAXLEN))); bitlen = slen * 4; } diff --git a/src/backend/utils/adt/varchar.c b/src/backend/utils/adt/varchar.c index 6f2f9f66339..cbc62b00be2 100644 --- a/src/backend/utils/adt/varchar.c +++ b/src/backend/utils/adt/varchar.c @@ -467,8 +467,8 @@ varchar_input(const char *s, size_t len, int32 atttypmod) if (s[j] != ' ') ereport(ERROR, (errcode(ERRCODE_STRING_DATA_RIGHT_TRUNCATION), - errmsg("value too long for type character varying(%d)", - (int) maxlen))); + errmsg("value too long for type character varying(%d)", + (int) maxlen))); } len = mbmaxlen; @@ -620,8 +620,8 @@ varchar(PG_FUNCTION_ARGS) if (s_data[i] != ' ') ereport(ERROR, (errcode(ERRCODE_STRING_DATA_RIGHT_TRUNCATION), - errmsg("value too long for type character varying(%d)", - maxlen))); + errmsg("value too long for type character varying(%d)", + maxlen))); } PG_RETURN_VARCHAR_P((VarChar *) cstring_to_text_with_len(s_data, diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c index be53f7d60d2..2407394b068 100644 --- a/src/backend/utils/adt/varlena.c +++ b/src/backend/utils/adt/varlena.c @@ -2139,7 +2139,7 @@ varstrfastcmp_locale(Datum x, Datum y, SortSupport ssup) &status); if (U_FAILURE(status)) ereport(ERROR, - (errmsg("collation failed: %s", u_errorName(status)))); + (errmsg("collation failed: %s", u_errorName(status)))); } else #endif @@ -2350,7 +2350,7 @@ varstr_abbrev_convert(Datum original, SortSupport ssup) &iter, state, (uint8_t *) sss->buf2, - Min(sizeof(Datum), sss->buflen2), + Min(sizeof(Datum), sss->buflen2), &status); if (U_FAILURE(status)) ereport(ERROR, @@ -2359,7 +2359,7 @@ varstr_abbrev_convert(Datum original, SortSupport ssup) else bsize = ucol_getSortKey(sss->locale->info.icu.ucol, uchar, ulen, - (uint8_t *) sss->buf2, sss->buflen2); + (uint8_t *) sss->buf2, sss->buflen2); } else #endif @@ -4244,7 +4244,7 @@ text_to_array_internal(PG_FUNCTION_ARGS) /* XXX: this hardcodes assumptions about the text type */ PG_RETURN_ARRAYTYPE_P(construct_md_array(elems, nulls, 1, dims, lbs, - TEXTOID, -1, false, 'i')); + TEXTOID, -1, false, 'i')); } start_posn = 1; @@ -5317,7 +5317,7 @@ text_format_parse_format(const char *start_ptr, const char *end_ptr, if (*cp != '$') ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("width argument position must be ended by \"$\""))); + errmsg("width argument position must be ended by \"$\""))); /* The number was width argument position */ *widthpos = n; /* Explicit 0 for argument index is immediately refused */ @@ -5362,7 +5362,7 @@ text_format_string_conversion(StringInfo buf, char conversion, else if (conversion == 'I') ereport(ERROR, (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), - errmsg("null values cannot be formatted as an SQL identifier"))); + errmsg("null values cannot be formatted as an SQL identifier"))); return; } diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c index 0ed679eea69..323614c183d 100644 --- a/src/backend/utils/adt/xml.c +++ b/src/backend/utils/adt/xml.c @@ -157,7 +157,7 @@ static StringInfo query_to_xml_internal(const char *query, char *tablename, const char *xmlschema, bool nulls, bool tableforest, const char *targetns, bool top_level); static const char *map_sql_table_to_xmlschema(TupleDesc tupdesc, Oid relid, - bool nulls, bool tableforest, const char *targetns); + bool nulls, bool tableforest, const char *targetns); static const char *map_sql_schema_to_xmlschema_types(Oid nspid, List *relid_list, bool nulls, bool tableforest, const char *targetns); @@ -798,7 +798,7 @@ xmlpi(char *target, text *arg, bool arg_is_null, bool *result_is_null) ereport(ERROR, (errcode(ERRCODE_INVALID_XML_PROCESSING_INSTRUCTION), errmsg("invalid XML processing instruction"), - errdetail("XML processing instruction cannot contain \"?>\"."))); + errdetail("XML processing instruction cannot contain \"?>\"."))); appendStringInfoChar(&buf, ' '); appendStringInfoString(&buf, string + strspn(string, " ")); @@ -1439,7 +1439,7 @@ xml_parse(text *data, XmlOptionType xmloption_arg, bool preserve_whitespace, NULL, "UTF-8", XML_PARSE_NOENT | XML_PARSE_DTDATTR - | (preserve_whitespace ? 0 : XML_PARSE_NOBLANKS)); + | (preserve_whitespace ? 0 : XML_PARSE_NOBLANKS)); if (doc == NULL || xmlerrcxt->err_occurred) xml_ereport(xmlerrcxt, ERROR, ERRCODE_INVALID_XML_DOCUMENT, "invalid XML document"); @@ -1455,7 +1455,7 @@ xml_parse(text *data, XmlOptionType xmloption_arg, bool preserve_whitespace, &count, &version, NULL, &standalone); if (res_code != 0) xml_ereport_by_code(ERROR, ERRCODE_INVALID_XML_CONTENT, - "invalid XML content: invalid XML declaration", + "invalid XML content: invalid XML declaration", res_code); doc = xmlNewDoc(version); @@ -1467,7 +1467,7 @@ xml_parse(text *data, XmlOptionType xmloption_arg, bool preserve_whitespace, if (*(utf8string + count)) { res_code = xmlParseBalancedChunkMemory(doc, NULL, NULL, 0, - utf8string + count, NULL); + utf8string + count, NULL); if (res_code != 0 || xmlerrcxt->err_occurred) xml_ereport(xmlerrcxt, ERROR, ERRCODE_INVALID_XML_CONTENT, "invalid XML content"); @@ -1623,7 +1623,7 @@ xml_errorHandler(void *data, xmlErrorPtr error) xmlParserInputPtr input = (ctxt != NULL) ? ctxt->input : NULL; xmlNodePtr node = error->node; const xmlChar *name = (node != NULL && - node->type == XML_ELEMENT_NODE) ? node->name : NULL; + node->type == XML_ELEMENT_NODE) ? node->name : NULL; int domain = error->domain; int level = error->level; StringInfo errorBuf; @@ -2171,10 +2171,10 @@ map_sql_value_to_xml_value(Datum value, Oid type, bool xml_escape_strings) if (xmlbinary == XMLBINARY_BASE64) xmlTextWriterWriteBase64(writer, VARDATA_ANY(bstr), - 0, VARSIZE_ANY_EXHDR(bstr)); + 0, VARSIZE_ANY_EXHDR(bstr)); else xmlTextWriterWriteBinHex(writer, VARDATA_ANY(bstr), - 0, VARSIZE_ANY_EXHDR(bstr)); + 0, VARSIZE_ANY_EXHDR(bstr)); /* we MUST do this now to flush data out to the buffer */ xmlFreeTextWriter(writer); @@ -2385,8 +2385,8 @@ database_get_xml_visible_tables(void) CppAsString2(RELKIND_RELATION) "," CppAsString2(RELKIND_MATVIEW) "," CppAsString2(RELKIND_VIEW) ")" - " AND pg_catalog.has_table_privilege(pg_class.oid, 'SELECT')" - " AND relnamespace IN (" XML_VISIBLE_SCHEMAS ");"); + " AND pg_catalog.has_table_privilege(pg_class.oid, 'SELECT')" + " AND relnamespace IN (" XML_VISIBLE_SCHEMAS ");"); } @@ -2405,7 +2405,7 @@ table_to_xml_internal(Oid relid, initStringInfo(&query); appendStringInfo(&query, "SELECT * FROM %s", DatumGetCString(DirectFunctionCall1(regclassout, - ObjectIdGetDatum(relid)))); + ObjectIdGetDatum(relid)))); return query_to_xml_internal(query.data, get_rel_name(relid), xmlschema, nulls, tableforest, targetns, top_level); @@ -2421,8 +2421,8 @@ table_to_xml(PG_FUNCTION_ARGS) const char *targetns = text_to_cstring(PG_GETARG_TEXT_PP(3)); PG_RETURN_XML_P(stringinfo_to_xmltype(table_to_xml_internal(relid, NULL, - nulls, tableforest, - targetns, true))); + nulls, tableforest, + targetns, true))); } @@ -2435,8 +2435,8 @@ query_to_xml(PG_FUNCTION_ARGS) const char *targetns = text_to_cstring(PG_GETARG_TEXT_PP(3)); PG_RETURN_XML_P(stringinfo_to_xmltype(query_to_xml_internal(query, NULL, - NULL, nulls, tableforest, - targetns, true))); + NULL, nulls, tableforest, + targetns, true))); } @@ -2640,7 +2640,7 @@ cursor_to_xmlschema(PG_FUNCTION_ARGS) xmlschema = _SPI_strdup(map_sql_table_to_xmlschema(portal->tupDesc, InvalidOid, nulls, - tableforest, targetns)); + tableforest, targetns)); SPI_finish(); PG_RETURN_XML_P(cstring_to_xmltype(xmlschema)); @@ -2663,8 +2663,8 @@ table_to_xml_and_xmlschema(PG_FUNCTION_ARGS) heap_close(rel, NoLock); PG_RETURN_XML_P(stringinfo_to_xmltype(table_to_xml_internal(relid, - xmlschema, nulls, tableforest, - targetns, true))); + xmlschema, nulls, tableforest, + targetns, true))); } @@ -2689,13 +2689,13 @@ query_to_xml_and_xmlschema(PG_FUNCTION_ARGS) elog(ERROR, "SPI_cursor_open(\"%s\") failed", query); xmlschema = _SPI_strdup(map_sql_table_to_xmlschema(portal->tupDesc, - InvalidOid, nulls, tableforest, targetns)); + InvalidOid, nulls, tableforest, targetns)); SPI_cursor_close(portal); SPI_finish(); PG_RETURN_XML_P(stringinfo_to_xmltype(query_to_xml_internal(query, NULL, - xmlschema, nulls, tableforest, - targetns, true))); + xmlschema, nulls, tableforest, + targetns, true))); } @@ -2762,7 +2762,7 @@ schema_to_xml(PG_FUNCTION_ARGS) nspid = LookupExplicitNamespace(schemaname, false); PG_RETURN_XML_P(stringinfo_to_xmltype(schema_to_xml_internal(nspid, NULL, - nulls, tableforest, targetns, true))); + nulls, tableforest, targetns, true))); } @@ -2827,8 +2827,8 @@ schema_to_xmlschema_internal(const char *schemaname, bool nulls, map_sql_typecoll_to_xmlschema_types(tupdesc_list)); appendStringInfoString(result, - map_sql_schema_to_xmlschema_types(nspid, relid_list, - nulls, tableforest, targetns)); + map_sql_schema_to_xmlschema_types(nspid, relid_list, + nulls, tableforest, targetns)); xsd_schema_element_end(result); @@ -2847,7 +2847,7 @@ schema_to_xmlschema(PG_FUNCTION_ARGS) const char *targetns = text_to_cstring(PG_GETARG_TEXT_PP(3)); PG_RETURN_XML_P(stringinfo_to_xmltype(schema_to_xmlschema_internal(NameStr(*name), - nulls, tableforest, targetns))); + nulls, tableforest, targetns))); } @@ -2869,8 +2869,8 @@ schema_to_xml_and_xmlschema(PG_FUNCTION_ARGS) tableforest, targetns); PG_RETURN_XML_P(stringinfo_to_xmltype(schema_to_xml_internal(nspid, - xmlschema->data, nulls, - tableforest, targetns, true))); + xmlschema->data, nulls, + tableforest, targetns, true))); } @@ -2930,7 +2930,7 @@ database_to_xml(PG_FUNCTION_ARGS) const char *targetns = text_to_cstring(PG_GETARG_TEXT_PP(2)); PG_RETURN_XML_P(stringinfo_to_xmltype(database_to_xml_internal(NULL, nulls, - tableforest, targetns))); + tableforest, targetns))); } @@ -2985,7 +2985,7 @@ database_to_xmlschema(PG_FUNCTION_ARGS) const char *targetns = text_to_cstring(PG_GETARG_TEXT_PP(2)); PG_RETURN_XML_P(stringinfo_to_xmltype(database_to_xmlschema_internal(nulls, - tableforest, targetns))); + tableforest, targetns))); } @@ -3000,7 +3000,7 @@ database_to_xml_and_xmlschema(PG_FUNCTION_ARGS) xmlschema = database_to_xmlschema_internal(nulls, tableforest, targetns); PG_RETURN_XML_P(stringinfo_to_xmltype(database_to_xml_internal(xmlschema->data, - nulls, tableforest, targetns))); + nulls, tableforest, targetns))); } @@ -3065,14 +3065,14 @@ map_sql_table_to_xmlschema(TupleDesc tupdesc, Oid relid, bool nulls, true, false); tabletypename = map_multipart_sql_identifier_to_xml_name("TableType", - get_database_name(MyDatabaseId), - get_namespace_name(reltuple->relnamespace), - NameStr(reltuple->relname)); + get_database_name(MyDatabaseId), + get_namespace_name(reltuple->relnamespace), + NameStr(reltuple->relname)); rowtypename = map_multipart_sql_identifier_to_xml_name("RowType", - get_database_name(MyDatabaseId), - get_namespace_name(reltuple->relnamespace), - NameStr(reltuple->relname)); + get_database_name(MyDatabaseId), + get_namespace_name(reltuple->relnamespace), + NameStr(reltuple->relname)); ReleaseSysCache(tuple); } @@ -3090,7 +3090,7 @@ map_sql_table_to_xmlschema(TupleDesc tupdesc, Oid relid, bool nulls, xsd_schema_element_start(&result, targetns); appendStringInfoString(&result, - map_sql_typecoll_to_xmlschema_types(list_make1(tupdesc))); + map_sql_typecoll_to_xmlschema_types(list_make1(tupdesc))); appendStringInfo(&result, "<xsd:complexType name=\"%s\">\n" @@ -3102,10 +3102,10 @@ map_sql_table_to_xmlschema(TupleDesc tupdesc, Oid relid, bool nulls, if (tupdesc->attrs[i]->attisdropped) continue; appendStringInfo(&result, - " <xsd:element name=\"%s\" type=\"%s\"%s></xsd:element>\n", - map_sql_identifier_to_xml_name(NameStr(tupdesc->attrs[i]->attname), - true, false), - map_sql_type_to_xml_name(tupdesc->attrs[i]->atttypid, -1), + " <xsd:element name=\"%s\" type=\"%s\"%s></xsd:element>\n", + map_sql_identifier_to_xml_name(NameStr(tupdesc->attrs[i]->attname), + true, false), + map_sql_type_to_xml_name(tupdesc->attrs[i]->atttypid, -1), nulls ? " nillable=\"true\"" : " minOccurs=\"0\""); } @@ -3180,9 +3180,9 @@ map_sql_schema_to_xmlschema_types(Oid nspid, List *relid_list, bool nulls, char *relname = get_rel_name(relid); char *xmltn = map_sql_identifier_to_xml_name(relname, true, false); char *tabletypename = map_multipart_sql_identifier_to_xml_name(tableforest ? "RowType" : "TableType", - dbname, - nspname, - relname); + dbname, + nspname, + relname); if (!tableforest) appendStringInfo(&result, @@ -3247,9 +3247,9 @@ map_sql_catalog_to_xmlschema_types(List *nspid_list, bool nulls, char *nspname = get_namespace_name(nspid); char *xmlsn = map_sql_identifier_to_xml_name(nspname, true, false); char *schematypename = map_multipart_sql_identifier_to_xml_name("SchemaType", - dbname, - nspname, - NULL); + dbname, + nspname, + NULL); appendStringInfo(&result, " <xsd:element name=\"%s\" type=\"%s\"/>\n", @@ -3361,9 +3361,9 @@ map_sql_type_to_xml_name(Oid typeoid, int typmod) appendStringInfoString(&result, map_multipart_sql_identifier_to_xml_name((typtuple->typtype == TYPTYPE_DOMAIN) ? "Domain" : "UDT", - get_database_name(MyDatabaseId), - get_namespace_name(typtuple->typnamespace), - NameStr(typtuple->typname))); + get_database_name(MyDatabaseId), + get_namespace_name(typtuple->typnamespace), + NameStr(typtuple->typname))); ReleaseSysCache(tuple); } @@ -3471,15 +3471,15 @@ map_sql_type_to_xmlschema_type(Oid typeoid, int typmod) appendStringInfo(&result, " <xsd:restriction base=\"xsd:%s\">\n" " </xsd:restriction>\n", - xmlbinary == XMLBINARY_BASE64 ? "base64Binary" : "hexBinary"); + xmlbinary == XMLBINARY_BASE64 ? "base64Binary" : "hexBinary"); break; case NUMERICOID: if (typmod != -1) appendStringInfo(&result, - " <xsd:restriction base=\"xsd:decimal\">\n" + " <xsd:restriction base=\"xsd:decimal\">\n" " <xsd:totalDigits value=\"%d\"/>\n" - " <xsd:fractionDigits value=\"%d\"/>\n" + " <xsd:fractionDigits value=\"%d\"/>\n" " </xsd:restriction>\n", ((typmod - VARHDRSZ) >> 16) & 0xffff, (typmod - VARHDRSZ) & 0xffff); @@ -3506,16 +3506,16 @@ map_sql_type_to_xmlschema_type(Oid typeoid, int typmod) case INT8OID: appendStringInfo(&result, " <xsd:restriction base=\"xsd:long\">\n" - " <xsd:maxInclusive value=\"" INT64_FORMAT "\"/>\n" - " <xsd:minInclusive value=\"" INT64_FORMAT "\"/>\n" + " <xsd:maxInclusive value=\"" INT64_FORMAT "\"/>\n" + " <xsd:minInclusive value=\"" INT64_FORMAT "\"/>\n" " </xsd:restriction>\n", - (((uint64) 1) << (sizeof(int64) * 8 - 1)) - 1, + (((uint64) 1) << (sizeof(int64) * 8 - 1)) - 1, (((uint64) 1) << (sizeof(int64) * 8 - 1))); break; case FLOAT4OID: appendStringInfoString(&result, - " <xsd:restriction base=\"xsd:float\"></xsd:restriction>\n"); + " <xsd:restriction base=\"xsd:float\"></xsd:restriction>\n"); break; case FLOAT8OID: @@ -3535,19 +3535,19 @@ map_sql_type_to_xmlschema_type(Oid typeoid, int typmod) if (typmod == -1) appendStringInfo(&result, - " <xsd:restriction base=\"xsd:time\">\n" + " <xsd:restriction base=\"xsd:time\">\n" " <xsd:pattern value=\"\\p{Nd}{2}:\\p{Nd}{2}:\\p{Nd}{2}(.\\p{Nd}+)?%s\"/>\n" " </xsd:restriction>\n", tz); else if (typmod == 0) appendStringInfo(&result, - " <xsd:restriction base=\"xsd:time\">\n" + " <xsd:restriction base=\"xsd:time\">\n" " <xsd:pattern value=\"\\p{Nd}{2}:\\p{Nd}{2}:\\p{Nd}{2}%s\"/>\n" " </xsd:restriction>\n", tz); else appendStringInfo(&result, - " <xsd:restriction base=\"xsd:time\">\n" + " <xsd:restriction base=\"xsd:time\">\n" " <xsd:pattern value=\"\\p{Nd}{2}:\\p{Nd}{2}:\\p{Nd}{2}.\\p{Nd}{%d}%s\"/>\n" - " </xsd:restriction>\n", typmod - VARHDRSZ, tz); + " </xsd:restriction>\n", typmod - VARHDRSZ, tz); break; } @@ -3558,25 +3558,25 @@ map_sql_type_to_xmlschema_type(Oid typeoid, int typmod) if (typmod == -1) appendStringInfo(&result, - " <xsd:restriction base=\"xsd:dateTime\">\n" + " <xsd:restriction base=\"xsd:dateTime\">\n" " <xsd:pattern value=\"\\p{Nd}{4}-\\p{Nd}{2}-\\p{Nd}{2}T\\p{Nd}{2}:\\p{Nd}{2}:\\p{Nd}{2}(.\\p{Nd}+)?%s\"/>\n" " </xsd:restriction>\n", tz); else if (typmod == 0) appendStringInfo(&result, - " <xsd:restriction base=\"xsd:dateTime\">\n" + " <xsd:restriction base=\"xsd:dateTime\">\n" " <xsd:pattern value=\"\\p{Nd}{4}-\\p{Nd}{2}-\\p{Nd}{2}T\\p{Nd}{2}:\\p{Nd}{2}:\\p{Nd}{2}%s\"/>\n" " </xsd:restriction>\n", tz); else appendStringInfo(&result, - " <xsd:restriction base=\"xsd:dateTime\">\n" + " <xsd:restriction base=\"xsd:dateTime\">\n" " <xsd:pattern value=\"\\p{Nd}{4}-\\p{Nd}{2}-\\p{Nd}{2}T\\p{Nd}{2}:\\p{Nd}{2}:\\p{Nd}{2}.\\p{Nd}{%d}%s\"/>\n" - " </xsd:restriction>\n", typmod - VARHDRSZ, tz); + " </xsd:restriction>\n", typmod - VARHDRSZ, tz); break; } case DATEOID: appendStringInfoString(&result, - " <xsd:restriction base=\"xsd:date\">\n" + " <xsd:restriction base=\"xsd:date\">\n" " <xsd:pattern value=\"\\p{Nd}{4}-\\p{Nd}{2}-\\p{Nd}{2}\"/>\n" " </xsd:restriction>\n"); break; @@ -3591,7 +3591,7 @@ map_sql_type_to_xmlschema_type(Oid typeoid, int typmod) appendStringInfo(&result, " <xsd:restriction base=\"%s\"/>\n", - map_sql_type_to_xml_name(base_typeoid, base_typmod)); + map_sql_type_to_xml_name(base_typeoid, base_typmod)); } break; } @@ -3650,7 +3650,7 @@ SPI_sql_row_to_xmlelement(uint64 rownum, StringInfo result, char *tablename, appendStringInfo(result, " <%s>%s</%s>\n", colname, map_sql_value_to_xml_value(colval, - SPI_gettypeid(SPI_tuptable->tupdesc, i), true), + SPI_gettypeid(SPI_tuptable->tupdesc, i), true), colname); } @@ -3772,7 +3772,7 @@ xml_xpathobjtoxmlarray(xmlXPathObjectPtr xpathobj, for (i = 0; i < result; i++) { datum = PointerGetDatum(xml_xmlnodetoxmltype(xpathobj->nodesetval->nodeTab[i], - xmlerrcxt)); + xmlerrcxt)); (void) accumArrayResult(astate, datum, false, XMLOID, CurrentMemoryContext); } @@ -3936,7 +3936,7 @@ xpath_internal(text *xpath_expr_text, xmltype *data, ArrayType *namespaces, ns_names_uris_nulls[i * 2 + 1]) ereport(ERROR, (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), - errmsg("neither namespace name nor URI may be null"))); + errmsg("neither namespace name nor URI may be null"))); ns_name = TextDatumGetCString(ns_names_uris[i * 2]); ns_uri = TextDatumGetCString(ns_names_uris[i * 2 + 1]); if (xmlXPathRegisterNs(xpathctx, @@ -4495,7 +4495,7 @@ XmlTableGetValue(TableFuncScanState *state, int colnum, xmlChar *str; str = xmlNodeListGetString(xtCxt->doc, - xpathobj->nodesetval->nodeTab[0]->xmlChildrenNode, + xpathobj->nodesetval->nodeTab[0]->xmlChildrenNode, 1); if (str != NULL) @@ -4546,8 +4546,8 @@ XmlTableGetValue(TableFuncScanState *state, int colnum, for (i = 0; i < count; i++) { appendStringInfoText(&str, - xml_xmlnodetoxmltype(xpathobj->nodesetval->nodeTab[i], - xtCxt->xmlerrcxt)); + xml_xmlnodetoxmltype(xpathobj->nodesetval->nodeTab[i], + xtCxt->xmlerrcxt)); } cstr = str.data; } diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c index 5652c3abe07..d0e54b85352 100644 --- a/src/backend/utils/cache/inval.c +++ b/src/backend/utils/cache/inval.c @@ -236,7 +236,7 @@ AddInvalidationMessage(InvalidationChunk **listHdr, chunk = (InvalidationChunk *) MemoryContextAlloc(CurTransactionContext, offsetof(InvalidationChunk, msgs) + - FIRSTCHUNKSIZE * sizeof(SharedInvalidationMessage)); + FIRSTCHUNKSIZE * sizeof(SharedInvalidationMessage)); chunk->nitems = 0; chunk->maxitems = FIRSTCHUNKSIZE; chunk->next = *listHdr; @@ -464,7 +464,7 @@ ProcessInvalidationMessages(InvalidationListHeader *hdr, */ static void ProcessInvalidationMessagesMulti(InvalidationListHeader *hdr, - void (*func) (const SharedInvalidationMessage *msgs, int n)) + void (*func) (const SharedInvalidationMessage *msgs, int n)) { ProcessMessageListMulti(hdr->cclist, func(msgs, n)); ProcessMessageListMulti(hdr->rclist, func(msgs, n)); @@ -778,7 +778,7 @@ MakeSharedInvalidMessagesArray(const SharedInvalidationMessage *msgs, int n) * We're so close to EOXact that we now we're going to lose it anyhow. */ SharedInvalidMessagesArray = palloc(maxSharedInvalidMessagesArray - * sizeof(SharedInvalidationMessage)); + * sizeof(SharedInvalidationMessage)); } if ((numSharedInvalidMessagesArray + n) > maxSharedInvalidMessagesArray) @@ -788,7 +788,7 @@ MakeSharedInvalidMessagesArray(const SharedInvalidationMessage *msgs, int n) SharedInvalidMessagesArray = repalloc(SharedInvalidMessagesArray, maxSharedInvalidMessagesArray - * sizeof(SharedInvalidationMessage)); + * sizeof(SharedInvalidationMessage)); } /* diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c index dfe5592a25a..ad8a82f1e3f 100644 --- a/src/backend/utils/cache/plancache.c +++ b/src/backend/utils/cache/plancache.c @@ -1180,7 +1180,7 @@ GetCachedPlan(CachedPlanSource *plansource, ParamListInfo boundParams, { /* otherwise, it should be a sibling of the plansource */ MemoryContextSetParent(plan->context, - MemoryContextGetParent(plansource->context)); + MemoryContextGetParent(plansource->context)); } /* Update generic_cost whenever we make a new generic plan */ plansource->generic_cost = cached_plan_cost(plan, false); @@ -1520,7 +1520,7 @@ AcquireExecutorLocks(List *stmt_list, bool acquire) * acquire a non-conflicting lock. */ if (list_member_int(plannedstmt->resultRelations, rt_index) || - list_member_int(plannedstmt->nonleafResultRelations, rt_index)) + list_member_int(plannedstmt->nonleafResultRelations, rt_index)) lockmode = RowExclusiveLock; else if ((rc = get_plan_rowmark(plannedstmt->rowMarks, rt_index)) != NULL && RowMarkRequiresRowShareLock(rc->markType)) diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 93bcac1e776..43238dd8cbd 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -627,7 +627,7 @@ RelationBuildTupleDesc(Relation relation) constr->num_check = relation->rd_rel->relchecks; constr->check = (ConstrCheck *) MemoryContextAllocZero(CacheMemoryContext, - constr->num_check * sizeof(ConstrCheck)); + constr->num_check * sizeof(ConstrCheck)); CheckConstraintFetch(relation); } else @@ -1446,7 +1446,7 @@ RelationInitPhysicalAddr(Relation relation) Form_pg_class physrel; phys_tuple = ScanPgRelation(RelationGetRelid(relation), - RelationGetRelid(relation) != ClassOidIndexId, + RelationGetRelid(relation) != ClassOidIndexId, true); if (!HeapTupleIsValid(phys_tuple)) elog(ERROR, "could not find pg_class entry for %u", @@ -2889,7 +2889,7 @@ RememberToFreeTupleDescAtEOX(TupleDesc td) Assert(EOXactTupleDescArrayLen > 0); EOXactTupleDescArray = (TupleDesc *) repalloc(EOXactTupleDescArray, - newlen * sizeof(TupleDesc)); + newlen * sizeof(TupleDesc)); EOXactTupleDescArrayLen = newlen; } @@ -3782,7 +3782,7 @@ RelationCacheInitializePhase3(void) Form_pg_class relp; htup = SearchSysCache1(RELOID, - ObjectIdGetDatum(RelationGetRelid(relation))); + ObjectIdGetDatum(RelationGetRelid(relation))); if (!HeapTupleIsValid(htup)) elog(FATAL, "cache lookup failed for relation %u", RelationGetRelid(relation)); @@ -4045,7 +4045,7 @@ AttrDefaultFetch(Relation relation) continue; if (attrdef[i].adbin != NULL) elog(WARNING, "multiple attrdef records found for attr %s of rel %s", - NameStr(relation->rd_att->attrs[adform->adnum - 1]->attname), + NameStr(relation->rd_att->attrs[adform->adnum - 1]->attname), RelationGetRelationName(relation)); else found++; @@ -4055,7 +4055,7 @@ AttrDefaultFetch(Relation relation) adrel->rd_att, &isnull); if (isnull) elog(WARNING, "null adbin for attr %s of rel %s", - NameStr(relation->rd_att->attrs[adform->adnum - 1]->attname), + NameStr(relation->rd_att->attrs[adform->adnum - 1]->attname), RelationGetRelationName(relation)); else { @@ -4947,19 +4947,19 @@ restart: if (attrnum != 0) { indexattrs = bms_add_member(indexattrs, - attrnum - FirstLowInvalidHeapAttributeNumber); + attrnum - FirstLowInvalidHeapAttributeNumber); if (isKey) uindexattrs = bms_add_member(uindexattrs, - attrnum - FirstLowInvalidHeapAttributeNumber); + attrnum - FirstLowInvalidHeapAttributeNumber); if (isPK) pkindexattrs = bms_add_member(pkindexattrs, - attrnum - FirstLowInvalidHeapAttributeNumber); + attrnum - FirstLowInvalidHeapAttributeNumber); if (isIDKey) idindexattrs = bms_add_member(idindexattrs, - attrnum - FirstLowInvalidHeapAttributeNumber); + attrnum - FirstLowInvalidHeapAttributeNumber); } } @@ -5790,7 +5790,7 @@ write_relcache_init_file(bool shared) (errcode_for_file_access(), errmsg("could not create relation-cache initialization file \"%s\": %m", tempfilename), - errdetail("Continuing anyway, but there's something wrong."))); + errdetail("Continuing anyway, but there's something wrong."))); return; } diff --git a/src/backend/utils/cache/relmapper.c b/src/backend/utils/cache/relmapper.c index 6836c601e0e..f5394dc43d4 100644 --- a/src/backend/utils/cache/relmapper.c +++ b/src/backend/utils/cache/relmapper.c @@ -684,8 +684,8 @@ load_relmap_file(bool shared) if (!EQ_CRC32C(crc, map->crc)) ereport(FATAL, - (errmsg("relation mapping file \"%s\" contains incorrect checksum", - mapfilename))); + (errmsg("relation mapping file \"%s\" contains incorrect checksum", + mapfilename))); } /* diff --git a/src/backend/utils/cache/ts_cache.c b/src/backend/utils/cache/ts_cache.c index 88e4ffb66d9..da5c8ea345b 100644 --- a/src/backend/utils/cache/ts_cache.c +++ b/src/backend/utils/cache/ts_cache.c @@ -334,7 +334,7 @@ lookup_ts_dictionary_cache(Oid dictId) entry->dictData = DatumGetPointer(OidFunctionCall1(template->tmplinit, - PointerGetDatum(dictoptions))); + PointerGetDatum(dictoptions))); MemoryContextSwitchTo(oldcontext); } diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c index 234c8e3aa96..918db0a8f2d 100644 --- a/src/backend/utils/error/elog.c +++ b/src/backend/utils/error/elog.c @@ -1876,7 +1876,7 @@ DebugFileOpen(void) 0666)) < 0) ereport(FATAL, (errcode_for_file_access(), - errmsg("could not open file \"%s\": %m", OutputFileName))); + errmsg("could not open file \"%s\": %m", OutputFileName))); istty = isatty(fd); close(fd); @@ -2079,7 +2079,7 @@ write_eventlog(int level, const char *line, int len) if (evtHandle == INVALID_HANDLE_VALUE) { evtHandle = RegisterEventSource(NULL, - event_source ? event_source : DEFAULT_EVENT_SOURCE); + event_source ? event_source : DEFAULT_EVENT_SOURCE); if (evtHandle == NULL) { evtHandle = INVALID_HANDLE_VALUE; diff --git a/src/backend/utils/fmgr/dfmgr.c b/src/backend/utils/fmgr/dfmgr.c index 0783145a16e..1239f95ddcd 100644 --- a/src/backend/utils/fmgr/dfmgr.c +++ b/src/backend/utils/fmgr/dfmgr.c @@ -65,7 +65,7 @@ char *Dynamic_library_path; static void *internal_load_library(const char *libname); static void incompatible_module_error(const char *libname, - const Pg_magic_struct *module_magic_data) pg_attribute_noreturn(); + const Pg_magic_struct *module_magic_data) pg_attribute_noreturn(); static void internal_unload_library(const char *libname); static bool file_exists(const char *name); static char *expand_dynamic_library_name(const char *name); @@ -268,9 +268,9 @@ internal_load_library(const char *libname) free((char *) file_scanner); /* complain */ ereport(ERROR, - (errmsg("incompatible library \"%s\": missing magic block", - libname), - errhint("Extension libraries are required to use the PG_MODULE_MAGIC macro."))); + (errmsg("incompatible library \"%s\": missing magic block", + libname), + errhint("Extension libraries are required to use the PG_MODULE_MAGIC macro."))); } /* @@ -362,7 +362,7 @@ incompatible_module_error(const char *libname, if (details.len) appendStringInfoChar(&details, '\n'); appendStringInfo(&details, - _("Server has FLOAT4PASSBYVAL = %s, library has %s."), + _("Server has FLOAT4PASSBYVAL = %s, library has %s."), magic_data.float4byval ? "true" : "false", module_magic_data->float4byval ? "true" : "false"); } @@ -371,14 +371,14 @@ incompatible_module_error(const char *libname, if (details.len) appendStringInfoChar(&details, '\n'); appendStringInfo(&details, - _("Server has FLOAT8PASSBYVAL = %s, library has %s."), + _("Server has FLOAT8PASSBYVAL = %s, library has %s."), magic_data.float8byval ? "true" : "false", module_magic_data->float8byval ? "true" : "false"); } if (details.len == 0) appendStringInfoString(&details, - _("Magic block has unexpected length or padding difference.")); + _("Magic block has unexpected length or padding difference.")); ereport(ERROR, (errmsg("incompatible library \"%s\": magic block mismatch", diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c index fe268e7d44d..a7b07827e01 100644 --- a/src/backend/utils/fmgr/fmgr.c +++ b/src/backend/utils/fmgr/fmgr.c @@ -396,8 +396,8 @@ fetch_finfo_record(void *filehandle, const char *funcname) { ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), - errmsg("could not find function information for function \"%s\"", - funcname), + errmsg("could not find function information for function \"%s\"", + funcname), errhint("SQL-callable functions need an accompanying PG_FUNCTION_INFO_V1(funcname)."))); return NULL; /* silence compiler */ } @@ -631,7 +631,7 @@ fmgr_security_definer(PG_FUNCTION_ARGS) if (OidIsValid(fcache->userid)) SetUserIdAndSecContext(fcache->userid, - save_sec_context | SECURITY_LOCAL_USERID_CHANGE); + save_sec_context | SECURITY_LOCAL_USERID_CHANGE); if (fcache->proconfig) { diff --git a/src/backend/utils/fmgr/funcapi.c b/src/backend/utils/fmgr/funcapi.c index 6324220426b..be47d411c5b 100644 --- a/src/backend/utils/fmgr/funcapi.c +++ b/src/backend/utils/fmgr/funcapi.c @@ -1369,7 +1369,7 @@ TypeGetTupleDesc(Oid typeoid, List *colaliases) if (list_length(colaliases) != 1) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("number of aliases does not match number of columns"))); + errmsg("number of aliases does not match number of columns"))); /* OK, get the column alias */ attname = strVal(linitial(colaliases)); diff --git a/src/backend/utils/hash/dynahash.c b/src/backend/utils/hash/dynahash.c index 111d63df2b6..ebd55da997e 100644 --- a/src/backend/utils/hash/dynahash.c +++ b/src/backend/utils/hash/dynahash.c @@ -733,7 +733,7 @@ hash_estimate_size(long num_entries, Size entrysize) size = add_size(size, mul_size(nDirEntries, sizeof(HASHSEGMENT))); /* segments */ size = add_size(size, mul_size(nSegments, - MAXALIGN(DEF_SEGSIZE * sizeof(HASHBUCKET)))); + MAXALIGN(DEF_SEGSIZE * sizeof(HASHBUCKET)))); /* elements --- allocated in groups of choose_nelem_alloc() entries */ elementAllocCnt = choose_nelem_alloc(entrysize); nElementAllocs = (num_entries - 1) / elementAllocCnt + 1; diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c index 1c75e6357ec..49a6afafe7f 100644 --- a/src/backend/utils/init/miscinit.c +++ b/src/backend/utils/init/miscinit.c @@ -987,7 +987,7 @@ CreateLockFile(const char *filename, bool amPostmaster, errmsg("could not remove old lock file \"%s\": %m", filename), errhint("The file seems accidentally left over, but " - "it could not be removed. Please remove the file " + "it could not be removed. Please remove the file " "by hand and try again."))); } @@ -1303,8 +1303,8 @@ RecheckDataDirLockFile(void) /* non-fatal, at least for now */ ereport(LOG, (errcode_for_file_access(), - errmsg("could not open file \"%s\": %m; continuing anyway", - DIRECTORY_LOCK_FILE))); + errmsg("could not open file \"%s\": %m; continuing anyway", + DIRECTORY_LOCK_FILE))); return true; } } diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index 56b4a5b8c3e..eb6960d93fa 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -322,8 +322,8 @@ CheckMyDatabase(const char *name, bool am_superuser) if (!dbform->datallowconn) ereport(FATAL, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("database \"%s\" is not currently accepting connections", - name))); + errmsg("database \"%s\" is not currently accepting connections", + name))); /* * Check privilege to connect to the database. (The am_superuser test @@ -375,17 +375,17 @@ CheckMyDatabase(const char *name, bool am_superuser) if (pg_perm_setlocale(LC_COLLATE, collate) == NULL) ereport(FATAL, - (errmsg("database locale is incompatible with operating system"), - errdetail("The database was initialized with LC_COLLATE \"%s\", " - " which is not recognized by setlocale().", collate), - errhint("Recreate the database with another locale or install the missing locale."))); + (errmsg("database locale is incompatible with operating system"), + errdetail("The database was initialized with LC_COLLATE \"%s\", " + " which is not recognized by setlocale().", collate), + errhint("Recreate the database with another locale or install the missing locale."))); if (pg_perm_setlocale(LC_CTYPE, ctype) == NULL) ereport(FATAL, - (errmsg("database locale is incompatible with operating system"), - errdetail("The database was initialized with LC_CTYPE \"%s\", " - " which is not recognized by setlocale().", ctype), - errhint("Recreate the database with another locale or install the missing locale."))); + (errmsg("database locale is incompatible with operating system"), + errdetail("The database was initialized with LC_CTYPE \"%s\", " + " which is not recognized by setlocale().", ctype), + errhint("Recreate the database with another locale or install the missing locale."))); /* Make the locale settings visible as GUC variables, too */ SetConfigOption("lc_collate", collate, PGC_INTERNAL, PGC_S_OVERRIDE); @@ -757,7 +757,7 @@ InitPostgres(const char *in_dbname, Oid dboid, const char *username, else ereport(FATAL, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("must be superuser to connect during database shutdown"))); + errmsg("must be superuser to connect during database shutdown"))); } /* @@ -767,7 +767,7 @@ InitPostgres(const char *in_dbname, Oid dboid, const char *username, { ereport(FATAL, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("must be superuser to connect in binary upgrade mode"))); + errmsg("must be superuser to connect in binary upgrade mode"))); } /* @@ -949,7 +949,7 @@ InitPostgres(const char *in_dbname, Oid dboid, const char *username, ereport(FATAL, (errcode(ERRCODE_UNDEFINED_DATABASE), errmsg("database \"%s\" does not exist", dbname), - errdetail("It seems to have just been dropped or renamed."))); + errdetail("It seems to have just been dropped or renamed."))); } /* @@ -967,8 +967,8 @@ InitPostgres(const char *in_dbname, Oid dboid, const char *username, (errcode(ERRCODE_UNDEFINED_DATABASE), errmsg("database \"%s\" does not exist", dbname), - errdetail("The database subdirectory \"%s\" is missing.", - fullpath))); + errdetail("The database subdirectory \"%s\" is missing.", + fullpath))); else ereport(FATAL, (errcode_for_file_access(), diff --git a/src/backend/utils/mb/conversion_procs/utf8_and_euc2004/utf8_and_euc2004.c b/src/backend/utils/mb/conversion_procs/utf8_and_euc2004/utf8_and_euc2004.c index 1e6f3b3f19c..b21167997ca 100644 --- a/src/backend/utils/mb/conversion_procs/utf8_and_euc2004/utf8_and_euc2004.c +++ b/src/backend/utils/mb/conversion_procs/utf8_and_euc2004/utf8_and_euc2004.c @@ -43,7 +43,7 @@ euc_jis_2004_to_utf8(PG_FUNCTION_ARGS) LocalToUtf(src, len, dest, &euc_jis_2004_to_unicode_tree, - LUmapEUC_JIS_2004_combined, lengthof(LUmapEUC_JIS_2004_combined), + LUmapEUC_JIS_2004_combined, lengthof(LUmapEUC_JIS_2004_combined), NULL, PG_EUC_JIS_2004); @@ -61,7 +61,7 @@ utf8_to_euc_jis_2004(PG_FUNCTION_ARGS) UtfToLocal(src, len, dest, &euc_jis_2004_from_unicode_tree, - ULmapEUC_JIS_2004_combined, lengthof(ULmapEUC_JIS_2004_combined), + ULmapEUC_JIS_2004_combined, lengthof(ULmapEUC_JIS_2004_combined), NULL, PG_EUC_JIS_2004); diff --git a/src/backend/utils/mb/conversion_procs/utf8_and_sjis2004/utf8_and_sjis2004.c b/src/backend/utils/mb/conversion_procs/utf8_and_sjis2004/utf8_and_sjis2004.c index f8eb7252018..adc1c9e93c4 100644 --- a/src/backend/utils/mb/conversion_procs/utf8_and_sjis2004/utf8_and_sjis2004.c +++ b/src/backend/utils/mb/conversion_procs/utf8_and_sjis2004/utf8_and_sjis2004.c @@ -43,7 +43,7 @@ shift_jis_2004_to_utf8(PG_FUNCTION_ARGS) LocalToUtf(src, len, dest, &shift_jis_2004_to_unicode_tree, - LUmapSHIFT_JIS_2004_combined, lengthof(LUmapSHIFT_JIS_2004_combined), + LUmapSHIFT_JIS_2004_combined, lengthof(LUmapSHIFT_JIS_2004_combined), NULL, PG_SHIFT_JIS_2004); @@ -61,7 +61,7 @@ utf8_to_shift_jis_2004(PG_FUNCTION_ARGS) UtfToLocal(src, len, dest, &shift_jis_2004_from_unicode_tree, - ULmapSHIFT_JIS_2004_combined, lengthof(ULmapSHIFT_JIS_2004_combined), + ULmapSHIFT_JIS_2004_combined, lengthof(ULmapSHIFT_JIS_2004_combined), NULL, PG_SHIFT_JIS_2004); diff --git a/src/backend/utils/mb/mbutils.c b/src/backend/utils/mb/mbutils.c index 95644e3468a..ca7f129ebe1 100644 --- a/src/backend/utils/mb/mbutils.c +++ b/src/backend/utils/mb/mbutils.c @@ -374,8 +374,8 @@ pg_do_encoding_conversion(unsigned char *src, int len, ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), errmsg("out of memory"), - errdetail("String of %d bytes is too long for encoding conversion.", - len))); + errdetail("String of %d bytes is too long for encoding conversion.", + len))); result = palloc(len * MAX_CONVERSION_GROWTH + 1); @@ -399,7 +399,7 @@ pg_convert_to(PG_FUNCTION_ARGS) Datum string = PG_GETARG_DATUM(0); Datum dest_encoding_name = PG_GETARG_DATUM(1); Datum src_encoding_name = DirectFunctionCall1(namein, - CStringGetDatum(DatabaseEncoding->name)); + CStringGetDatum(DatabaseEncoding->name)); Datum result; /* @@ -424,7 +424,7 @@ pg_convert_from(PG_FUNCTION_ARGS) Datum string = PG_GETARG_DATUM(0); Datum src_encoding_name = PG_GETARG_DATUM(1); Datum dest_encoding_name = DirectFunctionCall1(namein, - CStringGetDatum(DatabaseEncoding->name)); + CStringGetDatum(DatabaseEncoding->name)); Datum result; result = DirectFunctionCall3(pg_convert, string, @@ -606,9 +606,9 @@ pg_any_to_server(const char *s, int len, int encoding) if (s[i] == '\0' || IS_HIGHBIT_SET(s[i])) ereport(ERROR, (errcode(ERRCODE_CHARACTER_NOT_IN_REPERTOIRE), - errmsg("invalid byte value for encoding \"%s\": 0x%02x", - pg_enc2name_tbl[PG_SQL_ASCII].name, - (unsigned char) s[i]))); + errmsg("invalid byte value for encoding \"%s\": 0x%02x", + pg_enc2name_tbl[PG_SQL_ASCII].name, + (unsigned char) s[i]))); } } return (char *) s; @@ -707,8 +707,8 @@ perform_default_encoding_conversion(const char *src, int len, ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), errmsg("out of memory"), - errdetail("String of %d bytes is too long for encoding conversion.", - len))); + errdetail("String of %d bytes is too long for encoding conversion.", + len))); result = palloc(len * MAX_CONVERSION_GROWTH + 1); diff --git a/src/backend/utils/mb/wchar.c b/src/backend/utils/mb/wchar.c index b71b5e016a3..765815a1998 100644 --- a/src/backend/utils/mb/wchar.c +++ b/src/backend/utils/mb/wchar.c @@ -1785,8 +1785,8 @@ int pg_encoding_mblen(int encoding, const char *mbstr) { return (PG_VALID_ENCODING(encoding) ? - ((*pg_wchar_table[encoding].mblen) ((const unsigned char *) mbstr)) : - ((*pg_wchar_table[PG_SQL_ASCII].mblen) ((const unsigned char *) mbstr))); + ((*pg_wchar_table[encoding].mblen) ((const unsigned char *) mbstr)) : + ((*pg_wchar_table[PG_SQL_ASCII].mblen) ((const unsigned char *) mbstr))); } /* @@ -1796,8 +1796,8 @@ int pg_encoding_dsplen(int encoding, const char *mbstr) { return (PG_VALID_ENCODING(encoding) ? - ((*pg_wchar_table[encoding].dsplen) ((const unsigned char *) mbstr)) : - ((*pg_wchar_table[PG_SQL_ASCII].dsplen) ((const unsigned char *) mbstr))); + ((*pg_wchar_table[encoding].dsplen) ((const unsigned char *) mbstr)) : + ((*pg_wchar_table[PG_SQL_ASCII].dsplen) ((const unsigned char *) mbstr))); } /* diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index f96a556a5e2..82e54c084b8 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -972,7 +972,7 @@ static struct config_bool ConfigureNamesBool[] = {"fsync", PGC_SIGHUP, WAL_SETTINGS, gettext_noop("Forces synchronization of updates to disk."), gettext_noop("The server will use the fsync() system call in several places to make " - "sure that updates are physically written to disk. This insures " + "sure that updates are physically written to disk. This insures " "that a database cluster will recover to a consistent state after " "an operating system or hardware crash.") }, @@ -984,10 +984,10 @@ static struct config_bool ConfigureNamesBool[] = {"ignore_checksum_failure", PGC_SUSET, DEVELOPER_OPTIONS, gettext_noop("Continues processing after a checksum failure."), gettext_noop("Detection of a checksum failure normally causes PostgreSQL to " - "report an error, aborting the current transaction. Setting " + "report an error, aborting the current transaction. Setting " "ignore_checksum_failure to true causes the system to ignore the failure " - "(but still report a warning), and continue processing. This " - "behavior could cause crashes or other serious problems. Only " + "(but still report a warning), and continue processing. This " + "behavior could cause crashes or other serious problems. Only " "has an effect if checksums are enabled."), GUC_NOT_IN_SAMPLE }, @@ -999,7 +999,7 @@ static struct config_bool ConfigureNamesBool[] = {"zero_damaged_pages", PGC_SUSET, DEVELOPER_OPTIONS, gettext_noop("Continues processing past damaged page headers."), gettext_noop("Detection of a damaged page header normally causes PostgreSQL to " - "report an error, aborting the current transaction. Setting " + "report an error, aborting the current transaction. Setting " "zero_damaged_pages to true causes the system to instead report a " "warning, zero out the damaged page, and continue processing. This " "behavior will destroy data, namely all the rows on the damaged page."), @@ -1014,7 +1014,7 @@ static struct config_bool ConfigureNamesBool[] = gettext_noop("Writes full pages to WAL when first modified after a checkpoint."), gettext_noop("A page write in process during an operating system crash might be " "only partially written to disk. During recovery, the row changes " - "stored in WAL are not enough to recover. This option writes " + "stored in WAL are not enough to recover. This option writes " "pages when first modified after a checkpoint to WAL so full recovery " "is possible.") }, @@ -1330,8 +1330,8 @@ static struct config_bool ConfigureNamesBool[] = gettext_noop("Logs the host name in the connection logs."), gettext_noop("By default, connection logs only show the IP address " "of the connecting host. If you want them to show the host name you " - "can turn this on, but depending on your host name resolution " - "setup it might impose a non-negligible performance penalty.") + "can turn this on, but depending on your host name resolution " + "setup it might impose a non-negligible performance penalty.") }, &log_hostname, false, @@ -1341,9 +1341,9 @@ static struct config_bool ConfigureNamesBool[] = {"transform_null_equals", PGC_USERSET, COMPAT_OPTIONS_CLIENT, gettext_noop("Treats \"expr=NULL\" as \"expr IS NULL\"."), gettext_noop("When turned on, expressions of the form expr = NULL " - "(or NULL = expr) are treated as expr IS NULL, that is, they " - "return true if expr evaluates to the null value, and false " - "otherwise. The correct behavior of expr = NULL is to always " + "(or NULL = expr) are treated as expr IS NULL, that is, they " + "return true if expr evaluates to the null value, and false " + "otherwise. The correct behavior of expr = NULL is to always " "return null (unknown).") }, &Transform_null_equals, @@ -1608,7 +1608,7 @@ static struct config_bool ConfigureNamesBool[] = {"lo_compat_privileges", PGC_SUSET, COMPAT_OPTIONS_PREVIOUS, gettext_noop("Enables backward compatibility mode for privilege checks on large objects."), gettext_noop("Skips privilege checks when reading or modifying large objects, " - "for compatibility with PostgreSQL releases prior to 9.0.") + "for compatibility with PostgreSQL releases prior to 9.0.") }, &lo_compat_privileges, false, @@ -1700,7 +1700,7 @@ static struct config_int ConfigureNamesInt[] = {"default_statistics_target", PGC_USERSET, QUERY_TUNING_OTHER, gettext_noop("Sets the default statistics target."), gettext_noop("This applies to table columns that have not had a " - "column-specific target set via ALTER TABLE SET STATISTICS.") + "column-specific target set via ALTER TABLE SET STATISTICS.") }, &default_statistics_target, 100, 1, 10000, @@ -1711,7 +1711,7 @@ static struct config_int ConfigureNamesInt[] = gettext_noop("Sets the FROM-list size beyond which subqueries " "are not collapsed."), gettext_noop("The planner will merge subqueries into upper " - "queries if the resulting FROM list would have no more than " + "queries if the resulting FROM list would have no more than " "this many items.") }, &from_collapse_limit, @@ -2177,7 +2177,7 @@ static struct config_int ConfigureNamesInt[] = {"max_locks_per_transaction", PGC_POSTMASTER, LOCK_MANAGEMENT, gettext_noop("Sets the maximum number of locks per transaction."), gettext_noop("The shared lock table is sized on the assumption that " - "at most max_locks_per_transaction * max_connections distinct " + "at most max_locks_per_transaction * max_connections distinct " "objects will need to be locked at any one time.") }, &max_locks_per_xact, @@ -2212,7 +2212,7 @@ static struct config_int ConfigureNamesInt[] = {"max_pred_locks_per_page", PGC_SIGHUP, LOCK_MANAGEMENT, gettext_noop("Sets the maximum number of predicate-locked tuples per page."), gettext_noop("If more than this number of tuples on the same page are locked " - "by a connection, those locks are replaced by a page level lock.") + "by a connection, those locks are replaced by a page level lock.") }, &max_predicate_locks_per_page, 2, 0, INT_MAX, @@ -2290,7 +2290,7 @@ static struct config_int ConfigureNamesInt[] = gettext_noop("Enables warnings if checkpoint segments are filled more " "frequently than this."), gettext_noop("Write a message to the server log if checkpoints " - "caused by the filling of checkpoint segment files happens more " + "caused by the filling of checkpoint segment files happens more " "frequently than this number of seconds. Zero turns off the warning."), GUC_UNIT_S }, @@ -2403,7 +2403,7 @@ static struct config_int ConfigureNamesInt[] = {"extra_float_digits", PGC_USERSET, CLIENT_CONN_LOCALE, gettext_noop("Sets the number of digits displayed for floating-point values."), gettext_noop("This affects real, double precision, and geometric data types. " - "The parameter value is added to the standard number of digits " + "The parameter value is added to the standard number of digits " "(FLT_DIG or DBL_DIG as appropriate).") }, &extra_float_digits, @@ -2947,7 +2947,7 @@ static struct config_real ConfigureNamesReal[] = { {"parallel_tuple_cost", PGC_USERSET, QUERY_TUNING_COST, gettext_noop("Sets the planner's estimate of the cost of " - "passing each tuple (row) from worker to master backend."), + "passing each tuple (row) from worker to master backend."), NULL }, ¶llel_tuple_cost, @@ -3899,7 +3899,7 @@ static struct config_enum ConfigureNamesEnum[] = {"password_encryption", PGC_USERSET, CONN_AUTH_SECURITY, gettext_noop("Encrypt passwords."), gettext_noop("When a password is specified in CREATE USER or " - "ALTER USER without writing either ENCRYPTED or UNENCRYPTED, " + "ALTER USER without writing either ENCRYPTED or UNENCRYPTED, " "this parameter determines whether the password is to be encrypted.") }, &Password_encryption, @@ -5736,8 +5736,8 @@ parse_and_validate_value(struct config_generic *record, { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("parameter \"%s\" requires a Boolean value", - name))); + errmsg("parameter \"%s\" requires a Boolean value", + name))); return false; } @@ -5756,8 +5756,8 @@ parse_and_validate_value(struct config_generic *record, { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid value for parameter \"%s\": \"%s\"", - name, value), + errmsg("invalid value for parameter \"%s\": \"%s\"", + name, value), hintmsg ? errhint("%s", _(hintmsg)) : 0)); return false; } @@ -5785,8 +5785,8 @@ parse_and_validate_value(struct config_generic *record, { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("parameter \"%s\" requires a numeric value", - name))); + errmsg("parameter \"%s\" requires a numeric value", + name))); return false; } @@ -5849,8 +5849,8 @@ parse_and_validate_value(struct config_generic *record, ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid value for parameter \"%s\": \"%s\"", - name, value), + errmsg("invalid value for parameter \"%s\": \"%s\"", + name, value), hintmsg ? errhint("%s", _(hintmsg)) : 0)); if (hintmsg) @@ -5947,14 +5947,14 @@ set_config_option(const char *name, const char *value, if (IsInParallelMode() && changeVal && action != GUC_ACTION_SAVE) ereport(elevel, (errcode(ERRCODE_INVALID_TRANSACTION_STATE), - errmsg("cannot set parameters during a parallel operation"))); + errmsg("cannot set parameters during a parallel operation"))); record = find_option(name, true, elevel); if (record == NULL) { ereport(elevel, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("unrecognized configuration parameter \"%s\"", name))); + errmsg("unrecognized configuration parameter \"%s\"", name))); return 0; } @@ -6736,7 +6736,7 @@ GetConfigOption(const char *name, bool missing_ok, bool restrict_superuser) case PGC_ENUM: return config_enum_lookup_by_value((struct config_enum *) record, - *((struct config_enum *) record)->variable); + *((struct config_enum *) record)->variable); } return NULL; } @@ -6758,7 +6758,7 @@ GetConfigOptionResetString(const char *name) if (record == NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("unrecognized configuration parameter \"%s\"", name))); + errmsg("unrecognized configuration parameter \"%s\"", name))); if ((record->flags & GUC_SUPERUSER_ONLY) && !is_member_of_role(GetUserId(), DEFAULT_ROLE_READ_ALL_SETTINGS)) ereport(ERROR, @@ -6786,7 +6786,7 @@ GetConfigOptionResetString(const char *name) case PGC_ENUM: return config_enum_lookup_by_value((struct config_enum *) record, - ((struct config_enum *) record)->reset_val); + ((struct config_enum *) record)->reset_val); } return NULL; } @@ -7081,7 +7081,7 @@ AlterSystemSetConfigFile(AlterSystemStmt *altersysstmt) if (!superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - (errmsg("must be superuser to execute ALTER SYSTEM command")))); + (errmsg("must be superuser to execute ALTER SYSTEM command")))); /* * Extract statement arguments @@ -7293,7 +7293,7 @@ ExecSetVariableStmt(VariableSetStmt *stmt, bool isTopLevel) if (IsInParallelMode()) ereport(ERROR, (errcode(ERRCODE_INVALID_TRANSACTION_STATE), - errmsg("cannot set parameters during a parallel operation"))); + errmsg("cannot set parameters during a parallel operation"))); switch (stmt->kind) { @@ -7688,7 +7688,7 @@ reapply_stacked_values(struct config_generic *variable, case GUC_SET_LOCAL: /* first, apply the masked value as SET */ (void) set_config_option(name, stack->masked.val.stringval, - stack->masked_scontext, PGC_S_SESSION, + stack->masked_scontext, PGC_S_SESSION, GUC_ACTION_SET, true, WARNING, false); /* then apply the current value as LOCAL */ @@ -8048,7 +8048,7 @@ GetConfigOptionByName(const char *name, const char **varname, bool missing_ok) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("unrecognized configuration parameter \"%s\"", name))); + errmsg("unrecognized configuration parameter \"%s\"", name))); } if ((record->flags & GUC_SUPERUSER_ONLY) && @@ -8278,11 +8278,11 @@ GetConfigOptionByNum(int varnum, const char **values, bool *noshow) /* boot_val */ values[12] = pstrdup(config_enum_lookup_by_value(lconf, - lconf->boot_val)); + lconf->boot_val)); /* reset_val */ values[13] = pstrdup(config_enum_lookup_by_value(lconf, - lconf->reset_val)); + lconf->reset_val)); } break; @@ -9212,7 +9212,7 @@ serialize_variable(char **destptr, Size *maxbytes, struct config_enum *conf = (struct config_enum *) gconf; do_serialize(destptr, maxbytes, "%s", - config_enum_lookup_by_value(conf, *conf->variable)); + config_enum_lookup_by_value(conf, *conf->variable)); } break; } diff --git a/src/backend/utils/misc/help_config.c b/src/backend/utils/misc/help_config.c index 7bc8f92f6df..08d563d1ae6 100644 --- a/src/backend/utils/misc/help_config.c +++ b/src/backend/utils/misc/help_config.c @@ -124,7 +124,7 @@ printMixedStruct(mixedStruct *structToPrint) case PGC_ENUM: printf("ENUM\t%s\t\t\t", config_enum_lookup_by_value(&structToPrint->_enum, - structToPrint->_enum.boot_val)); + structToPrint->_enum.boot_val)); break; default: diff --git a/src/backend/utils/misc/pg_controldata.c b/src/backend/utils/misc/pg_controldata.c index 56ba301e5a1..0dbfe7f952d 100644 --- a/src/backend/utils/misc/pg_controldata.c +++ b/src/backend/utils/misc/pg_controldata.c @@ -167,8 +167,8 @@ pg_control_checkpoint(PG_FUNCTION_ARGS) nulls[6] = false; values[7] = CStringGetTextDatum(psprintf("%u:%u", - ControlFile->checkPointCopy.nextXidEpoch, - ControlFile->checkPointCopy.nextXid)); + ControlFile->checkPointCopy.nextXidEpoch, + ControlFile->checkPointCopy.nextXid)); nulls[7] = false; values[8] = ObjectIdGetDatum(ControlFile->checkPointCopy.nextOid); @@ -202,7 +202,7 @@ pg_control_checkpoint(PG_FUNCTION_ARGS) nulls[17] = false; values[18] = TimestampTzGetDatum( - time_t_to_timestamptz(ControlFile->checkPointCopy.time)); + time_t_to_timestamptz(ControlFile->checkPointCopy.time)); nulls[18] = false; htup = heap_form_tuple(tupdesc, values, nulls); diff --git a/src/backend/utils/misc/pg_rusage.c b/src/backend/utils/misc/pg_rusage.c index 98fa7ea9a8a..df643d798cb 100644 --- a/src/backend/utils/misc/pg_rusage.c +++ b/src/backend/utils/misc/pg_rusage.c @@ -63,9 +63,9 @@ pg_rusage_show(const PGRUsage *ru0) snprintf(result, sizeof(result), _("CPU: user: %d.%02d s, system: %d.%02d s, elapsed: %d.%02d s"), (int) (ru1.ru.ru_utime.tv_sec - ru0->ru.ru_utime.tv_sec), - (int) (ru1.ru.ru_utime.tv_usec - ru0->ru.ru_utime.tv_usec) / 10000, + (int) (ru1.ru.ru_utime.tv_usec - ru0->ru.ru_utime.tv_usec) / 10000, (int) (ru1.ru.ru_stime.tv_sec - ru0->ru.ru_stime.tv_sec), - (int) (ru1.ru.ru_stime.tv_usec - ru0->ru.ru_stime.tv_usec) / 10000, + (int) (ru1.ru.ru_stime.tv_usec - ru0->ru.ru_stime.tv_usec) / 10000, (int) (ru1.tv.tv_sec - ru0->tv.tv_sec), (int) (ru1.tv.tv_usec - ru0->tv.tv_usec) / 10000); diff --git a/src/backend/utils/mmgr/aset.c b/src/backend/utils/mmgr/aset.c index 51668d88fec..7033042e2d8 100644 --- a/src/backend/utils/mmgr/aset.c +++ b/src/backend/utils/mmgr/aset.c @@ -1181,7 +1181,7 @@ AllocSetStats(MemoryContext context, int level, bool print, for (i = 0; i < level; i++) fprintf(stderr, " "); fprintf(stderr, - "%s: %zu total in %zd blocks; %zu free (%zd chunks); %zu used\n", + "%s: %zu total in %zd blocks; %zu free (%zd chunks); %zu used\n", set->header.name, totalspace, nblocks, freespace, freechunks, totalspace - freespace); } diff --git a/src/backend/utils/mmgr/dsa.c b/src/backend/utils/mmgr/dsa.c index 7852fde300d..b3327f676b1 100644 --- a/src/backend/utils/mmgr/dsa.c +++ b/src/backend/utils/mmgr/dsa.c @@ -1080,7 +1080,7 @@ dsa_dump(dsa_area *area) dsa_segment_index segment_index; fprintf(stderr, - " segment bin %zu (at least %d contiguous pages free):\n", + " segment bin %zu (at least %d contiguous pages free):\n", i, 1 << (i - 1)); segment_index = area->control->segment_bins[i]; while (segment_index != DSA_SEGMENT_INDEX_NONE) @@ -1120,7 +1120,7 @@ dsa_dump(dsa_area *area) fprintf(stderr, " pool for large object spans:\n"); else fprintf(stderr, - " pool for size class %zu (object size %hu bytes):\n", + " pool for size class %zu (object size %hu bytes):\n", i, dsa_size_classes[i]); for (j = 0; j < DSA_FULLNESS_CLASSES; ++j) { @@ -1734,7 +1734,7 @@ get_segment_by_index(dsa_area *area, dsa_segment_index index) /* It's an error to try to access an unused slot. */ if (handle == DSM_HANDLE_INVALID) elog(ERROR, - "dsa_area could not attach to a segment that has been freed"); + "dsa_area could not attach to a segment that has been freed"); segment = dsm_attach(handle); if (segment == NULL) diff --git a/src/backend/utils/mmgr/freepage.c b/src/backend/utils/mmgr/freepage.c index 2cd758178c0..7566a669708 100644 --- a/src/backend/utils/mmgr/freepage.c +++ b/src/backend/utils/mmgr/freepage.c @@ -135,7 +135,7 @@ static FreePageBtree *FreePageBtreeFindRightSibling(char *base, static Size FreePageBtreeFirstKey(FreePageBtree *btp); static FreePageBtree *FreePageBtreeGetRecycled(FreePageManager *fpm); static void FreePageBtreeInsertInternal(char *base, FreePageBtree *btp, - Size index, Size first_page, FreePageBtree *child); + Size index, Size first_page, FreePageBtree *child); static void FreePageBtreeInsertLeaf(FreePageBtree *btp, Size index, Size first_page, Size npages); static void FreePageBtreeRecycle(FreePageManager *fpm, Size pageno); @@ -1269,7 +1269,7 @@ FreePageManagerDumpBtree(FreePageManager *fpm, FreePageBtree *btp, if (btp->hdr.magic == FREE_PAGE_INTERNAL_MAGIC) appendStringInfo(buf, " %zu->%zu", btp->u.internal_key[index].first_page, - btp->u.internal_key[index].child.relptr_off / FPM_PAGE_SIZE); + btp->u.internal_key[index].child.relptr_off / FPM_PAGE_SIZE); else appendStringInfo(buf, " %zu(%zu)", btp->u.leaf_key[index].first_page, @@ -1359,7 +1359,7 @@ FreePageManagerGetInternal(FreePageManager *fpm, Size npages, Size *first_page) do { if (candidate->npages >= npages && (victim == NULL || - victim->npages > candidate->npages)) + victim->npages > candidate->npages)) { victim = candidate; if (victim->npages == npages) diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c index 6668bf135e9..5d173d7e60b 100644 --- a/src/backend/utils/mmgr/mcxt.c +++ b/src/backend/utils/mmgr/mcxt.c @@ -456,7 +456,7 @@ MemoryContextStatsDetail(MemoryContext context, int max_children) MemoryContextStatsInternal(context, 0, true, max_children, &grand_totals); fprintf(stderr, - "Grand total: %zu bytes in %zd blocks; %zu free (%zd chunks); %zu used\n", + "Grand total: %zu bytes in %zd blocks; %zu free (%zd chunks); %zu used\n", grand_totals.totalspace, grand_totals.nblocks, grand_totals.freespace, grand_totals.freechunks, grand_totals.totalspace - grand_totals.freespace); diff --git a/src/backend/utils/sort/logtape.c b/src/backend/utils/sort/logtape.c index e1628f73795..5ebb6fb11ab 100644 --- a/src/backend/utils/sort/logtape.c +++ b/src/backend/utils/sort/logtape.c @@ -357,7 +357,7 @@ ltsReleaseBlock(LogicalTapeSet *lts, long blocknum) { lts->freeBlocksLen *= 2; lts->freeBlocks = (long *) repalloc(lts->freeBlocks, - lts->freeBlocksLen * sizeof(long)); + lts->freeBlocksLen * sizeof(long)); } /* diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 5614d970bd6..a8a115c6b09 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -726,7 +726,7 @@ tuplesort_begin_common(int workMem, bool randomAccess) * see comments in grow_memtuples(). */ state->memtupsize = Max(1024, - ALLOCSET_SEPARATE_THRESHOLD / sizeof(SortTuple) + 1); + ALLOCSET_SEPARATE_THRESHOLD / sizeof(SortTuple) + 1); state->growmemtuples = true; state->slabAllocatorUsed = false; @@ -1989,7 +1989,7 @@ tuplesort_gettuple_common(Tuplesortstate *state, bool forward, */ nmoved = LogicalTapeBackspace(state->tapeset, state->result_tape, - tuplen + 2 * sizeof(unsigned int)); + tuplen + 2 * sizeof(unsigned int)); if (nmoved == tuplen + sizeof(unsigned int)) { /* @@ -3971,7 +3971,7 @@ copytup_cluster(Tuplesortstate *state, SortTuple *stup, void *tup) tuple = (HeapTuple) mtup->tuple; mtup->datum1 = heap_getattr(tuple, - state->indexInfo->ii_KeyAttrNumbers[0], + state->indexInfo->ii_KeyAttrNumbers[0], state->tupDesc, &mtup->isnull1); } @@ -4143,7 +4143,7 @@ comparetup_index_btree(const SortTuple *a, const SortTuple *b, key_desc ? errdetail("Key %s is duplicated.", key_desc) : errdetail("Duplicate keys exist."), errtableconstraint(state->heapRel, - RelationGetRelationName(state->indexRel)))); + RelationGetRelationName(state->indexRel)))); } /* @@ -4348,7 +4348,7 @@ comparetup_datum(const SortTuple *a, const SortTuple *b, Tuplesortstate *state) if (state->sortKeys->abbrev_converter) compare = ApplySortAbbrevFullComparator(PointerGetDatum(a->tuple), a->isnull1, - PointerGetDatum(b->tuple), b->isnull1, + PointerGetDatum(b->tuple), b->isnull1, state->sortKeys); return compare; diff --git a/src/backend/utils/sort/tuplestore.c b/src/backend/utils/sort/tuplestore.c index b3f6be74573..98c006b663e 100644 --- a/src/backend/utils/sort/tuplestore.c +++ b/src/backend/utils/sort/tuplestore.c @@ -866,7 +866,7 @@ tuplestore_puttuple_common(Tuplestorestate *state, void *tuple) SEEK_SET) != 0) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not seek in tuplestore temporary file: %m"))); + errmsg("could not seek in tuplestore temporary file: %m"))); state->status = TSS_WRITEFILE; /* @@ -1051,7 +1051,7 @@ tuplestore_gettuple(Tuplestorestate *state, bool forward, SEEK_CUR) != 0) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not seek in tuplestore temporary file: %m"))); + errmsg("could not seek in tuplestore temporary file: %m"))); tup = READTUP(state, tuplen); return tup; @@ -1253,7 +1253,7 @@ tuplestore_rescan(Tuplestorestate *state) if (BufFileSeek(state->myfile, 0, 0L, SEEK_SET) != 0) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not seek in tuplestore temporary file: %m"))); + errmsg("could not seek in tuplestore temporary file: %m"))); break; default: elog(ERROR, "invalid tuplestore state"); @@ -1474,7 +1474,7 @@ getlen(Tuplestorestate *state, bool eofOK) if (nbytes != 0 || !eofOK) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not read from tuplestore temporary file: %m"))); + errmsg("could not read from tuplestore temporary file: %m"))); return 0; } @@ -1526,7 +1526,7 @@ writetup_heap(Tuplestorestate *state, void *tup) sizeof(tuplen)) != sizeof(tuplen)) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not write to tuplestore temporary file: %m"))); + errmsg("could not write to tuplestore temporary file: %m"))); FREEMEM(state, GetMemoryChunkSpace(tuple)); heap_free_minimal_tuple(tuple); @@ -1547,12 +1547,12 @@ readtup_heap(Tuplestorestate *state, unsigned int len) tupbodylen) != (size_t) tupbodylen) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not read from tuplestore temporary file: %m"))); + errmsg("could not read from tuplestore temporary file: %m"))); if (state->backward) /* need trailing length word? */ if (BufFileRead(state->myfile, (void *) &tuplen, sizeof(tuplen)) != sizeof(tuplen)) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not read from tuplestore temporary file: %m"))); + errmsg("could not read from tuplestore temporary file: %m"))); return (void *) tuple; } diff --git a/src/backend/utils/time/combocid.c b/src/backend/utils/time/combocid.c index baff998641a..c7e4331efbd 100644 --- a/src/backend/utils/time/combocid.c +++ b/src/backend/utils/time/combocid.c @@ -129,7 +129,7 @@ HeapTupleHeaderGetCmax(HeapTupleHeader tup) * things too much. */ Assert(CritSectionCount > 0 || - TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetUpdateXid(tup))); + TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetUpdateXid(tup))); if (tup->t_infomask & HEAP_COMBOCID) return GetRealCmax(cid); diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c index 362f5896251..6369be78a31 100644 --- a/src/backend/utils/time/snapmgr.c +++ b/src/backend/utils/time/snapmgr.c @@ -416,7 +416,7 @@ GetOldestSnapshot(void) if (!pairingheap_is_empty(&RegisteredSnapshots)) { OldestRegisteredSnapshot = pairingheap_container(SnapshotData, ph_node, - pairingheap_first(&RegisteredSnapshots)); + pairingheap_first(&RegisteredSnapshots)); RegisteredLSN = OldestRegisteredSnapshot->lsn; } @@ -619,14 +619,14 @@ SetTransactionSnapshot(Snapshot sourcesnap, VirtualTransactionId *sourcevxid, ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("could not import the requested snapshot"), - errdetail("The source transaction is not running anymore."))); + errdetail("The source transaction is not running anymore."))); } else if (!ProcArrayInstallImportedXmin(CurrentSnapshot->xmin, sourcevxid)) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("could not import the requested snapshot"), - errdetail("The source process with pid %d is not running anymore.", - sourcepid))); + errdetail("The source process with pid %d is not running anymore.", + sourcepid))); /* * In transaction-snapshot mode, the first snapshot must live until end of @@ -989,7 +989,7 @@ SnapshotResetXmin(void) } minSnapshot = pairingheap_container(SnapshotData, ph_node, - pairingheap_first(&RegisteredSnapshots)); + pairingheap_first(&RegisteredSnapshots)); if (TransactionIdPrecedes(MyPgXact->xmin, minSnapshot->xmin)) MyPgXact->xmin = minSnapshot->xmin; @@ -1211,7 +1211,7 @@ ExportSnapshot(Snapshot snapshot) * inside the transaction from 1. */ snprintf(path, sizeof(path), SNAPSHOT_EXPORT_DIR "/%08X-%08X-%d", - MyProc->backendId, MyProc->lxid, list_length(exportedSnapshots) + 1); + MyProc->backendId, MyProc->lxid, list_length(exportedSnapshots) + 1); /* * Copy the snapshot into TopTransactionContext, add it to the @@ -1453,7 +1453,7 @@ ImportSnapshot(const char *idstr) IsSubTransaction()) ereport(ERROR, (errcode(ERRCODE_ACTIVE_SQL_TRANSACTION), - errmsg("SET TRANSACTION SNAPSHOT must be called before any query"))); + errmsg("SET TRANSACTION SNAPSHOT must be called before any query"))); /* * If we are in read committed mode then the next query would execute with @@ -1589,7 +1589,7 @@ ImportSnapshot(const char *idstr) if (src_dbid != MyDatabaseId) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot import a snapshot from a different database"))); + errmsg("cannot import a snapshot from a different database"))); /* OK, install the snapshot */ SetTransactionSnapshot(&snapshot, &src_vxid, src_pid, NULL); @@ -1884,7 +1884,7 @@ MaintainOldSnapshotTimeMapping(TimestampTz whenTaken, TransactionId xmin) if (whenTaken < 0) { elog(DEBUG1, - "MaintainOldSnapshotTimeMapping called with negative whenTaken = %ld", + "MaintainOldSnapshotTimeMapping called with negative whenTaken = %ld", (long) whenTaken); return; } |