diff options
Diffstat (limited to 'contrib')
76 files changed, 318 insertions, 318 deletions
diff --git a/contrib/adminpack/adminpack.c b/contrib/adminpack/adminpack.c index 10338f951ff..f3f8e7f1e41 100644 --- a/contrib/adminpack/adminpack.c +++ b/contrib/adminpack/adminpack.c @@ -74,7 +74,7 @@ convert_and_check_filename(text *arg, bool logAllowed) 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 @@ -105,7 +105,7 @@ requireSuperuser(void) if (!superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - (errmsg("only superuser may access generic file functions")))); + (errmsg("only superuser may access generic file functions")))); } diff --git a/contrib/amcheck/verify_nbtree.c b/contrib/amcheck/verify_nbtree.c index c134e5f3b0a..9ae83dc8399 100644 --- a/contrib/amcheck/verify_nbtree.c +++ b/contrib/amcheck/verify_nbtree.c @@ -240,8 +240,8 @@ btree_index_checkable(Relation rel) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("cannot access temporary tables of other sessions"), - errdetail("Index \"%s\" is associated with temporary relation.", - RelationGetRelationName(rel)))); + errdetail("Index \"%s\" is associated with temporary relation.", + RelationGetRelationName(rel)))); if (!IndexIsValid(rel->rd_index)) ereport(ERROR, @@ -411,12 +411,12 @@ bt_check_level_from_leftmost(BtreeCheckState *state, BtreeLevel level) ereport(ERROR, (errcode(ERRCODE_INDEX_CORRUPTED), errmsg("block %u fell off the end of index \"%s\"", - current, RelationGetRelationName(state->rel)))); + current, RelationGetRelationName(state->rel)))); else ereport(DEBUG1, (errcode(ERRCODE_NO_DATA), errmsg("block %u of index \"%s\" ignored", - current, RelationGetRelationName(state->rel)))); + current, RelationGetRelationName(state->rel)))); goto nextpage; } else if (nextleveldown.leftmost == InvalidBlockNumber) @@ -433,14 +433,14 @@ bt_check_level_from_leftmost(BtreeCheckState *state, BtreeLevel level) if (!P_LEFTMOST(opaque)) ereport(ERROR, (errcode(ERRCODE_INDEX_CORRUPTED), - errmsg("block %u is not leftmost in index \"%s\"", - current, RelationGetRelationName(state->rel)))); + errmsg("block %u is not leftmost in index \"%s\"", + current, RelationGetRelationName(state->rel)))); if (level.istruerootlevel && !P_ISROOT(opaque)) ereport(ERROR, (errcode(ERRCODE_INDEX_CORRUPTED), - errmsg("block %u is not true root in index \"%s\"", - current, RelationGetRelationName(state->rel)))); + errmsg("block %u is not true root in index \"%s\"", + current, RelationGetRelationName(state->rel)))); } /* @@ -488,7 +488,7 @@ bt_check_level_from_leftmost(BtreeCheckState *state, BtreeLevel level) errmsg("left link/right link pair in index \"%s\" not in agreement", RelationGetRelationName(state->rel)), errdetail_internal("Block=%u left block=%u left link from block=%u.", - current, leftcurrent, opaque->btpo_prev))); + current, leftcurrent, opaque->btpo_prev))); /* Check level, which must be valid for non-ignorable page */ if (level.level != opaque->btpo.level) @@ -497,7 +497,7 @@ bt_check_level_from_leftmost(BtreeCheckState *state, BtreeLevel level) errmsg("leftmost down link for level points to block in index \"%s\" whose level is not one level down", RelationGetRelationName(state->rel)), errdetail_internal("Block pointed to=%u expected level=%u level in pointed to block=%u.", - current, level.level, opaque->btpo.level))); + current, level.level, opaque->btpo.level))); /* Verify invariants for page -- all important checks occur here */ bt_target_page_check(state); @@ -508,8 +508,8 @@ nextpage: if (current == leftcurrent || current == opaque->btpo_prev) ereport(ERROR, (errcode(ERRCODE_INDEX_CORRUPTED), - errmsg("circular link chain found in block %u of index \"%s\"", - current, RelationGetRelationName(state->rel)))); + errmsg("circular link chain found in block %u of index \"%s\"", + current, RelationGetRelationName(state->rel)))); leftcurrent = current; current = opaque->btpo_next; @@ -665,17 +665,17 @@ bt_target_page_check(BtreeCheckState *state) (errcode(ERRCODE_INDEX_CORRUPTED), errmsg("item order invariant violated for index \"%s\"", RelationGetRelationName(state->rel)), - errdetail_internal("Lower index tid=%s (points to %s tid=%s) " - "higher index tid=%s (points to %s tid=%s) " - "page lsn=%X/%X.", - itid, - P_ISLEAF(topaque) ? "heap" : "index", - htid, - nitid, - P_ISLEAF(topaque) ? "heap" : "index", - nhtid, - (uint32) (state->targetlsn >> 32), - (uint32) state->targetlsn))); + errdetail_internal("Lower index tid=%s (points to %s tid=%s) " + "higher index tid=%s (points to %s tid=%s) " + "page lsn=%X/%X.", + itid, + P_ISLEAF(topaque) ? "heap" : "index", + htid, + nitid, + P_ISLEAF(topaque) ? "heap" : "index", + nhtid, + (uint32) (state->targetlsn >> 32), + (uint32) state->targetlsn))); } /* @@ -824,7 +824,7 @@ bt_right_page_check_scankey(BtreeCheckState *state) ereport(DEBUG1, (errcode(ERRCODE_NO_DATA), errmsg("level %u leftmost page of index \"%s\" was found deleted or half dead", - opaque->btpo.level, RelationGetRelationName(state->rel)), + opaque->btpo.level, RelationGetRelationName(state->rel)), errdetail_internal("Deleted page found when building scankey from right sibling."))); /* Be slightly more pro-active in freeing this memory, just in case */ @@ -1053,7 +1053,7 @@ bt_downlink_check(BtreeCheckState *state, BlockNumber childblock, errmsg("down-link lower bound invariant violated for index \"%s\"", RelationGetRelationName(state->rel)), errdetail_internal("Parent block=%u child index tid=(%u,%u) parent page lsn=%X/%X.", - state->targetblock, childblock, offset, + state->targetblock, childblock, offset, (uint32) (state->targetlsn >> 32), (uint32) state->targetlsn))); } @@ -1228,21 +1228,21 @@ palloc_btree_page(BtreeCheckState *state, BlockNumber blocknum) if (P_ISLEAF(opaque) && !P_ISDELETED(opaque) && opaque->btpo.level != 0) ereport(ERROR, (errcode(ERRCODE_INDEX_CORRUPTED), - errmsg("invalid leaf page level %u for block %u in index \"%s\"", - opaque->btpo.level, blocknum, RelationGetRelationName(state->rel)))); + errmsg("invalid leaf page level %u for block %u in index \"%s\"", + opaque->btpo.level, blocknum, RelationGetRelationName(state->rel)))); if (blocknum != BTREE_METAPAGE && !P_ISLEAF(opaque) && !P_ISDELETED(opaque) && opaque->btpo.level == 0) ereport(ERROR, (errcode(ERRCODE_INDEX_CORRUPTED), - errmsg("invalid internal page level 0 for block %u in index \"%s\"", - opaque->btpo.level, RelationGetRelationName(state->rel)))); + errmsg("invalid internal page level 0 for block %u in index \"%s\"", + opaque->btpo.level, RelationGetRelationName(state->rel)))); if (!P_ISLEAF(opaque) && P_HAS_GARBAGE(opaque)) ereport(ERROR, (errcode(ERRCODE_INDEX_CORRUPTED), - errmsg("internal page block %u in index \"%s\" has garbage items", - blocknum, RelationGetRelationName(state->rel)))); + errmsg("internal page block %u in index \"%s\" has garbage items", + blocknum, RelationGetRelationName(state->rel)))); return page; } diff --git a/contrib/auth_delay/auth_delay.c b/contrib/auth_delay/auth_delay.c index e0604fb8089..cd12a86b990 100644 --- a/contrib/auth_delay/auth_delay.c +++ b/contrib/auth_delay/auth_delay.c @@ -57,7 +57,7 @@ _PG_init(void) { /* Define custom GUC variables */ DefineCustomIntVariable("auth_delay.milliseconds", - "Milliseconds to delay before reporting authentication failure", + "Milliseconds to delay before reporting authentication failure", NULL, &auth_delay_milliseconds, 0, diff --git a/contrib/auto_explain/auto_explain.c b/contrib/auto_explain/auto_explain.c index 9213ffb6a44..edcb91542a3 100644 --- a/contrib/auto_explain/auto_explain.c +++ b/contrib/auto_explain/auto_explain.c @@ -74,8 +74,8 @@ _PG_init(void) { /* Define custom GUC variables. */ DefineCustomIntVariable("auto_explain.log_min_duration", - "Sets the minimum execution time above which plans will be logged.", - "Zero prints all plans. -1 turns this feature off.", + "Sets the minimum execution time above which plans will be logged.", + "Zero prints all plans. -1 turns this feature off.", &auto_explain_log_min_duration, -1, -1, INT_MAX / 1000, @@ -120,7 +120,7 @@ _PG_init(void) DefineCustomBoolVariable("auto_explain.log_triggers", "Include trigger statistics in plans.", - "This has no effect unless log_analyze is also set.", + "This has no effect unless log_analyze is also set.", &auto_explain_log_triggers, false, PGC_SUSET, diff --git a/contrib/bloom/bloom.h b/contrib/bloom/bloom.h index 6d1b3f12a3b..f3df1af7811 100644 --- a/contrib/bloom/bloom.h +++ b/contrib/bloom/bloom.h @@ -111,8 +111,8 @@ typedef struct BloomOptions */ typedef BlockNumber FreeBlockNumberArray[ MAXALIGN_DOWN( - BLCKSZ - SizeOfPageHeaderData - MAXALIGN(sizeof(BloomPageOpaqueData)) - - MAXALIGN(sizeof(uint16) * 2 + sizeof(uint32) + sizeof(BloomOptions)) + BLCKSZ - SizeOfPageHeaderData - MAXALIGN(sizeof(BloomPageOpaqueData)) + - MAXALIGN(sizeof(uint16) * 2 + sizeof(uint32) + sizeof(BloomOptions)) ) / sizeof(BlockNumber) ]; diff --git a/contrib/bloom/blvacuum.c b/contrib/bloom/blvacuum.c index 04abd0f6b6c..2e060871b6a 100644 --- a/contrib/bloom/blvacuum.c +++ b/contrib/bloom/blvacuum.c @@ -84,7 +84,7 @@ blbulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats, */ itup = itupPtr = BloomPageGetTuple(&state, page, FirstOffsetNumber); itupEnd = BloomPageGetTuple(&state, page, - OffsetNumberNext(BloomPageGetMaxOffset(page))); + OffsetNumberNext(BloomPageGetMaxOffset(page))); while (itup < itupEnd) { /* Do we have to delete this tuple? */ @@ -108,7 +108,7 @@ blbulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats, /* Assert that we counted correctly */ Assert(itupPtr == BloomPageGetTuple(&state, page, - OffsetNumberNext(BloomPageGetMaxOffset(page)))); + OffsetNumberNext(BloomPageGetMaxOffset(page)))); /* * Add page to new notFullPage list if we will not mark page as diff --git a/contrib/btree_gin/btree_gin.c b/contrib/btree_gin/btree_gin.c index 6f0c752b2e8..2473f79ca19 100644 --- a/contrib/btree_gin/btree_gin.c +++ b/contrib/btree_gin/btree_gin.c @@ -115,8 +115,8 @@ gin_btree_compare_prefix(FunctionCallInfo fcinfo) data->typecmp, fcinfo->flinfo, PG_GET_COLLATION(), - (data->strategy == BTLessStrategyNumber || - data->strategy == BTLessEqualStrategyNumber) + (data->strategy == BTLessStrategyNumber || + data->strategy == BTLessEqualStrategyNumber) ? data->datum : a, b)); diff --git a/contrib/btree_gist/btree_cash.c b/contrib/btree_gist/btree_cash.c index 1116ca084f3..81131af4dc8 100644 --- a/contrib/btree_gist/btree_cash.c +++ b/contrib/btree_gist/btree_cash.c @@ -203,8 +203,8 @@ Datum gbt_cash_picksplit(PG_FUNCTION_ARGS) { PG_RETURN_POINTER(gbt_num_picksplit( - (GistEntryVector *) PG_GETARG_POINTER(0), - (GIST_SPLITVEC *) PG_GETARG_POINTER(1), + (GistEntryVector *) PG_GETARG_POINTER(0), + (GIST_SPLITVEC *) PG_GETARG_POINTER(1), &tinfo, fcinfo->flinfo )); } diff --git a/contrib/btree_gist/btree_date.c b/contrib/btree_gist/btree_date.c index 28c7c2ac861..992ce575073 100644 --- a/contrib/btree_gist/btree_date.c +++ b/contrib/btree_gist/btree_date.c @@ -87,8 +87,8 @@ gdb_date_dist(const void *a, const void *b, FmgrInfo *flinfo) { /* we assume the difference can't overflow */ Datum diff = DirectFunctionCall2(date_mi, - DateADTGetDatum(*((const DateADT *) a)), - DateADTGetDatum(*((const DateADT *) b))); + DateADTGetDatum(*((const DateADT *) a)), + DateADTGetDatum(*((const DateADT *) b))); return (float8) Abs(DatumGetInt32(diff)); } @@ -210,14 +210,14 @@ gbt_date_penalty(PG_FUNCTION_ARGS) diff = DatumGetInt32(DirectFunctionCall2( date_mi, DateADTGetDatum(newentry->upper), - DateADTGetDatum(origentry->upper))); + DateADTGetDatum(origentry->upper))); res = Max(diff, 0); diff = DatumGetInt32(DirectFunctionCall2( date_mi, - DateADTGetDatum(origentry->lower), - DateADTGetDatum(newentry->lower))); + DateADTGetDatum(origentry->lower), + DateADTGetDatum(newentry->lower))); res += Max(diff, 0); @@ -227,8 +227,8 @@ gbt_date_penalty(PG_FUNCTION_ARGS) { diff = DatumGetInt32(DirectFunctionCall2( date_mi, - DateADTGetDatum(origentry->upper), - DateADTGetDatum(origentry->lower))); + DateADTGetDatum(origentry->upper), + DateADTGetDatum(origentry->lower))); *result += FLT_MIN; *result += (float) (res / ((double) (res + diff))); *result *= (FLT_MAX / (((GISTENTRY *) PG_GETARG_POINTER(0))->rel->rd_att->natts + 1)); @@ -242,8 +242,8 @@ Datum gbt_date_picksplit(PG_FUNCTION_ARGS) { PG_RETURN_POINTER(gbt_num_picksplit( - (GistEntryVector *) PG_GETARG_POINTER(0), - (GIST_SPLITVEC *) PG_GETARG_POINTER(1), + (GistEntryVector *) PG_GETARG_POINTER(0), + (GIST_SPLITVEC *) PG_GETARG_POINTER(1), &tinfo, fcinfo->flinfo )); } diff --git a/contrib/btree_gist/btree_enum.c b/contrib/btree_gist/btree_enum.c index 8bbadfe860c..0ec7d8bf884 100644 --- a/contrib/btree_gist/btree_enum.c +++ b/contrib/btree_gist/btree_enum.c @@ -169,8 +169,8 @@ Datum gbt_enum_picksplit(PG_FUNCTION_ARGS) { PG_RETURN_POINTER(gbt_num_picksplit( - (GistEntryVector *) PG_GETARG_POINTER(0), - (GIST_SPLITVEC *) PG_GETARG_POINTER(1), + (GistEntryVector *) PG_GETARG_POINTER(0), + (GIST_SPLITVEC *) PG_GETARG_POINTER(1), &tinfo, fcinfo->flinfo )); } diff --git a/contrib/btree_gist/btree_float4.c b/contrib/btree_gist/btree_float4.c index fe6993c226c..6b20f44a48f 100644 --- a/contrib/btree_gist/btree_float4.c +++ b/contrib/btree_gist/btree_float4.c @@ -196,8 +196,8 @@ Datum gbt_float4_picksplit(PG_FUNCTION_ARGS) { PG_RETURN_POINTER(gbt_num_picksplit( - (GistEntryVector *) PG_GETARG_POINTER(0), - (GIST_SPLITVEC *) PG_GETARG_POINTER(1), + (GistEntryVector *) PG_GETARG_POINTER(0), + (GIST_SPLITVEC *) PG_GETARG_POINTER(1), &tinfo, fcinfo->flinfo )); } diff --git a/contrib/btree_gist/btree_float8.c b/contrib/btree_gist/btree_float8.c index 13153d811fd..ee114cbe427 100644 --- a/contrib/btree_gist/btree_float8.c +++ b/contrib/btree_gist/btree_float8.c @@ -203,8 +203,8 @@ Datum gbt_float8_picksplit(PG_FUNCTION_ARGS) { PG_RETURN_POINTER(gbt_num_picksplit( - (GistEntryVector *) PG_GETARG_POINTER(0), - (GIST_SPLITVEC *) PG_GETARG_POINTER(1), + (GistEntryVector *) PG_GETARG_POINTER(0), + (GIST_SPLITVEC *) PG_GETARG_POINTER(1), &tinfo, fcinfo->flinfo )); } diff --git a/contrib/btree_gist/btree_inet.c b/contrib/btree_gist/btree_inet.c index e1561b37b73..b5b593f77fa 100644 --- a/contrib/btree_gist/btree_inet.c +++ b/contrib/btree_gist/btree_inet.c @@ -133,7 +133,7 @@ gbt_inet_consistent(PG_FUNCTION_ARGS) key.upper = (GBT_NUMKEY *) &kkk->upper; PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, - &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)); + &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)); } @@ -165,8 +165,8 @@ Datum gbt_inet_picksplit(PG_FUNCTION_ARGS) { PG_RETURN_POINTER(gbt_num_picksplit( - (GistEntryVector *) PG_GETARG_POINTER(0), - (GIST_SPLITVEC *) PG_GETARG_POINTER(1), + (GistEntryVector *) PG_GETARG_POINTER(0), + (GIST_SPLITVEC *) PG_GETARG_POINTER(1), &tinfo, fcinfo->flinfo )); } diff --git a/contrib/btree_gist/btree_int2.c b/contrib/btree_gist/btree_int2.c index 0a4498a693a..f343b8615f6 100644 --- a/contrib/btree_gist/btree_int2.c +++ b/contrib/btree_gist/btree_int2.c @@ -202,8 +202,8 @@ Datum gbt_int2_picksplit(PG_FUNCTION_ARGS) { PG_RETURN_POINTER(gbt_num_picksplit( - (GistEntryVector *) PG_GETARG_POINTER(0), - (GIST_SPLITVEC *) PG_GETARG_POINTER(1), + (GistEntryVector *) PG_GETARG_POINTER(0), + (GIST_SPLITVEC *) PG_GETARG_POINTER(1), &tinfo, fcinfo->flinfo )); } diff --git a/contrib/btree_gist/btree_int4.c b/contrib/btree_gist/btree_int4.c index b29cbc81a3e..35bb4424379 100644 --- a/contrib/btree_gist/btree_int4.c +++ b/contrib/btree_gist/btree_int4.c @@ -203,8 +203,8 @@ Datum gbt_int4_picksplit(PG_FUNCTION_ARGS) { PG_RETURN_POINTER(gbt_num_picksplit( - (GistEntryVector *) PG_GETARG_POINTER(0), - (GIST_SPLITVEC *) PG_GETARG_POINTER(1), + (GistEntryVector *) PG_GETARG_POINTER(0), + (GIST_SPLITVEC *) PG_GETARG_POINTER(1), &tinfo, fcinfo->flinfo )); } diff --git a/contrib/btree_gist/btree_int8.c b/contrib/btree_gist/btree_int8.c index df1f5338c84..91f2d032d10 100644 --- a/contrib/btree_gist/btree_int8.c +++ b/contrib/btree_gist/btree_int8.c @@ -203,8 +203,8 @@ Datum gbt_int8_picksplit(PG_FUNCTION_ARGS) { PG_RETURN_POINTER(gbt_num_picksplit( - (GistEntryVector *) PG_GETARG_POINTER(0), - (GIST_SPLITVEC *) PG_GETARG_POINTER(1), + (GistEntryVector *) PG_GETARG_POINTER(0), + (GIST_SPLITVEC *) PG_GETARG_POINTER(1), &tinfo, fcinfo->flinfo )); } diff --git a/contrib/btree_gist/btree_interval.c b/contrib/btree_gist/btree_interval.c index e4dd9e4238a..61ab478c420 100644 --- a/contrib/btree_gist/btree_interval.c +++ b/contrib/btree_gist/btree_interval.c @@ -285,8 +285,8 @@ Datum gbt_intv_picksplit(PG_FUNCTION_ARGS) { PG_RETURN_POINTER(gbt_num_picksplit( - (GistEntryVector *) PG_GETARG_POINTER(0), - (GIST_SPLITVEC *) PG_GETARG_POINTER(1), + (GistEntryVector *) PG_GETARG_POINTER(0), + (GIST_SPLITVEC *) PG_GETARG_POINTER(1), &tinfo, fcinfo->flinfo )); } diff --git a/contrib/btree_gist/btree_macaddr.c b/contrib/btree_gist/btree_macaddr.c index d530b4e878e..0486c357308 100644 --- a/contrib/btree_gist/btree_macaddr.c +++ b/contrib/btree_gist/btree_macaddr.c @@ -182,8 +182,8 @@ Datum gbt_macad_picksplit(PG_FUNCTION_ARGS) { PG_RETURN_POINTER(gbt_num_picksplit( - (GistEntryVector *) PG_GETARG_POINTER(0), - (GIST_SPLITVEC *) PG_GETARG_POINTER(1), + (GistEntryVector *) PG_GETARG_POINTER(0), + (GIST_SPLITVEC *) PG_GETARG_POINTER(1), &tinfo, fcinfo->flinfo )); } diff --git a/contrib/btree_gist/btree_macaddr8.c b/contrib/btree_gist/btree_macaddr8.c index 96afbcdead4..30a1391d733 100644 --- a/contrib/btree_gist/btree_macaddr8.c +++ b/contrib/btree_gist/btree_macaddr8.c @@ -182,8 +182,8 @@ Datum gbt_macad8_picksplit(PG_FUNCTION_ARGS) { PG_RETURN_POINTER(gbt_num_picksplit( - (GistEntryVector *) PG_GETARG_POINTER(0), - (GIST_SPLITVEC *) PG_GETARG_POINTER(1), + (GistEntryVector *) PG_GETARG_POINTER(0), + (GIST_SPLITVEC *) PG_GETARG_POINTER(1), &tinfo, fcinfo->flinfo )); } diff --git a/contrib/btree_gist/btree_oid.c b/contrib/btree_gist/btree_oid.c index e0d6f2adf18..00e701903fd 100644 --- a/contrib/btree_gist/btree_oid.c +++ b/contrib/btree_gist/btree_oid.c @@ -203,8 +203,8 @@ Datum gbt_oid_picksplit(PG_FUNCTION_ARGS) { PG_RETURN_POINTER(gbt_num_picksplit( - (GistEntryVector *) PG_GETARG_POINTER(0), - (GIST_SPLITVEC *) PG_GETARG_POINTER(1), + (GistEntryVector *) PG_GETARG_POINTER(0), + (GIST_SPLITVEC *) PG_GETARG_POINTER(1), &tinfo, fcinfo->flinfo )); } diff --git a/contrib/btree_gist/btree_time.c b/contrib/btree_gist/btree_time.c index 5eec8323f55..bb239d4986d 100644 --- a/contrib/btree_gist/btree_time.c +++ b/contrib/btree_gist/btree_time.c @@ -289,15 +289,15 @@ gbt_time_penalty(PG_FUNCTION_ARGS) intr = DatumGetIntervalP(DirectFunctionCall2( time_mi_time, - TimeADTGetDatumFast(newentry->upper), - TimeADTGetDatumFast(origentry->upper))); + TimeADTGetDatumFast(newentry->upper), + TimeADTGetDatumFast(origentry->upper))); res = INTERVAL_TO_SEC(intr); res = Max(res, 0); intr = DatumGetIntervalP(DirectFunctionCall2( time_mi_time, - TimeADTGetDatumFast(origentry->lower), - TimeADTGetDatumFast(newentry->lower))); + TimeADTGetDatumFast(origentry->lower), + TimeADTGetDatumFast(newentry->lower))); res2 = INTERVAL_TO_SEC(intr); res2 = Max(res2, 0); @@ -309,8 +309,8 @@ gbt_time_penalty(PG_FUNCTION_ARGS) { intr = DatumGetIntervalP(DirectFunctionCall2( time_mi_time, - TimeADTGetDatumFast(origentry->upper), - TimeADTGetDatumFast(origentry->lower))); + TimeADTGetDatumFast(origentry->upper), + TimeADTGetDatumFast(origentry->lower))); *result += FLT_MIN; *result += (float) (res / (res + INTERVAL_TO_SEC(intr))); *result *= (FLT_MAX / (((GISTENTRY *) PG_GETARG_POINTER(0))->rel->rd_att->natts + 1)); @@ -324,8 +324,8 @@ Datum gbt_time_picksplit(PG_FUNCTION_ARGS) { PG_RETURN_POINTER(gbt_num_picksplit( - (GistEntryVector *) PG_GETARG_POINTER(0), - (GIST_SPLITVEC *) PG_GETARG_POINTER(1), + (GistEntryVector *) PG_GETARG_POINTER(0), + (GIST_SPLITVEC *) PG_GETARG_POINTER(1), &tinfo, fcinfo->flinfo )); } diff --git a/contrib/btree_gist/btree_ts.c b/contrib/btree_gist/btree_ts.c index 592466c948a..1582cff1025 100644 --- a/contrib/btree_gist/btree_ts.c +++ b/contrib/btree_gist/btree_ts.c @@ -387,8 +387,8 @@ Datum gbt_ts_picksplit(PG_FUNCTION_ARGS) { PG_RETURN_POINTER(gbt_num_picksplit( - (GistEntryVector *) PG_GETARG_POINTER(0), - (GIST_SPLITVEC *) PG_GETARG_POINTER(1), + (GistEntryVector *) PG_GETARG_POINTER(0), + (GIST_SPLITVEC *) PG_GETARG_POINTER(1), &tinfo, fcinfo->flinfo )); } diff --git a/contrib/btree_gist/btree_utils_var.c b/contrib/btree_gist/btree_utils_var.c index b2623a95830..2c636ad2fa8 100644 --- a/contrib/btree_gist/btree_utils_var.c +++ b/contrib/btree_gist/btree_utils_var.c @@ -402,8 +402,8 @@ gbt_var_penalty(float *res, const GISTENTRY *o, const GISTENTRY *n, *res = 0.0; else if (!(((*tinfo->f_cmp) (nk.lower, ok.lower, collation, flinfo) >= 0 || gbt_bytea_pf_match(ok.lower, nk.lower, tinfo)) && - ((*tinfo->f_cmp) (nk.upper, ok.upper, collation, flinfo) <= 0 || - gbt_bytea_pf_match(ok.upper, nk.upper, tinfo)))) + ((*tinfo->f_cmp) (nk.upper, ok.upper, collation, flinfo) <= 0 || + gbt_bytea_pf_match(ok.upper, nk.upper, tinfo)))) { Datum d = PointerGetDatum(0); double dres; diff --git a/contrib/btree_gist/btree_uuid.c b/contrib/btree_gist/btree_uuid.c index 58a87decc64..ecf357d662c 100644 --- a/contrib/btree_gist/btree_uuid.c +++ b/contrib/btree_gist/btree_uuid.c @@ -150,7 +150,7 @@ gbt_uuid_consistent(PG_FUNCTION_ARGS) PG_RETURN_BOOL( gbt_num_consistent(&key, (void *) query, &strategy, - GIST_LEAF(entry), &tinfo, fcinfo->flinfo) + GIST_LEAF(entry), &tinfo, fcinfo->flinfo) ); } @@ -220,8 +220,8 @@ Datum gbt_uuid_picksplit(PG_FUNCTION_ARGS) { PG_RETURN_POINTER(gbt_num_picksplit( - (GistEntryVector *) PG_GETARG_POINTER(0), - (GIST_SPLITVEC *) PG_GETARG_POINTER(1), + (GistEntryVector *) PG_GETARG_POINTER(0), + (GIST_SPLITVEC *) PG_GETARG_POINTER(1), &tinfo, fcinfo->flinfo )); } diff --git a/contrib/cube/cube.c b/contrib/cube/cube.c index 2bb2ed029d8..149558c7634 100644 --- a/contrib/cube/cube.c +++ b/contrib/cube/cube.c @@ -483,7 +483,7 @@ g_cube_picksplit(PG_FUNCTION_ARGS) union_d = cube_union_v0(datum_alpha, datum_beta); rt_cube_size(union_d, &size_union); inter_d = DatumGetNDBOX(DirectFunctionCall2(cube_inter, - entryvec->vector[i].key, entryvec->vector[j].key)); + entryvec->vector[i].key, entryvec->vector[j].key)); rt_cube_size(inter_d, &size_inter); size_waste = size_union - size_inter; @@ -1354,15 +1354,15 @@ g_cube_distance(PG_FUNCTION_ARGS) { case CubeKNNDistanceTaxicab: retval = DatumGetFloat8(DirectFunctionCall2(distance_taxicab, - PointerGetDatum(cube), PointerGetDatum(query))); + PointerGetDatum(cube), PointerGetDatum(query))); break; case CubeKNNDistanceEuclid: retval = DatumGetFloat8(DirectFunctionCall2(cube_distance, - PointerGetDatum(cube), PointerGetDatum(query))); + PointerGetDatum(cube), PointerGetDatum(query))); break; case CubeKNNDistanceChebyshev: retval = DatumGetFloat8(DirectFunctionCall2(distance_chebyshev, - PointerGetDatum(cube), PointerGetDatum(query))); + PointerGetDatum(cube), PointerGetDatum(query))); break; default: elog(ERROR, "unrecognized cube strategy number: %d", strategy); diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c index 5ec3e794a20..81136b131c9 100644 --- a/contrib/dblink/dblink.c +++ b/contrib/dblink/dblink.c @@ -179,7 +179,7 @@ dblink_conn_not_avail(const char *conname) static void dblink_get_conn(char *conname_or_str, - PGconn *volatile *conn_p, char **conname_p, volatile bool *freeconn_p) + PGconn *volatile *conn_p, char **conname_p, volatile bool *freeconn_p) { remoteConn *rconn = getConnectionByName(conname_or_str); PGconn *conn; @@ -207,9 +207,9 @@ dblink_get_conn(char *conname_or_str, PQfinish(conn); ereport(ERROR, - (errcode(ERRCODE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION), - errmsg("could not establish connection"), - errdetail_internal("%s", msg))); + (errcode(ERRCODE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION), + errmsg("could not establish connection"), + errdetail_internal("%s", msg))); } dblink_security_check(conn, rconn); if (PQclientEncoding(conn) != GetDatabaseEncoding()) @@ -869,8 +869,8 @@ materializeResult(FunctionCallInfo fcinfo, PGconn *conn, PGresult *res) /* failed to determine actual type of RECORD */ ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("function returning record called in context " - "that cannot accept type record"))); + errmsg("function returning record called in context " + "that cannot accept type record"))); break; default: /* result type isn't composite */ @@ -909,7 +909,7 @@ materializeResult(FunctionCallInfo fcinfo, PGconn *conn, PGresult *res) nestlevel = applyRemoteGucs(conn); oldcontext = MemoryContextSwitchTo( - rsinfo->econtext->ecxt_per_query_memory); + rsinfo->econtext->ecxt_per_query_memory); tupstore = tuplestore_begin_heap(true, false, work_mem); rsinfo->setResult = tupstore; rsinfo->setDesc = tupdesc; @@ -1036,7 +1036,7 @@ materializeQueryResult(FunctionCallInfo fcinfo, attinmeta = TupleDescGetAttInMetadata(tupdesc); oldcontext = MemoryContextSwitchTo( - rsinfo->econtext->ecxt_per_query_memory); + rsinfo->econtext->ecxt_per_query_memory); tupstore = tuplestore_begin_heap(true, false, work_mem); rsinfo->setResult = tupstore; rsinfo->setDesc = tupdesc; @@ -1460,8 +1460,8 @@ dblink_exec(PG_FUNCTION_ARGS) { PQclear(res); ereport(ERROR, - (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED), - errmsg("statement returning results not allowed"))); + (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED), + errmsg("statement returning results not allowed"))); } } PG_CATCH(); @@ -1980,7 +1980,7 @@ dblink_fdw_validator(PG_FUNCTION_ARGS) ereport(ERROR, (errcode(ERRCODE_FDW_OUT_OF_MEMORY), errmsg("out of memory"), - errdetail("could not get libpq's default connection options"))); + errdetail("could not get libpq's default connection options"))); } /* Validate each supplied option. */ @@ -2179,7 +2179,7 @@ get_sql_insert(Relation rel, int *pkattnums, int pknumatts, char **src_pkattvals appendStringInfoChar(&buf, ','); appendStringInfoString(&buf, - quote_ident_cstr(NameStr(tupdesc->attrs[i]->attname))); + quote_ident_cstr(NameStr(tupdesc->attrs[i]->attname))); needComma = true; } @@ -2242,7 +2242,7 @@ get_sql_delete(Relation rel, int *pkattnums, int pknumatts, char **tgt_pkattvals appendStringInfoString(&buf, " AND "); appendStringInfoString(&buf, - quote_ident_cstr(NameStr(tupdesc->attrs[pkattnum]->attname))); + quote_ident_cstr(NameStr(tupdesc->attrs[pkattnum]->attname))); if (tgt_pkattvals[i] != NULL) appendStringInfo(&buf, " = %s", @@ -2296,7 +2296,7 @@ get_sql_update(Relation rel, int *pkattnums, int pknumatts, char **src_pkattvals appendStringInfoString(&buf, ", "); appendStringInfo(&buf, "%s = ", - quote_ident_cstr(NameStr(tupdesc->attrs[i]->attname))); + quote_ident_cstr(NameStr(tupdesc->attrs[i]->attname))); key = get_attnum_pk_pos(pkattnums, pknumatts, i); @@ -2325,7 +2325,7 @@ get_sql_update(Relation rel, int *pkattnums, int pknumatts, char **src_pkattvals appendStringInfoString(&buf, " AND "); appendStringInfoString(&buf, - quote_ident_cstr(NameStr(tupdesc->attrs[pkattnum]->attname))); + quote_ident_cstr(NameStr(tupdesc->attrs[pkattnum]->attname))); val = tgt_pkattvals[i]; @@ -2351,7 +2351,7 @@ quote_ident_cstr(char *rawstr) rawstr_text = cstring_to_text(rawstr); result_text = DatumGetTextPP(DirectFunctionCall1(quote_ident, - PointerGetDatum(rawstr_text))); + PointerGetDatum(rawstr_text))); result = text_to_cstring(result_text); return result; @@ -2416,7 +2416,7 @@ get_tuple_of_interest(Relation rel, int *pkattnums, int pknumatts, char **src_pk appendStringInfoString(&buf, "NULL"); else appendStringInfoString(&buf, - quote_ident_cstr(NameStr(tupdesc->attrs[i]->attname))); + quote_ident_cstr(NameStr(tupdesc->attrs[i]->attname))); } appendStringInfo(&buf, " FROM %s WHERE ", relname); @@ -2429,7 +2429,7 @@ get_tuple_of_interest(Relation rel, int *pkattnums, int pknumatts, char **src_pk appendStringInfoString(&buf, " AND "); appendStringInfoString(&buf, - quote_ident_cstr(NameStr(tupdesc->attrs[pkattnum]->attname))); + quote_ident_cstr(NameStr(tupdesc->attrs[pkattnum]->attname))); if (src_pkattvals[i] != NULL) appendStringInfo(&buf, " = %s", @@ -2619,10 +2619,10 @@ dblink_security_check(PGconn *conn, remoteConn *rconn) pfree(rconn); ereport(ERROR, - (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED), - errmsg("password is required"), - errdetail("Non-superuser cannot connect if the server does not request a password."), - errhint("Target server's authentication method must be changed."))); + (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED), + errmsg("password is required"), + errdetail("Non-superuser cannot connect if the server does not request a password."), + errhint("Target server's authentication method must be changed."))); } } } @@ -2661,9 +2661,9 @@ dblink_connstr_check(const char *connstr) if (!connstr_gives_password) ereport(ERROR, - (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED), - errmsg("password is required"), - errdetail("Non-superusers must provide a password in the connection string."))); + (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED), + errmsg("password is required"), + errdetail("Non-superusers must provide a password in the connection string."))); } } @@ -2724,8 +2724,8 @@ dblink_res_error(PGconn *conn, const char *conname, PGresult *res, message_detail ? errdetail_internal("%s", message_detail) : 0, message_hint ? errhint("%s", message_hint) : 0, message_context ? errcontext("%s", message_context) : 0, - errcontext("Error occurred on dblink connection named \"%s\": %s.", - dblink_context_conname, dblink_context_msg))); + errcontext("Error occurred on dblink connection named \"%s\": %s.", + dblink_context_conname, dblink_context_msg))); } /* @@ -2760,7 +2760,7 @@ get_connect_string(const char *servername) ereport(ERROR, (errcode(ERRCODE_FDW_OUT_OF_MEMORY), errmsg("out of memory"), - errdetail("could not get libpq's default connection options"))); + errdetail("could not get libpq's default connection options"))); } /* first gather the server connstr options */ diff --git a/contrib/earthdistance/earthdistance.c b/contrib/earthdistance/earthdistance.c index 6ad6d87ce8c..e6ebfd11ad4 100644 --- a/contrib/earthdistance/earthdistance.c +++ b/contrib/earthdistance/earthdistance.c @@ -69,7 +69,7 @@ geo_distance_internal(Point *pt1, Point *pt2) longdiff = TWO_PI - longdiff; sino = sqrt(sin(fabs(lat1 - lat2) / 2.) * sin(fabs(lat1 - lat2) / 2.) + - cos(lat1) * cos(lat2) * sin(longdiff / 2.) * sin(longdiff / 2.)); + cos(lat1) * cos(lat2) * sin(longdiff / 2.) * sin(longdiff / 2.)); if (sino > 1.) sino = 1.; diff --git a/contrib/file_fdw/file_fdw.c b/contrib/file_fdw/file_fdw.c index 692c7ce5f1d..2396bd442fa 100644 --- a/contrib/file_fdw/file_fdw.c +++ b/contrib/file_fdw/file_fdw.c @@ -250,7 +250,7 @@ file_fdw_validator(PG_FUNCTION_ARGS) buf.len > 0 ? errhint("Valid options in this context are: %s", buf.data) - : errhint("There are no valid options in this context."))); + : errhint("There are no valid options in this context."))); } /* diff --git a/contrib/hstore/hstore_io.c b/contrib/hstore/hstore_io.c index 1dd7c7c9ce4..e03005c9232 100644 --- a/contrib/hstore/hstore_io.c +++ b/contrib/hstore/hstore_io.c @@ -443,8 +443,8 @@ hstore_recv(PG_FUNCTION_ARGS) if (pcount < 0 || pcount > MaxAllocSize / sizeof(Pairs)) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("number of pairs (%d) exceeds the maximum allowed (%d)", - pcount, (int) (MaxAllocSize / sizeof(Pairs))))); + errmsg("number of pairs (%d) exceeds the maximum allowed (%d)", + pcount, (int) (MaxAllocSize / sizeof(Pairs))))); pairs = palloc(pcount * sizeof(Pairs)); for (i = 0; i < pcount; ++i) @@ -562,8 +562,8 @@ hstore_from_arrays(PG_FUNCTION_ARGS) if (key_count > MaxAllocSize / sizeof(Pairs)) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("number of pairs (%d) exceeds the maximum allowed (%d)", - key_count, (int) (MaxAllocSize / sizeof(Pairs))))); + errmsg("number of pairs (%d) exceeds the maximum allowed (%d)", + key_count, (int) (MaxAllocSize / sizeof(Pairs))))); /* value_array might be NULL */ @@ -693,8 +693,8 @@ hstore_from_array(PG_FUNCTION_ARGS) if (count > MaxAllocSize / sizeof(Pairs)) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("number of pairs (%d) exceeds the maximum allowed (%d)", - count, (int) (MaxAllocSize / sizeof(Pairs))))); + errmsg("number of pairs (%d) exceeds the maximum allowed (%d)", + count, (int) (MaxAllocSize / sizeof(Pairs))))); pairs = palloc(count * sizeof(Pairs)); @@ -1435,8 +1435,8 @@ hstore_to_jsonb_loose(PG_FUNCTION_ARGS) { val.type = jbvNumeric; val.val.numeric = DatumGetNumeric( - DirectFunctionCall3(numeric_in, - CStringGetDatum(tmp.data), 0, -1)); + DirectFunctionCall3(numeric_in, + CStringGetDatum(tmp.data), 0, -1)); } else { diff --git a/contrib/hstore/hstore_op.c b/contrib/hstore/hstore_op.c index 1e2dc881c14..612be23a74f 100644 --- a/contrib/hstore/hstore_op.c +++ b/contrib/hstore/hstore_op.c @@ -101,8 +101,8 @@ hstoreArrayToPairs(ArrayType *a, int *npairs) if (key_count > MaxAllocSize / sizeof(Pairs)) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("number of pairs (%d) exceeds the maximum allowed (%d)", - key_count, (int) (MaxAllocSize / sizeof(Pairs))))); + errmsg("number of pairs (%d) exceeds the maximum allowed (%d)", + key_count, (int) (MaxAllocSize / sizeof(Pairs))))); key_pairs = palloc(sizeof(Pairs) * key_count); @@ -181,7 +181,7 @@ hstore_exists_any(PG_FUNCTION_ARGS) for (i = 0; i < nkeys; i++) { int idx = hstoreFindKey(hs, &lowbound, - key_pairs[i].key, key_pairs[i].keylen); + key_pairs[i].key, key_pairs[i].keylen); if (idx >= 0) { @@ -215,7 +215,7 @@ hstore_exists_all(PG_FUNCTION_ARGS) for (i = 0; i < nkeys; i++) { int idx = hstoreFindKey(hs, &lowbound, - key_pairs[i].key, key_pairs[i].keylen); + key_pairs[i].key, key_pairs[i].keylen); if (idx < 0) { @@ -546,8 +546,8 @@ hstore_concat(PG_FUNCTION_ARGS) if (difference >= 0) { HS_COPYITEM(ed, bufd, pd, - HSTORE_KEY(es2, ps2, s2idx), HSTORE_KEYLEN(es2, s2idx), - HSTORE_VALLEN(es2, s2idx), HSTORE_VALISNULL(es2, s2idx)); + HSTORE_KEY(es2, ps2, s2idx), HSTORE_KEYLEN(es2, s2idx), + HSTORE_VALLEN(es2, s2idx), HSTORE_VALISNULL(es2, s2idx)); ++s2idx; if (difference == 0) ++s1idx; @@ -555,8 +555,8 @@ hstore_concat(PG_FUNCTION_ARGS) else { HS_COPYITEM(ed, bufd, pd, - HSTORE_KEY(es1, ps1, s1idx), HSTORE_KEYLEN(es1, s1idx), - HSTORE_VALLEN(es1, s1idx), HSTORE_VALISNULL(es1, s1idx)); + HSTORE_KEY(es1, ps1, s1idx), HSTORE_KEYLEN(es1, s1idx), + HSTORE_VALLEN(es1, s1idx), HSTORE_VALISNULL(es1, s1idx)); ++s1idx; } } @@ -614,8 +614,8 @@ hstore_slice_to_array(PG_FUNCTION_ARGS) else { out_datums[i] = PointerGetDatum( - cstring_to_text_with_len(HSTORE_VAL(entries, ptr, idx), - HSTORE_VALLEN(entries, idx))); + cstring_to_text_with_len(HSTORE_VAL(entries, ptr, idx), + HSTORE_VALLEN(entries, idx))); out_nulls[i] = false; } } @@ -667,7 +667,7 @@ hstore_slice_to_hstore(PG_FUNCTION_ARGS) for (i = 0; i < nkeys; ++i) { int idx = hstoreFindKey(hs, &lastidx, - key_pairs[i].key, key_pairs[i].keylen); + key_pairs[i].key, key_pairs[i].keylen); if (idx >= 0) { @@ -760,7 +760,7 @@ hstore_avals(PG_FUNCTION_ARGS) else { text *item = cstring_to_text_with_len(HSTORE_VAL(entries, base, i), - HSTORE_VALLEN(entries, i)); + HSTORE_VALLEN(entries, i)); d[i] = PointerGetDatum(item); nulls[i] = false; @@ -811,7 +811,7 @@ hstore_to_array_internal(HStore *hs, int ndims) else { text *item = cstring_to_text_with_len(HSTORE_VAL(entries, base, i), - HSTORE_VALLEN(entries, i)); + HSTORE_VALLEN(entries, i)); out_datums[i * 2 + 1] = PointerGetDatum(item); out_nulls[i * 2 + 1] = false; diff --git a/contrib/intarray/_int_bool.c b/contrib/intarray/_int_bool.c index 5d9e676660f..a18c6456067 100644 --- a/contrib/intarray/_int_bool.c +++ b/contrib/intarray/_int_bool.c @@ -506,8 +506,8 @@ bqarr_in(PG_FUNCTION_ARGS) if (state.num > QUERYTYPEMAXITEMS) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("number of query items (%d) exceeds the maximum allowed (%d)", - state.num, (int) QUERYTYPEMAXITEMS))); + errmsg("number of query items (%d) exceeds the maximum allowed (%d)", + state.num, (int) QUERYTYPEMAXITEMS))); commonlen = COMPUTESIZE(state.num); query = (QUERYTYPE *) palloc(commonlen); diff --git a/contrib/intarray/_int_gist.c b/contrib/intarray/_int_gist.c index 888c277e60f..79521b29b04 100644 --- a/contrib/intarray/_int_gist.c +++ b/contrib/intarray/_int_gist.c @@ -83,7 +83,7 @@ g_int_consistent(PG_FUNCTION_ARGS) case RTOldContainedByStrategyNumber: if (GIST_LEAF(entry)) retval = inner_int_contains(query, - (ArrayType *) DatumGetPointer(entry->key)); + (ArrayType *) DatumGetPointer(entry->key)); else retval = inner_int_overlap((ArrayType *) DatumGetPointer(entry->key), query); diff --git a/contrib/intarray/_int_op.c b/contrib/intarray/_int_op.c index c30d3c8269f..3637c4564ce 100644 --- a/contrib/intarray/_int_op.c +++ b/contrib/intarray/_int_op.c @@ -49,8 +49,8 @@ _int_different(PG_FUNCTION_ARGS) PG_RETURN_BOOL(!DatumGetBool( DirectFunctionCall2( _int_same, - PointerGetDatum(PG_GETARG_POINTER(0)), - PointerGetDatum(PG_GETARG_POINTER(1)) + PointerGetDatum(PG_GETARG_POINTER(0)), + PointerGetDatum(PG_GETARG_POINTER(1)) ) )); } diff --git a/contrib/intarray/_int_selfuncs.c b/contrib/intarray/_int_selfuncs.c index 3d92025ba56..acb87d10f05 100644 --- a/contrib/intarray/_int_selfuncs.c +++ b/contrib/intarray/_int_selfuncs.c @@ -57,7 +57,7 @@ _int_overlap_sel(PG_FUNCTION_ARGS) { PG_RETURN_DATUM(DirectFunctionCall4(arraycontsel, PG_GETARG_DATUM(0), - ObjectIdGetDatum(OID_ARRAY_OVERLAP_OP), + ObjectIdGetDatum(OID_ARRAY_OVERLAP_OP), PG_GETARG_DATUM(2), PG_GETARG_DATUM(3))); } @@ -67,7 +67,7 @@ _int_contains_sel(PG_FUNCTION_ARGS) { PG_RETURN_DATUM(DirectFunctionCall4(arraycontsel, PG_GETARG_DATUM(0), - ObjectIdGetDatum(OID_ARRAY_CONTAINS_OP), + ObjectIdGetDatum(OID_ARRAY_CONTAINS_OP), PG_GETARG_DATUM(2), PG_GETARG_DATUM(3))); } @@ -77,7 +77,7 @@ _int_contained_sel(PG_FUNCTION_ARGS) { PG_RETURN_DATUM(DirectFunctionCall4(arraycontsel, PG_GETARG_DATUM(0), - ObjectIdGetDatum(OID_ARRAY_CONTAINED_OP), + ObjectIdGetDatum(OID_ARRAY_CONTAINED_OP), PG_GETARG_DATUM(2), PG_GETARG_DATUM(3))); } @@ -87,7 +87,7 @@ _int_overlap_joinsel(PG_FUNCTION_ARGS) { PG_RETURN_DATUM(DirectFunctionCall5(arraycontjoinsel, PG_GETARG_DATUM(0), - ObjectIdGetDatum(OID_ARRAY_OVERLAP_OP), + ObjectIdGetDatum(OID_ARRAY_OVERLAP_OP), PG_GETARG_DATUM(2), PG_GETARG_DATUM(3), PG_GETARG_DATUM(4))); @@ -98,7 +98,7 @@ _int_contains_joinsel(PG_FUNCTION_ARGS) { PG_RETURN_DATUM(DirectFunctionCall5(arraycontjoinsel, PG_GETARG_DATUM(0), - ObjectIdGetDatum(OID_ARRAY_CONTAINS_OP), + ObjectIdGetDatum(OID_ARRAY_CONTAINS_OP), PG_GETARG_DATUM(2), PG_GETARG_DATUM(3), PG_GETARG_DATUM(4))); @@ -109,7 +109,7 @@ _int_contained_joinsel(PG_FUNCTION_ARGS) { PG_RETURN_DATUM(DirectFunctionCall5(arraycontjoinsel, PG_GETARG_DATUM(0), - ObjectIdGetDatum(OID_ARRAY_CONTAINED_OP), + ObjectIdGetDatum(OID_ARRAY_CONTAINED_OP), PG_GETARG_DATUM(2), PG_GETARG_DATUM(3), PG_GETARG_DATUM(4))); diff --git a/contrib/isn/isn.c b/contrib/isn/isn.c index d018ec6af5b..4d845b716f0 100644 --- a/contrib/isn/isn.c +++ b/contrib/isn/isn.c @@ -887,8 +887,8 @@ eanbadcheck: { ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid check digit for %s number: \"%s\", should be %c", - isn_names[accept], str, (rcheck == 10) ? ('X') : (rcheck + '0')))); + errmsg("invalid check digit for %s number: \"%s\", should be %c", + isn_names[accept], str, (rcheck == 10) ? ('X') : (rcheck + '0')))); } } return false; diff --git a/contrib/ltree/_ltree_op.c b/contrib/ltree/_ltree_op.c index c0c56a40d4f..fdf6ebb43b1 100644 --- a/contrib/ltree/_ltree_op.c +++ b/contrib/ltree/_ltree_op.c @@ -53,7 +53,7 @@ array_iterator(ArrayType *la, PGCALL2 callback, void *param, ltree **found) while (num > 0) { if (DatumGetBool(DirectFunctionCall2(callback, - PointerGetDatum(item), PointerGetDatum(param)))) + PointerGetDatum(item), PointerGetDatum(param)))) { if (found) diff --git a/contrib/ltree/lquery_op.c b/contrib/ltree/lquery_op.c index 3bf5818e3a1..229ddd0ae3d 100644 --- a/contrib/ltree/lquery_op.c +++ b/contrib/ltree/lquery_op.c @@ -356,7 +356,7 @@ lt_q_regex(PG_FUNCTION_ARGS) while (num > 0) { if (DatumGetBool(DirectFunctionCall2(ltq_regex, - PointerGetDatum(tree), PointerGetDatum(query)))) + PointerGetDatum(tree), PointerGetDatum(query)))) { res = true; diff --git a/contrib/ltree/ltree.h b/contrib/ltree/ltree.h index 7a7a1540976..fd86323ffe0 100644 --- a/contrib/ltree/ltree.h +++ b/contrib/ltree/ltree.h @@ -161,7 +161,7 @@ bool ltree_execute(ITEM *curitem, void *checkval, int ltree_compare(const ltree *a, const ltree *b); bool inner_isparent(const ltree *c, const ltree *p); bool compare_subnode(ltree_level *t, char *q, int len, - int (*cmpptr) (const char *, const char *, size_t), bool anyend); + int (*cmpptr) (const char *, const char *, size_t), bool anyend); ltree *lca_inner(ltree **a, int len); int ltree_strncasecmp(const char *a, const char *b, size_t s); diff --git a/contrib/ltree/ltree_gist.c b/contrib/ltree/ltree_gist.c index 37ee3377ff3..70e78a672ac 100644 --- a/contrib/ltree/ltree_gist.c +++ b/contrib/ltree/ltree_gist.c @@ -672,8 +672,8 @@ ltree_consistent(PG_FUNCTION_ARGS) query = PG_GETARG_LQUERY(1); if (GIST_LEAF(entry)) res = DatumGetBool(DirectFunctionCall2(ltq_regex, - PointerGetDatum(LTG_NODE(key)), - PointerGetDatum((lquery *) query) + PointerGetDatum(LTG_NODE(key)), + PointerGetDatum((lquery *) query) )); else res = (gist_qe(key, (lquery *) query) && gist_between(key, (lquery *) query)); @@ -683,8 +683,8 @@ ltree_consistent(PG_FUNCTION_ARGS) query = PG_GETARG_LQUERY(1); if (GIST_LEAF(entry)) res = DatumGetBool(DirectFunctionCall2(ltxtq_exec, - PointerGetDatum(LTG_NODE(key)), - PointerGetDatum((lquery *) query) + PointerGetDatum(LTG_NODE(key)), + PointerGetDatum((lquery *) query) )); else res = gist_qtxt(key, (ltxtquery *) query); @@ -694,8 +694,8 @@ ltree_consistent(PG_FUNCTION_ARGS) query = DatumGetPointer(PG_DETOAST_DATUM(PG_GETARG_DATUM(1))); if (GIST_LEAF(entry)) res = DatumGetBool(DirectFunctionCall2(lt_q_regex, - PointerGetDatum(LTG_NODE(key)), - PointerGetDatum((ArrayType *) query) + PointerGetDatum(LTG_NODE(key)), + PointerGetDatum((ArrayType *) query) )); else res = arrq_cons(key, (ArrayType *) query); diff --git a/contrib/ltree/ltree_io.c b/contrib/ltree/ltree_io.c index a1d4a0d38fa..34ca597a484 100644 --- a/contrib/ltree/ltree_io.c +++ b/contrib/ltree/ltree_io.c @@ -61,8 +61,8 @@ ltree_in(PG_FUNCTION_ARGS) if (num + 1 > MaxAllocSize / sizeof(nodeitem)) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("number of levels (%d) exceeds the maximum allowed (%d)", - num + 1, (int) (MaxAllocSize / sizeof(nodeitem))))); + errmsg("number of levels (%d) exceeds the maximum allowed (%d)", + num + 1, (int) (MaxAllocSize / sizeof(nodeitem))))); list = lptr = (nodeitem *) palloc(sizeof(nodeitem) * (num + 1)); ptr = buf; while (*ptr) @@ -230,8 +230,8 @@ lquery_in(PG_FUNCTION_ARGS) if (num > MaxAllocSize / ITEMSIZE) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("number of levels (%d) exceeds the maximum allowed (%d)", - num, (int) (MaxAllocSize / ITEMSIZE)))); + errmsg("number of levels (%d) exceeds the maximum allowed (%d)", + num, (int) (MaxAllocSize / ITEMSIZE)))); curqlevel = tmpql = (lquery_level *) palloc0(ITEMSIZE * num); ptr = buf; while (*ptr) diff --git a/contrib/oid2name/oid2name.c b/contrib/oid2name/oid2name.c index ffb8234c0d7..8af99decad1 100644 --- a/contrib/oid2name/oid2name.c +++ b/contrib/oid2name/oid2name.c @@ -211,7 +211,7 @@ add_one_elt(char *eltname, eary *eary) { eary ->alloc *= 2; eary ->array = (char **) pg_realloc(eary->array, - eary->alloc * sizeof(char *)); + eary->alloc * sizeof(char *)); } eary ->array[eary->num] = pg_strdup(eltname); @@ -436,7 +436,7 @@ sql_exec_dumpalltables(PGconn *conn, struct options *opts) snprintf(todo, sizeof(todo), "SELECT pg_catalog.pg_relation_filenode(c.oid) as \"Filenode\", relname as \"Table Name\" %s " "FROM pg_catalog.pg_class c " - " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace " + " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace " " LEFT JOIN pg_catalog.pg_database d ON d.datname = pg_catalog.current_database()," " pg_catalog.pg_tablespace t " "WHERE relkind IN (" CppAsString2(RELKIND_RELATION) "," @@ -507,7 +507,7 @@ sql_exec_searchtables(PGconn *conn, struct options *opts) todo = psprintf( "SELECT pg_catalog.pg_relation_filenode(c.oid) as \"Filenode\", relname as \"Table Name\" %s\n" "FROM pg_catalog.pg_class c\n" - " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\n" + " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\n" " LEFT JOIN pg_catalog.pg_database d ON d.datname = pg_catalog.current_database(),\n" " pg_catalog.pg_tablespace t\n" "WHERE relkind IN (" CppAsString2(RELKIND_RELATION) "," diff --git a/contrib/pageinspect/brinfuncs.c b/contrib/pageinspect/brinfuncs.c index d52807dcdd6..13da7616e75 100644 --- a/contrib/pageinspect/brinfuncs.c +++ b/contrib/pageinspect/brinfuncs.c @@ -226,7 +226,7 @@ brin_page_items(PG_FUNCTION_ARGS) if (ItemIdIsUsed(itemId)) { dtup = brin_deform_tuple(bdesc, - (BrinTuple *) PageGetItem(page, itemId), + (BrinTuple *) PageGetItem(page, itemId), NULL); attno = 1; unusedItem = false; diff --git a/contrib/pageinspect/btreefuncs.c b/contrib/pageinspect/btreefuncs.c index 02440eca477..4f834676ea2 100644 --- a/contrib/pageinspect/btreefuncs.c +++ b/contrib/pageinspect/btreefuncs.c @@ -346,7 +346,7 @@ bt_page_items(PG_FUNCTION_ARGS) if (RELATION_IS_OTHER_TEMP(rel)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot access temporary tables of other sessions"))); + errmsg("cannot access temporary tables of other sessions"))); if (blkno == 0) elog(ERROR, "block 0 is a meta page"); @@ -442,7 +442,7 @@ bt_page_items_bytea(PG_FUNCTION_ARGS) if (raw_page_size < SizeOfPageHeaderData) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("input page too small (%d bytes)", raw_page_size))); + errmsg("input page too small (%d bytes)", raw_page_size))); fctx = SRF_FIRSTCALL_INIT(); mctx = MemoryContextSwitchTo(fctx->multi_call_memory_ctx); diff --git a/contrib/pageinspect/ginfuncs.c b/contrib/pageinspect/ginfuncs.c index 993fc2d9ae1..f774495b6fb 100644 --- a/contrib/pageinspect/ginfuncs.c +++ b/contrib/pageinspect/ginfuncs.c @@ -196,7 +196,7 @@ gin_leafpage_items(PG_FUNCTION_ARGS) if (opaq->flags != (GIN_DATA | GIN_LEAF | GIN_COMPRESSED)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("input page is not a compressed GIN data leaf page"), + errmsg("input page is not a compressed GIN data leaf page"), errdetail("Flags %04X, expected %04X", opaq->flags, (GIN_DATA | GIN_LEAF | GIN_COMPRESSED)))); diff --git a/contrib/pageinspect/hashfuncs.c b/contrib/pageinspect/hashfuncs.c index 228a147c9e8..dbe3b6ab046 100644 --- a/contrib/pageinspect/hashfuncs.c +++ b/contrib/pageinspect/hashfuncs.c @@ -99,7 +99,7 @@ verify_hash_page(bytea *raw_page, int flags) case LH_BUCKET_PAGE | LH_OVERFLOW_PAGE: ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("page is not a hash bucket or overflow page"))); + errmsg("page is not a hash bucket or overflow page"))); case LH_OVERFLOW_PAGE: ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), diff --git a/contrib/pageinspect/heapfuncs.c b/contrib/pageinspect/heapfuncs.c index 1448effb503..72d1776a4a5 100644 --- a/contrib/pageinspect/heapfuncs.c +++ b/contrib/pageinspect/heapfuncs.c @@ -84,7 +84,7 @@ text_to_bits(char *str, int len) else ereport(ERROR, (errcode(ERRCODE_DATA_CORRUPTED), - errmsg("illegal character '%c' in t_bits string", str[off]))); + errmsg("illegal character '%c' in t_bits string", str[off]))); if (off % 8 == 7) bits[off / 8] = byte; @@ -132,7 +132,7 @@ heap_page_items(PG_FUNCTION_ARGS) if (raw_page_size < SizeOfPageHeaderData) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("input page too small (%d bytes)", raw_page_size))); + errmsg("input page too small (%d bytes)", raw_page_size))); fctx = SRF_FIRSTCALL_INIT(); mctx = MemoryContextSwitchTo(fctx->multi_call_memory_ctx); @@ -236,7 +236,7 @@ heap_page_items(PG_FUNCTION_ARGS) bits_len = ((tuphdr->t_infomask2 & HEAP_NATTS_MASK) / 8 + 1) * 8; values[11] = CStringGetTextDatum( - bits_to_text(tuphdr->t_bits, bits_len)); + bits_to_text(tuphdr->t_bits, bits_len)); } else nulls[11] = true; @@ -384,7 +384,7 @@ tuple_data_split_internal(Oid relid, char *tupdata, if (tupdata_len != off) ereport(ERROR, (errcode(ERRCODE_DATA_CORRUPTED), - errmsg("end of tuple reached without looking at all its data"))); + errmsg("end of tuple reached without looking at all its data"))); return makeArrayResult(raw_attrs, CurrentMemoryContext); } diff --git a/contrib/pageinspect/rawpage.c b/contrib/pageinspect/rawpage.c index f273dfa7cb2..e9d3131bda4 100644 --- a/contrib/pageinspect/rawpage.c +++ b/contrib/pageinspect/rawpage.c @@ -311,7 +311,7 @@ page_checksum(PG_FUNCTION_ARGS) if (raw_page_size != BLCKSZ) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("incorrect size of input page (%d bytes)", raw_page_size))); + errmsg("incorrect size of input page (%d bytes)", raw_page_size))); page = (PageHeader) VARDATA(raw_page); diff --git a/contrib/passwordcheck/passwordcheck.c b/contrib/passwordcheck/passwordcheck.c index 59f73a1e6ba..b80fd458ad7 100644 --- a/contrib/passwordcheck/passwordcheck.c +++ b/contrib/passwordcheck/passwordcheck.c @@ -112,7 +112,7 @@ check_password(const char *username, if (!pwd_has_letter || !pwd_has_nonletter) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("password must contain both letters and nonletters"))); + errmsg("password must contain both letters and nonletters"))); #ifdef USE_CRACKLIB /* call cracklib to check password */ diff --git a/contrib/pg_prewarm/pg_prewarm.c b/contrib/pg_prewarm/pg_prewarm.c index 78d71ab0785..fec62b1a542 100644 --- a/contrib/pg_prewarm/pg_prewarm.c +++ b/contrib/pg_prewarm/pg_prewarm.c @@ -138,8 +138,8 @@ pg_prewarm(PG_FUNCTION_ARGS) if (last_block < 0 || last_block >= nblocks) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("ending block number must be between 0 and " INT64_FORMAT, - nblocks - 1))); + errmsg("ending block number must be between 0 and " INT64_FORMAT, + nblocks - 1))); } /* Now we're ready to do the real work. */ diff --git a/contrib/pg_standby/pg_standby.c b/contrib/pg_standby/pg_standby.c index db402310895..d7fa2a80c69 100644 --- a/contrib/pg_standby/pg_standby.c +++ b/contrib/pg_standby/pg_standby.c @@ -256,7 +256,7 @@ CustomizableCleanupPriorWALFiles(void) * in case this worries you. */ if (IsXLogFileName(xlde->d_name) && - strcmp(xlde->d_name + 8, exclusiveCleanupFileName + 8) < 0) + strcmp(xlde->d_name + 8, exclusiveCleanupFileName + 8) < 0) { #ifdef WIN32 snprintf(WALFilePath, sizeof(WALFilePath), "%s\\%s", archiveLocation, xlde->d_name); @@ -523,7 +523,7 @@ usage(void) "Main intended use as restore_command in recovery.conf:\n" " restore_command = 'pg_standby [OPTION]... ARCHIVELOCATION %%f %%p %%r'\n" "e.g.\n" - " restore_command = 'pg_standby /mnt/server/archiverdir %%f %%p %%r'\n"); + " restore_command = 'pg_standby /mnt/server/archiverdir %%f %%p %%r'\n"); printf("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"); } diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c index d1ed74b45e3..b9d4a936905 100644 --- a/contrib/pg_stat_statements/pg_stat_statements.c +++ b/contrib/pg_stat_statements/pg_stat_statements.c @@ -358,7 +358,7 @@ _PG_init(void) * Define (or redefine) custom GUC variables. */ DefineCustomIntVariable("pg_stat_statements.max", - "Sets the maximum number of statements tracked by pg_stat_statements.", + "Sets the maximum number of statements tracked by pg_stat_statements.", NULL, &pgss_max, 5000, @@ -371,7 +371,7 @@ _PG_init(void) NULL); DefineCustomEnumVariable("pg_stat_statements.track", - "Selects which statements are tracked by pg_stat_statements.", + "Selects which statements are tracked by pg_stat_statements.", NULL, &pgss_track, PGSS_TRACK_TOP, @@ -383,7 +383,7 @@ _PG_init(void) NULL); DefineCustomBoolVariable("pg_stat_statements.track_utility", - "Selects whether utility commands are tracked by pg_stat_statements.", + "Selects whether utility commands are tracked by pg_stat_statements.", NULL, &pgss_track_utility, true, @@ -394,7 +394,7 @@ _PG_init(void) NULL); DefineCustomBoolVariable("pg_stat_statements.save", - "Save pg_stat_statements statistics across server shutdowns.", + "Save pg_stat_statements statistics across server shutdowns.", NULL, &pgss_save, true, @@ -1940,8 +1940,8 @@ qtext_load_file(Size *buffer_size) if (errno != ENOENT) ereport(LOG, (errcode_for_file_access(), - errmsg("could not read pg_stat_statement file \"%s\": %m", - PGSS_TEXT_FILE))); + errmsg("could not read pg_stat_statement file \"%s\": %m", + PGSS_TEXT_FILE))); return NULL; } @@ -1985,8 +1985,8 @@ qtext_load_file(Size *buffer_size) if (errno) ereport(LOG, (errcode_for_file_access(), - errmsg("could not read pg_stat_statement file \"%s\": %m", - PGSS_TEXT_FILE))); + errmsg("could not read pg_stat_statement file \"%s\": %m", + PGSS_TEXT_FILE))); free(buf); CloseTransientFile(fd); return NULL; @@ -2145,8 +2145,8 @@ gc_qtexts(void) { ereport(LOG, (errcode_for_file_access(), - errmsg("could not write pg_stat_statement file \"%s\": %m", - PGSS_TEXT_FILE))); + errmsg("could not write pg_stat_statement file \"%s\": %m", + PGSS_TEXT_FILE))); hash_seq_term(&hash_seq); goto gc_fail; } @@ -2163,8 +2163,8 @@ gc_qtexts(void) if (ftruncate(fileno(qfile), extent) != 0) ereport(LOG, (errcode_for_file_access(), - errmsg("could not truncate pg_stat_statement file \"%s\": %m", - PGSS_TEXT_FILE))); + errmsg("could not truncate pg_stat_statement file \"%s\": %m", + PGSS_TEXT_FILE))); if (FreeFile(qfile)) { @@ -2230,8 +2230,8 @@ gc_fail: if (qfile == NULL) ereport(LOG, (errcode_for_file_access(), - errmsg("could not write new pg_stat_statement file \"%s\": %m", - PGSS_TEXT_FILE))); + errmsg("could not write new pg_stat_statement file \"%s\": %m", + PGSS_TEXT_FILE))); else FreeFile(qfile); @@ -2291,8 +2291,8 @@ entry_reset(void) if (ftruncate(fileno(qfile), 0) != 0) ereport(LOG, (errcode_for_file_access(), - errmsg("could not truncate pg_stat_statement file \"%s\": %m", - PGSS_TEXT_FILE))); + errmsg("could not truncate pg_stat_statement file \"%s\": %m", + PGSS_TEXT_FILE))); FreeFile(qfile); diff --git a/contrib/pg_visibility/pg_visibility.c b/contrib/pg_visibility/pg_visibility.c index ce4a2cb12f2..2cc9575d9f2 100644 --- a/contrib/pg_visibility/pg_visibility.c +++ b/contrib/pg_visibility/pg_visibility.c @@ -774,6 +774,6 @@ check_relation_relkind(Relation rel) rel->rd_rel->relkind != RELKIND_TOASTVALUE) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("\"%s\" is not a table, materialized view, or TOAST table", - RelationGetRelationName(rel)))); + errmsg("\"%s\" is not a table, materialized view, or TOAST table", + RelationGetRelationName(rel)))); } diff --git a/contrib/pgcrypto/crypt-blowfish.c b/contrib/pgcrypto/crypt-blowfish.c index 6feaefcf7be..ed69c0c6bb3 100644 --- a/contrib/pgcrypto/crypt-blowfish.c +++ b/contrib/pgcrypto/crypt-blowfish.c @@ -737,7 +737,7 @@ _crypt_blowfish_rn(const char *key, const char *setting, memcpy(output, setting, 7 + 22 - 1); output[7 + 22 - 1] = BF_itoa64[(int) - BF_atoi64[(int) setting[7 + 22 - 1] - 0x20] & 0x30]; + BF_atoi64[(int) setting[7 + 22 - 1] - 0x20] & 0x30]; /* This has to be bug-compatible with the original implementation, so * only encode 23 of the 24 bytes. :-) */ diff --git a/contrib/pgcrypto/crypt-gensalt.c b/contrib/pgcrypto/crypt-gensalt.c index 6dc7cbdb3a5..740f3612532 100644 --- a/contrib/pgcrypto/crypt-gensalt.c +++ b/contrib/pgcrypto/crypt-gensalt.c @@ -23,7 +23,7 @@ static unsigned char _crypt_itoa64[64 + 1] = char * _crypt_gensalt_traditional_rn(unsigned long count, - const char *input, int size, char *output, int output_size) + const char *input, int size, char *output, int output_size) { if (size < 2 || output_size < 2 + 1 || (count && count != 25)) { @@ -41,7 +41,7 @@ _crypt_gensalt_traditional_rn(unsigned long count, char * _crypt_gensalt_extended_rn(unsigned long count, - const char *input, int size, char *output, int output_size) + const char *input, int size, char *output, int output_size) { unsigned long value; @@ -77,7 +77,7 @@ _crypt_gensalt_extended_rn(unsigned long count, char * _crypt_gensalt_md5_rn(unsigned long count, - const char *input, int size, char *output, int output_size) + const char *input, int size, char *output, int output_size) { unsigned long value; @@ -159,7 +159,7 @@ BF_encode(char *dst, const BF_word *src, int size) char * _crypt_gensalt_blowfish_rn(unsigned long count, - const char *input, int size, char *output, int output_size) + const char *input, int size, char *output, int output_size) { if (size < 16 || output_size < 7 + 22 + 1 || (count && (count < 4 || count > 31))) diff --git a/contrib/pgcrypto/pgp-pgsql.c b/contrib/pgcrypto/pgp-pgsql.c index 058b07f0461..0984e01a14b 100644 --- a/contrib/pgcrypto/pgp-pgsql.c +++ b/contrib/pgcrypto/pgp-pgsql.c @@ -818,7 +818,7 @@ parse_key_value_arrays(ArrayType *key_array, ArrayType *val_array, if (!string_is_ascii(v)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("header key must not contain non-ASCII characters"))); + errmsg("header key must not contain non-ASCII characters"))); if (strstr(v, ": ")) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), @@ -840,7 +840,7 @@ parse_key_value_arrays(ArrayType *key_array, ArrayType *val_array, if (!string_is_ascii(v)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("header value must not contain non-ASCII characters"))); + errmsg("header value must not contain non-ASCII characters"))); if (strchr(v, '\n')) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), diff --git a/contrib/pgcrypto/px-crypt.h b/contrib/pgcrypto/px-crypt.h index 4ea72dcbc5e..696902a17c3 100644 --- a/contrib/pgcrypto/px-crypt.h +++ b/contrib/pgcrypto/px-crypt.h @@ -57,13 +57,13 @@ int px_gen_salt(const char *salt_type, char *dst, int rounds); /* crypt-gensalt.c */ char *_crypt_gensalt_traditional_rn(unsigned long count, - const char *input, int size, char *output, int output_size); + const char *input, int size, char *output, int output_size); char *_crypt_gensalt_extended_rn(unsigned long count, - const char *input, int size, char *output, int output_size); + const char *input, int size, char *output, int output_size); char *_crypt_gensalt_md5_rn(unsigned long count, - const char *input, int size, char *output, int output_size); + const char *input, int size, char *output, int output_size); char *_crypt_gensalt_blowfish_rn(unsigned long count, - const char *input, int size, char *output, int output_size); + const char *input, int size, char *output, int output_size); /* disable 'extended DES crypt' */ /* #define DISABLE_XDES */ diff --git a/contrib/pgrowlocks/pgrowlocks.c b/contrib/pgrowlocks/pgrowlocks.c index 00e2015c5c9..a50ef67b477 100644 --- a/contrib/pgrowlocks/pgrowlocks.c +++ b/contrib/pgrowlocks/pgrowlocks.c @@ -153,7 +153,7 @@ pgrowlocks(PG_FUNCTION_ARGS) values = (char **) palloc(mydata->ncolumns * sizeof(char *)); values[Atnum_tid] = (char *) DirectFunctionCall1(tidout, - PointerGetDatum(&tuple->t_self)); + PointerGetDatum(&tuple->t_self)); values[Atnum_xmax] = palloc(NCHARS * sizeof(char)); snprintf(values[Atnum_xmax], NCHARS, "%d", xmax); diff --git a/contrib/pgstattuple/pgstatapprox.c b/contrib/pgstattuple/pgstatapprox.c index c801988cc58..5bf06138a50 100644 --- a/contrib/pgstattuple/pgstatapprox.c +++ b/contrib/pgstattuple/pgstatapprox.c @@ -185,7 +185,7 @@ statapprox_heap(Relation rel, output_type *stat) stat->table_len = (uint64) nblocks * BLCKSZ; stat->tuple_count = vac_estimate_reltuples(rel, false, nblocks, scanned, - stat->tuple_count + misc_count); + stat->tuple_count + misc_count); /* * Calculate percentages if the relation has one or more pages. diff --git a/contrib/pgstattuple/pgstatindex.c b/contrib/pgstattuple/pgstatindex.c index c3a95208c12..44e322d1f9a 100644 --- a/contrib/pgstattuple/pgstatindex.c +++ b/contrib/pgstattuple/pgstatindex.c @@ -535,7 +535,7 @@ pgstatginindex_internal(Oid relid, FunctionCallInfo fcinfo) if (RELATION_IS_OTHER_TEMP(rel)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot access temporary indexes of other sessions"))); + errmsg("cannot access temporary indexes of other sessions"))); /* * Read metapage @@ -613,7 +613,7 @@ pgstathashindex(PG_FUNCTION_ARGS) if (RELATION_IS_OTHER_TEMP(rel)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot access temporary indexes of other sessions"))); + errmsg("cannot access temporary indexes of other sessions"))); /* Get the information we need from the metapage. */ memset(&stats, 0, sizeof(stats)); @@ -648,9 +648,9 @@ pgstathashindex(PG_FUNCTION_ARGS) MAXALIGN(sizeof(HashPageOpaqueData))) 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)))); else { HashPageOpaque opaque; @@ -677,7 +677,7 @@ pgstathashindex(PG_FUNCTION_ARGS) ereport(ERROR, (errcode(ERRCODE_INDEX_CORRUPTED), errmsg("unexpected page type 0x%04X in HASH index \"%s\" block %u", - opaque->hasho_flag, RelationGetRelationName(rel), + opaque->hasho_flag, RelationGetRelationName(rel), BufferGetBlockNumber(buf)))); } UnlockReleaseBuffer(buf); diff --git a/contrib/postgres_fdw/connection.c b/contrib/postgres_fdw/connection.c index 9818d2750f8..8c33dea8453 100644 --- a/contrib/postgres_fdw/connection.c +++ b/contrib/postgres_fdw/connection.c @@ -241,10 +241,10 @@ connect_pg_server(ForeignServer *server, UserMapping *user) conn = PQconnectdbParams(keywords, values, false); if (!conn || PQstatus(conn) != CONNECTION_OK) ereport(ERROR, - (errcode(ERRCODE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION), - errmsg("could not connect to server \"%s\"", - server->servername), - errdetail_internal("%s", pchomp(PQerrorMessage(conn))))); + (errcode(ERRCODE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION), + errmsg("could not connect to server \"%s\"", + server->servername), + errdetail_internal("%s", pchomp(PQerrorMessage(conn))))); /* * Check that non-superuser has used password to establish connection; @@ -253,10 +253,10 @@ connect_pg_server(ForeignServer *server, UserMapping *user) */ if (!superuser() && !PQconnectionUsedPassword(conn)) ereport(ERROR, - (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED), - errmsg("password is required"), - errdetail("Non-superuser cannot connect if the server does not request a password."), - errhint("Target server's authentication method must be changed."))); + (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED), + errmsg("password is required"), + errdetail("Non-superuser cannot connect if the server does not request a password."), + errhint("Target server's authentication method must be changed."))); /* Prepare new session for use */ configure_remote_session(conn); @@ -589,7 +589,7 @@ pgfdw_report_error(int elevel, PGresult *res, PGconn *conn, (errcode(sqlstate), message_primary ? errmsg_internal("%s", message_primary) : errmsg("could not obtain message string for remote error"), - message_detail ? errdetail_internal("%s", message_detail) : 0, + message_detail ? errdetail_internal("%s", message_detail) : 0, message_hint ? errhint("%s", message_hint) : 0, message_context ? errcontext("%s", message_context) : 0, sql ? errcontext("Remote SQL command: %s", sql) : 0)); @@ -1070,7 +1070,7 @@ pgfdw_get_cleanup_result(PGconn *conn, TimestampTz endtime, PGresult **result) /* Sleep until there's something to do */ wc = WaitLatchOrSocket(MyLatch, - WL_LATCH_SET | WL_SOCKET_READABLE | WL_TIMEOUT, + WL_LATCH_SET | WL_SOCKET_READABLE | WL_TIMEOUT, PQsocket(conn), cur_timeout, PG_WAIT_EXTENSION); ResetLatch(MyLatch); diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c index 482a3dd3016..2af83640101 100644 --- a/contrib/postgres_fdw/deparse.c +++ b/contrib/postgres_fdw/deparse.c @@ -168,7 +168,7 @@ static void deparseLockingClause(deparse_expr_cxt *context); static void appendOrderByClause(List *pathkeys, deparse_expr_cxt *context); static void appendConditions(List *exprs, deparse_expr_cxt *context); static void deparseFromExprForRel(StringInfo buf, PlannerInfo *root, - RelOptInfo *joinrel, bool use_alias, List **params_list); + RelOptInfo *joinrel, bool use_alias, List **params_list); static void deparseFromExpr(List *quals, deparse_expr_cxt *context); static void deparseRangeTblRef(StringInfo buf, PlannerInfo *root, RelOptInfo *foreignrel, bool make_subquery, @@ -728,7 +728,7 @@ foreign_expr_walker(Node *node, agg->args); sortcoltype = exprType((Node *) tle->expr); typentry = lookup_type_cache(sortcoltype, - TYPECACHE_LT_OPR | TYPECACHE_GT_OPR); + TYPECACHE_LT_OPR | TYPECACHE_GT_OPR); /* Check shippability of non-default sort operator. */ if (srt->sortop != typentry->lt_opr && srt->sortop != typentry->gt_opr && @@ -883,8 +883,8 @@ build_tlist_to_deparse(RelOptInfo *foreignrel) * required for evaluating the local conditions. */ tlist = add_to_flat_tlist(tlist, - pull_var_clause((Node *) foreignrel->reltarget->exprs, - PVC_RECURSE_PLACEHOLDERS)); + pull_var_clause((Node *) foreignrel->reltarget->exprs, + PVC_RECURSE_PLACEHOLDERS)); foreach(lc, fpinfo->local_conds) { RestrictInfo *rinfo = lfirst_node(RestrictInfo, lc); @@ -1434,7 +1434,7 @@ deparseFromExprForRel(StringInfo buf, PlannerInfo *root, RelOptInfo *foreignrel, * ((outer relation) <join type> (inner relation) ON (joinclauses)) */ appendStringInfo(buf, "(%s %s JOIN %s ON ", join_sql_o.data, - get_jointype_name(fpinfo->jointype), join_sql_i.data); + get_jointype_name(fpinfo->jointype), join_sql_i.data); /* Append join clause; (TRUE) if no join clause */ if (fpinfo->joinclauses) @@ -1596,7 +1596,7 @@ deparseInsertSql(StringInfo buf, PlannerInfo *root, appendStringInfoString(buf, " ON CONFLICT DO NOTHING"); deparseReturningList(buf, root, rtindex, rel, - rel->trigdesc && rel->trigdesc->trig_insert_after_row, + rel->trigdesc && rel->trigdesc->trig_insert_after_row, returningList, retrieved_attrs); } @@ -1638,7 +1638,7 @@ deparseUpdateSql(StringInfo buf, PlannerInfo *root, appendStringInfoString(buf, " WHERE ctid = $1"); deparseReturningList(buf, root, rtindex, rel, - rel->trigdesc && rel->trigdesc->trig_update_after_row, + rel->trigdesc && rel->trigdesc->trig_update_after_row, returningList, retrieved_attrs); } @@ -1728,7 +1728,7 @@ deparseDeleteSql(StringInfo buf, PlannerInfo *root, appendStringInfoString(buf, " WHERE ctid = $1"); deparseReturningList(buf, root, rtindex, rel, - rel->trigdesc && rel->trigdesc->trig_delete_after_row, + rel->trigdesc && rel->trigdesc->trig_delete_after_row, returningList, retrieved_attrs); } diff --git a/contrib/postgres_fdw/option.c b/contrib/postgres_fdw/option.c index ca496b9df77..67e1c59951a 100644 --- a/contrib/postgres_fdw/option.c +++ b/contrib/postgres_fdw/option.c @@ -196,7 +196,7 @@ InitPgFdwOptions(void) ereport(ERROR, (errcode(ERRCODE_FDW_OUT_OF_MEMORY), errmsg("out of memory"), - errdetail("could not get libpq's default connection options"))); + errdetail("could not get libpq's default connection options"))); /* Count how many libpq options are available. */ num_libpq_opts = 0; diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index 3d180984617..7214666e108 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -756,10 +756,10 @@ get_useful_ecs_for_relation(PlannerInfo *root, RelOptInfo *rel) */ if (bms_overlap(relids, restrictinfo->right_ec->ec_relids)) useful_eclass_list = list_append_unique_ptr(useful_eclass_list, - restrictinfo->right_ec); + restrictinfo->right_ec); else if (bms_overlap(relids, restrictinfo->left_ec->ec_relids)) useful_eclass_list = list_append_unique_ptr(useful_eclass_list, - restrictinfo->left_ec); + restrictinfo->left_ec); } return useful_eclass_list; @@ -999,9 +999,9 @@ postgresGetForeignPaths(PlannerInfo *root, arg.current = NULL; clauses = generate_implied_equalities_for_column(root, baserel, - ec_member_matches_foreign, + ec_member_matches_foreign, (void *) &arg, - baserel->lateral_referencers); + baserel->lateral_referencers); /* Done if there are no more expressions in the foreign rel */ if (arg.current == NULL) @@ -1332,7 +1332,7 @@ postgresBeginForeignScan(ForeignScanState *node, int eflags) fsstate->query = strVal(list_nth(fsplan->fdw_private, FdwScanPrivateSelectSql)); fsstate->retrieved_attrs = (List *) list_nth(fsplan->fdw_private, - FdwScanPrivateRetrievedAttrs); + FdwScanPrivateRetrievedAttrs); fsstate->fetch_size = intVal(list_nth(fsplan->fdw_private, FdwScanPrivateFetchSize)); @@ -1710,7 +1710,7 @@ postgresBeginForeignModify(ModifyTableState *mtstate, fmstate->has_returning = intVal(list_nth(fdw_private, FdwModifyPrivateHasReturning)); fmstate->retrieved_attrs = (List *) list_nth(fdw_private, - FdwModifyPrivateRetrievedAttrs); + FdwModifyPrivateRetrievedAttrs); /* Create context for per-tuple temp workspace. */ fmstate->temp_cxt = AllocSetContextCreate(estate->es_query_cxt, @@ -2311,11 +2311,11 @@ postgresBeginDirectModify(ForeignScanState *node, int eflags) dmstate->query = strVal(list_nth(fsplan->fdw_private, FdwDirectModifyPrivateUpdateSql)); dmstate->has_returning = intVal(list_nth(fsplan->fdw_private, - FdwDirectModifyPrivateHasReturning)); + FdwDirectModifyPrivateHasReturning)); dmstate->retrieved_attrs = (List *) list_nth(fsplan->fdw_private, - FdwDirectModifyPrivateRetrievedAttrs); + FdwDirectModifyPrivateRetrievedAttrs); dmstate->set_processed = intVal(list_nth(fsplan->fdw_private, - FdwDirectModifyPrivateSetProcessed)); + FdwDirectModifyPrivateSetProcessed)); /* Create context for per-tuple temp workspace. */ dmstate->temp_cxt = AllocSetContextCreate(estate->es_query_cxt, @@ -2725,8 +2725,8 @@ estimate_path_cost_size(PlannerInfo *root, /* Get number of grouping columns and possible number of groups */ numGroupCols = list_length(root->parse->groupClause); numGroups = estimate_num_groups(root, - get_sortgrouplist_exprs(root->parse->groupClause, - fpinfo->grouped_tlist), + get_sortgrouplist_exprs(root->parse->groupClause, + fpinfo->grouped_tlist), input_rows, NULL); /* @@ -3763,7 +3763,7 @@ analyze_row_processor(PGresult *res, int row, PgFdwAnalyzeState *astate) astate->rows[pos] = make_tuple_from_result_row(res, row, astate->rel, astate->attinmeta, - astate->retrieved_attrs, + astate->retrieved_attrs, NULL, astate->temp_cxt); @@ -3836,8 +3836,8 @@ postgresImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid) if (PQntuples(res) != 1) ereport(ERROR, (errcode(ERRCODE_FDW_SCHEMA_NOT_FOUND), - errmsg("schema \"%s\" is not present on foreign server \"%s\"", - stmt->remote_schema, server->servername))); + errmsg("schema \"%s\" is not present on foreign server \"%s\"", + stmt->remote_schema, server->servername))); PQclear(res); res = NULL; @@ -4205,23 +4205,23 @@ foreign_join_ok(PlannerInfo *root, RelOptInfo *joinrel, JoinType jointype, { case JOIN_INNER: fpinfo->remote_conds = list_concat(fpinfo->remote_conds, - list_copy(fpinfo_i->remote_conds)); + list_copy(fpinfo_i->remote_conds)); fpinfo->remote_conds = list_concat(fpinfo->remote_conds, - list_copy(fpinfo_o->remote_conds)); + list_copy(fpinfo_o->remote_conds)); break; case JOIN_LEFT: fpinfo->joinclauses = list_concat(fpinfo->joinclauses, - list_copy(fpinfo_i->remote_conds)); + list_copy(fpinfo_i->remote_conds)); fpinfo->remote_conds = list_concat(fpinfo->remote_conds, - list_copy(fpinfo_o->remote_conds)); + list_copy(fpinfo_o->remote_conds)); break; case JOIN_RIGHT: fpinfo->joinclauses = list_concat(fpinfo->joinclauses, - list_copy(fpinfo_o->remote_conds)); + list_copy(fpinfo_o->remote_conds)); fpinfo->remote_conds = list_concat(fpinfo->remote_conds, - list_copy(fpinfo_i->remote_conds)); + list_copy(fpinfo_i->remote_conds)); break; case JOIN_FULL: diff --git a/contrib/seg/seg.c b/contrib/seg/seg.c index 61e72937eee..4fc18130e19 100644 --- a/contrib/seg/seg.c +++ b/contrib/seg/seg.c @@ -558,7 +558,7 @@ Datum seg_same(PG_FUNCTION_ARGS) { int cmp = DatumGetInt32( - DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1))); + DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1))); PG_RETURN_BOOL(cmp == 0); } @@ -848,7 +848,7 @@ Datum seg_lt(PG_FUNCTION_ARGS) { int cmp = DatumGetInt32( - DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1))); + DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1))); PG_RETURN_BOOL(cmp < 0); } @@ -857,7 +857,7 @@ Datum seg_le(PG_FUNCTION_ARGS) { int cmp = DatumGetInt32( - DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1))); + DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1))); PG_RETURN_BOOL(cmp <= 0); } @@ -866,7 +866,7 @@ Datum seg_gt(PG_FUNCTION_ARGS) { int cmp = DatumGetInt32( - DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1))); + DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1))); PG_RETURN_BOOL(cmp > 0); } @@ -875,7 +875,7 @@ Datum seg_ge(PG_FUNCTION_ARGS) { int cmp = DatumGetInt32( - DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1))); + DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1))); PG_RETURN_BOOL(cmp >= 0); } @@ -885,7 +885,7 @@ Datum seg_different(PG_FUNCTION_ARGS) { int cmp = DatumGetInt32( - DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1))); + DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1))); PG_RETURN_BOOL(cmp != 0); } diff --git a/contrib/sepgsql/hooks.c b/contrib/sepgsql/hooks.c index 6da6a23647a..5daa60c4128 100644 --- a/contrib/sepgsql/hooks.c +++ b/contrib/sepgsql/hooks.c @@ -108,7 +108,7 @@ sepgsql_object_access(ObjectAccessType access, case DatabaseRelationId: Assert(!is_internal); sepgsql_database_post_create(objectId, - sepgsql_context_info.createdb_dtemplate); + sepgsql_context_info.createdb_dtemplate); break; case NamespaceRelationId: @@ -395,7 +395,7 @@ _PG_init(void) if (IsUnderPostmaster) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("sepgsql must be loaded via shared_preload_libraries"))); + errmsg("sepgsql must be loaded via shared_preload_libraries"))); /* * Check availability of SELinux on the platform. If disabled, we cannot diff --git a/contrib/sepgsql/label.c b/contrib/sepgsql/label.c index f55b9de1da7..cbb9249be7a 100644 --- a/contrib/sepgsql/label.c +++ b/contrib/sepgsql/label.c @@ -477,7 +477,7 @@ sepgsql_get_label(Oid classId, Oid objectId, int32 subId) if (security_get_initial_context_raw("unlabeled", &unlabeled) < 0) ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR), - errmsg("SELinux: failed to get initial security label: %m"))); + errmsg("SELinux: failed to get initial security label: %m"))); PG_TRY(); { label = pstrdup(unlabeled); @@ -510,7 +510,7 @@ sepgsql_object_relabel(const ObjectAddress *object, const char *seclabel) security_check_context_raw((security_context_t) seclabel) < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_NAME), - errmsg("SELinux: invalid security label: \"%s\"", seclabel))); + errmsg("SELinux: invalid security label: \"%s\"", seclabel))); /* * Do actual permission checks for each object classes @@ -925,7 +925,7 @@ sepgsql_restorecon(PG_FUNCTION_ARGS) if (!superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("SELinux: must be superuser to restore initial contexts"))); + errmsg("SELinux: must be superuser to restore initial contexts"))); /* * Open selabel_lookup(3) stuff. It provides a set of mapping between an @@ -945,7 +945,7 @@ sepgsql_restorecon(PG_FUNCTION_ARGS) if (!sehnd) ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR), - errmsg("SELinux: failed to initialize labeling handle: %m"))); + errmsg("SELinux: failed to initialize labeling handle: %m"))); PG_TRY(); { exec_object_restorecon(sehnd, DatabaseRelationId); diff --git a/contrib/sepgsql/proc.c b/contrib/sepgsql/proc.c index 73564edaa79..14faa5fac60 100644 --- a/contrib/sepgsql/proc.c +++ b/contrib/sepgsql/proc.c @@ -106,7 +106,7 @@ sepgsql_proc_post_create(Oid functionId) initStringInfo(&audit_name); nsp_name = get_namespace_name(proForm->pronamespace); appendStringInfo(&audit_name, "%s(", - quote_qualified_identifier(nsp_name, NameStr(proForm->proname))); + quote_qualified_identifier(nsp_name, NameStr(proForm->proname))); for (i = 0; i < proForm->pronargs; i++) { if (i > 0) diff --git a/contrib/sepgsql/uavc.c b/contrib/sepgsql/uavc.c index ffb00716c62..f0915918dba 100644 --- a/contrib/sepgsql/uavc.c +++ b/contrib/sepgsql/uavc.c @@ -182,7 +182,7 @@ sepgsql_avc_unlabeled(void) if (security_get_initial_context_raw("unlabeled", &unlabeled) < 0) ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR), - errmsg("SELinux: failed to get initial security label: %m"))); + errmsg("SELinux: failed to get initial security label: %m"))); PG_TRY(); { avc_unlabeled = MemoryContextStrdup(avc_mem_cxt, unlabeled); diff --git a/contrib/spi/refint.c b/contrib/spi/refint.c index 692d99ca5b3..46205c76136 100644 --- a/contrib/spi/refint.c +++ b/contrib/spi/refint.c @@ -175,7 +175,7 @@ check_primary_key(PG_FUNCTION_ARGS) for (i = 0; i < nkeys; i++) { snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), "%s = $%d %s", - args[i + nkeys + 1], i + 1, (i < nkeys - 1) ? "and " : ""); + args[i + nkeys + 1], i + 1, (i < nkeys - 1) ? "and " : ""); } /* Prepare plan for query */ diff --git a/contrib/sslinfo/sslinfo.c b/contrib/sslinfo/sslinfo.c index 42846436eb5..5ba3988e270 100644 --- a/contrib/sslinfo/sslinfo.c +++ b/contrib/sslinfo/sslinfo.c @@ -484,8 +484,8 @@ ssl_extension_info(PG_FUNCTION_ARGS) if (nid == NID_undef) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("unknown OpenSSL extension in certificate at position %d", - call_cntr))); + errmsg("unknown OpenSSL extension in certificate at position %d", + call_cntr))); values[0] = CStringGetTextDatum(OBJ_nid2sn(nid)); nulls[0] = false; diff --git a/contrib/tablefunc/tablefunc.c b/contrib/tablefunc/tablefunc.c index b5e1ad29e2e..0bc8177b61b 100644 --- a/contrib/tablefunc/tablefunc.c +++ b/contrib/tablefunc/tablefunc.c @@ -684,7 +684,7 @@ crosstab_hash(PG_FUNCTION_ARGS) crosstab_hash, tupdesc, per_query_ctx, - rsinfo->allowedModes & SFRM_Materialize_Random); + rsinfo->allowedModes & SFRM_Materialize_Random); /* * SFRM_Materialize mode expects us to return a NULL Datum. The actual @@ -1046,7 +1046,7 @@ connectby_text(PG_FUNCTION_ARGS) show_branch, show_serial, per_query_ctx, - rsinfo->allowedModes & SFRM_Materialize_Random, + rsinfo->allowedModes & SFRM_Materialize_Random, attinmeta); rsinfo->setDesc = tupdesc; @@ -1126,7 +1126,7 @@ connectby_text_serial(PG_FUNCTION_ARGS) show_branch, show_serial, per_query_ctx, - rsinfo->allowedModes & SFRM_Materialize_Random, + rsinfo->allowedModes & SFRM_Materialize_Random, attinmeta); rsinfo->setDesc = tupdesc; @@ -1475,17 +1475,17 @@ validateConnectbyTupleDesc(TupleDesc tupdesc, bool show_branch, bool show_serial if (show_branch && show_serial && tupdesc->attrs[4]->atttypid != INT4OID) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("query-specified return tuple not valid for Connectby: " - "fifth column must be type %s", - format_type_be(INT4OID)))); + errmsg("query-specified return tuple not valid for Connectby: " + "fifth column must be type %s", + format_type_be(INT4OID)))); /* check that the type of the fifth column is INT4 */ if (!show_branch && show_serial && tupdesc->attrs[3]->atttypid != INT4OID) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("query-specified return tuple not valid for Connectby: " - "fourth column must be type %s", - format_type_be(INT4OID)))); + errmsg("query-specified return tuple not valid for Connectby: " + "fourth column must be type %s", + format_type_be(INT4OID)))); /* OK, the tupdesc is valid for our purposes */ } @@ -1525,8 +1525,8 @@ compatConnectbyTupleDescs(TupleDesc ret_tupdesc, TupleDesc sql_tupdesc) errmsg("invalid return type"), errdetail("SQL key field type %s does " \ "not match return key field type %s.", - format_type_with_typemod(ret_atttypid, ret_atttypmod), - format_type_with_typemod(sql_atttypid, sql_atttypmod)))); + format_type_with_typemod(ret_atttypid, ret_atttypmod), + format_type_with_typemod(sql_atttypid, sql_atttypmod)))); ret_atttypid = ret_tupdesc->attrs[1]->atttypid; sql_atttypid = sql_tupdesc->attrs[1]->atttypid; @@ -1539,8 +1539,8 @@ compatConnectbyTupleDescs(TupleDesc ret_tupdesc, TupleDesc sql_tupdesc) errmsg("invalid return type"), errdetail("SQL parent key field type %s does " \ "not match return parent key field type %s.", - format_type_with_typemod(ret_atttypid, ret_atttypmod), - format_type_with_typemod(sql_atttypid, sql_atttypmod)))); + format_type_with_typemod(ret_atttypid, ret_atttypmod), + format_type_with_typemod(sql_atttypid, sql_atttypmod)))); /* OK, the two tupdescs are compatible for our purposes */ } diff --git a/contrib/tcn/tcn.c b/contrib/tcn/tcn.c index 5106d424b40..0b9acbf8488 100644 --- a/contrib/tcn/tcn.c +++ b/contrib/tcn/tcn.c @@ -73,7 +73,7 @@ triggered_change_notification(PG_FUNCTION_ARGS) if (!CALLED_AS_TRIGGER(fcinfo)) ereport(ERROR, (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), - errmsg("triggered_change_notification: must be called as trigger"))); + errmsg("triggered_change_notification: must be called as trigger"))); /* and that it's called after the change */ if (!TRIGGER_FIRED_AFTER(trigdata->tg_event)) diff --git a/contrib/test_decoding/test_decoding.c b/contrib/test_decoding/test_decoding.c index 21cfd673c66..a1a7c2ae0cc 100644 --- a/contrib/test_decoding/test_decoding.c +++ b/contrib/test_decoding/test_decoding.c @@ -126,8 +126,8 @@ pg_decode_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt, else if (!parse_bool(strVal(elem->arg), &data->include_xids)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("could not parse value \"%s\" for parameter \"%s\"", - strVal(elem->arg), elem->defname))); + errmsg("could not parse value \"%s\" for parameter \"%s\"", + strVal(elem->arg), elem->defname))); } else if (strcmp(elem->defname, "include-timestamp") == 0) { @@ -136,8 +136,8 @@ pg_decode_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt, else if (!parse_bool(strVal(elem->arg), &data->include_timestamp)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("could not parse value \"%s\" for parameter \"%s\"", - strVal(elem->arg), elem->defname))); + errmsg("could not parse value \"%s\" for parameter \"%s\"", + strVal(elem->arg), elem->defname))); } else if (strcmp(elem->defname, "force-binary") == 0) { @@ -148,8 +148,8 @@ pg_decode_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt, else if (!parse_bool(strVal(elem->arg), &force_binary)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("could not parse value \"%s\" for parameter \"%s\"", - strVal(elem->arg), elem->defname))); + errmsg("could not parse value \"%s\" for parameter \"%s\"", + strVal(elem->arg), elem->defname))); if (force_binary) opt->output_type = OUTPUT_PLUGIN_BINARY_OUTPUT; @@ -162,8 +162,8 @@ pg_decode_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt, else if (!parse_bool(strVal(elem->arg), &data->skip_empty_xacts)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("could not parse value \"%s\" for parameter \"%s\"", - strVal(elem->arg), elem->defname))); + errmsg("could not parse value \"%s\" for parameter \"%s\"", + strVal(elem->arg), elem->defname))); } else if (strcmp(elem->defname, "only-local") == 0) { @@ -173,8 +173,8 @@ pg_decode_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt, else if (!parse_bool(strVal(elem->arg), &data->only_local)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("could not parse value \"%s\" for parameter \"%s\"", - strVal(elem->arg), elem->defname))); + errmsg("could not parse value \"%s\" for parameter \"%s\"", + strVal(elem->arg), elem->defname))); } else { @@ -421,8 +421,8 @@ pg_decode_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn, appendStringInfoString(ctx->out, quote_qualified_identifier( get_namespace_name( - get_rel_namespace(RelationGetRelid(relation))), - NameStr(class_form->relname))); + get_rel_namespace(RelationGetRelid(relation))), + NameStr(class_form->relname))); appendStringInfoChar(ctx->out, ':'); switch (change->action) diff --git a/contrib/unaccent/unaccent.c b/contrib/unaccent/unaccent.c index 6a34cfd3edf..e08cca1707f 100644 --- a/contrib/unaccent/unaccent.c +++ b/contrib/unaccent/unaccent.c @@ -67,7 +67,7 @@ placeChar(TrieChar *node, const unsigned char *str, int lenstr, if (curnode->replaceTo) ereport(WARNING, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("duplicate source strings, first one will be used"))); + errmsg("duplicate source strings, first one will be used"))); else { curnode->replacelen = replacelen; @@ -389,9 +389,9 @@ unaccent_dict(PG_FUNCTION_ARGS) dict = lookup_ts_dictionary_cache(dictOid); res = (TSLexeme *) DatumGetPointer(FunctionCall4(&(dict->lexize), - PointerGetDatum(dict->dictData), - PointerGetDatum(VARDATA_ANY(str)), - Int32GetDatum(VARSIZE_ANY_EXHDR(str)), + PointerGetDatum(dict->dictData), + PointerGetDatum(VARDATA_ANY(str)), + Int32GetDatum(VARSIZE_ANY_EXHDR(str)), PointerGetDatum(NULL))); PG_FREE_IF_COPY(str, strArg); diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c index a48818d944a..95e580df088 100644 --- a/contrib/xml2/xpath.c +++ b/contrib/xml2/xpath.c @@ -187,7 +187,7 @@ pgxmlNodeSetToText(xmlNodeSetPtr nodeset, if (plainsep != NULL) { xmlBufferWriteCHAR(buf, - xmlXPathCastNodeToString(nodeset->nodeTab[i])); + xmlXPathCastNodeToString(nodeset->nodeTab[i])); /* If this isn't the last entry, write the plain sep. */ if (i < (nodeset->nodeNr) - 1) @@ -579,8 +579,8 @@ xpath_table(PG_FUNCTION_ARGS) if (!(rsinfo->allowedModes & SFRM_Materialize)) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("xpath_table requires Materialize mode, but it is not " - "allowed in this context"))); + errmsg("xpath_table requires Materialize mode, but it is not " + "allowed in this context"))); /* * The tuplestore must exist in a higher context than this function call diff --git a/contrib/xml2/xslt_proc.c b/contrib/xml2/xslt_proc.c index fb49b98f5a1..2189bca86ff 100644 --- a/contrib/xml2/xslt_proc.c +++ b/contrib/xml2/xslt_proc.c @@ -219,7 +219,7 @@ parse_params(text *paramstr) { max_params *= 2; params = (const char **) repalloc(params, - (max_params + 1) * sizeof(char *)); + (max_params + 1) * sizeof(char *)); } params[nparams++] = pos; pos = strstr(pos, nvsep); |