diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2020-01-30 13:42:14 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2020-01-30 13:42:14 -0300 |
commit | c9d29775195922136c09cc980bb1b7091bf3d859 (patch) | |
tree | 2a7ffae1890975a24c18aa92f6dfe5307051492a /src | |
parent | 4e89c79a52f8a898edd648b56a00f0f4f840cfe7 (diff) |
Clean up newlines following left parentheses
We used to strategically place newlines after some function call left
parentheses to make pgindent move the argument list a few chars to the
left, so that the whole line would fit under 80 chars. However,
pgindent no longer does that, so the newlines just made the code
vertically longer for no reason. Remove those newlines, and reflow some
of those lines for some extra naturality.
Reviewed-by: Michael Paquier, Tom Lane
Discussion: https://postgr.es/m/20200129200401.GA6303@alvherre.pgsql
Diffstat (limited to 'src')
44 files changed, 123 insertions, 211 deletions
diff --git a/src/backend/access/gin/ginlogic.c b/src/backend/access/gin/ginlogic.c index 64bc2415bba..bcbc26efdb6 100644 --- a/src/backend/access/gin/ginlogic.c +++ b/src/backend/access/gin/ginlogic.c @@ -94,8 +94,7 @@ directBoolConsistentFn(GinScanKey key) static GinTernaryValue directTriConsistentFn(GinScanKey key) { - return DatumGetGinTernaryValue(FunctionCall7Coll( - key->triConsistentFmgrInfo, + return DatumGetGinTernaryValue(FunctionCall7Coll(key->triConsistentFmgrInfo, key->collation, PointerGetDatum(key->entryRes), UInt16GetDatum(key->strategy), @@ -116,8 +115,7 @@ shimBoolConsistentFn(GinScanKey key) { GinTernaryValue result; - result = DatumGetGinTernaryValue(FunctionCall7Coll( - key->triConsistentFmgrInfo, + result = DatumGetGinTernaryValue(FunctionCall7Coll(key->triConsistentFmgrInfo, key->collation, PointerGetDatum(key->entryRes), UInt16GetDatum(key->strategy), diff --git a/src/backend/access/gist/gistproc.c b/src/backend/access/gist/gistproc.c index 6ba5619644f..9ace64c3c4a 100644 --- a/src/backend/access/gist/gistproc.c +++ b/src/backend/access/gist/gistproc.c @@ -1377,8 +1377,7 @@ gist_point_consistent(PG_FUNCTION_ARGS) { POLYGON *query = PG_GETARG_POLYGON_P(1); - result = DatumGetBool(DirectFunctionCall5( - gist_poly_consistent, + result = DatumGetBool(DirectFunctionCall5(gist_poly_consistent, PointerGetDatum(entry), PolygonPGetDatum(query), Int16GetDatum(RTOverlapStrategyNumber), @@ -1394,8 +1393,7 @@ gist_point_consistent(PG_FUNCTION_ARGS) Assert(box->high.x == box->low.x && box->high.y == box->low.y); - result = DatumGetBool(DirectFunctionCall2( - poly_contain_pt, + result = DatumGetBool(DirectFunctionCall2(poly_contain_pt, PolygonPGetDatum(query), PointPGetDatum(&box->high))); *recheck = false; @@ -1406,8 +1404,7 @@ gist_point_consistent(PG_FUNCTION_ARGS) { CIRCLE *query = PG_GETARG_CIRCLE_P(1); - result = DatumGetBool(DirectFunctionCall5( - gist_circle_consistent, + result = DatumGetBool(DirectFunctionCall5(gist_circle_consistent, PointerGetDatum(entry), CirclePGetDatum(query), Int16GetDatum(RTOverlapStrategyNumber), @@ -1423,8 +1420,7 @@ 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, + result = DatumGetBool(DirectFunctionCall2(circle_contain_pt, CirclePGetDatum(query), PointPGetDatum(&box->high))); *recheck = false; diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 854136e9fa3..db6fad76bc4 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -4282,8 +4282,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), + !TransactionIdEquals(HeapTupleHeaderGetRawXmax(tuple->t_data), xwait)) goto l3; /* otherwise, we're good */ diff --git a/src/backend/access/rmgrdesc/xactdesc.c b/src/backend/access/rmgrdesc/xactdesc.c index e388cc714af..fbc5942578b 100644 --- a/src/backend/access/rmgrdesc/xactdesc.c +++ b/src/backend/access/rmgrdesc/xactdesc.c @@ -295,9 +295,9 @@ xact_desc_commit(StringInfo buf, uint8 info, xl_xact_commit *xlrec, RepOriginId xact_desc_relations(buf, "rels", parsed.nrels, parsed.xnodes); xact_desc_subxacts(buf, parsed.nsubxacts, parsed.subxacts); - standby_desc_invalidations( - buf, parsed.nmsgs, parsed.msgs, parsed.dbId, parsed.tsId, - XactCompletionRelcacheInitFileInval(parsed.xinfo)); + standby_desc_invalidations(buf, parsed.nmsgs, parsed.msgs, parsed.dbId, + parsed.tsId, + XactCompletionRelcacheInitFileInval(parsed.xinfo)); if (XactCompletionForceSyncCommit(parsed.xinfo)) appendStringInfoString(buf, "; sync"); @@ -344,9 +344,8 @@ xact_desc_prepare(StringInfo buf, uint8 info, xl_xact_prepare *xlrec) parsed.abortnodes); xact_desc_subxacts(buf, parsed.nsubxacts, parsed.subxacts); - standby_desc_invalidations( - buf, parsed.nmsgs, parsed.msgs, parsed.dbId, parsed.tsId, - xlrec->initfileinval); + standby_desc_invalidations(buf, parsed.nmsgs, parsed.msgs, parsed.dbId, + parsed.tsId, xlrec->initfileinval); } static void diff --git a/src/backend/access/spgist/spgscan.c b/src/backend/access/spgist/spgscan.c index c264aef7ea3..4d506bfb9a9 100644 --- a/src/backend/access/spgist/spgscan.c +++ b/src/backend/access/spgist/spgscan.c @@ -650,8 +650,7 @@ spgInnerTest(SpGistScanOpaque so, SpGistSearchItem *item, { /* collect node pointers */ SpGistNodeTuple node; - SpGistNodeTuple *nodes = (SpGistNodeTuple *) palloc( - sizeof(SpGistNodeTuple) * nNodes); + SpGistNodeTuple *nodes = (SpGistNodeTuple *) palloc(sizeof(SpGistNodeTuple) * nNodes); SGITITERATE(innerTuple, i, node) { diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 017f03b6d8c..e3c60f23cd2 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -5779,22 +5779,19 @@ xact_redo_commit(xl_xact_parsed_commit *parsed, * bits set on changes made by transactions that haven't yet * recovered. It's unlikely but it's good to be safe. */ - TransactionIdAsyncCommitTree( - xid, parsed->nsubxacts, parsed->subxacts, lsn); + TransactionIdAsyncCommitTree(xid, parsed->nsubxacts, parsed->subxacts, lsn); /* * We must mark clog before we update the ProcArray. */ - ExpireTreeKnownAssignedTransactionIds( - xid, parsed->nsubxacts, parsed->subxacts, max_xid); + ExpireTreeKnownAssignedTransactionIds(xid, parsed->nsubxacts, parsed->subxacts, max_xid); /* * Send any cache invalidations attached to the commit. We must * maintain the same order of invalidation then release locks as * occurs in CommitTransaction(). */ - ProcessCommittedInvalidationMessages( - parsed->msgs, parsed->nmsgs, + ProcessCommittedInvalidationMessages(parsed->msgs, parsed->nmsgs, XactCompletionRelcacheInitFileInval(parsed->xinfo), parsed->dbId, parsed->tsId); @@ -5908,8 +5905,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); + ExpireTreeKnownAssignedTransactionIds(xid, parsed->nsubxacts, parsed->subxacts, max_xid); /* * There are no invalidation messages to send or undo. diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index 0fdff2918f7..709df9035fb 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -2256,8 +2256,7 @@ StoreAttrDefault(Relation rel, AttrNumber attnum, else { /* otherwise make a one-element array of the value */ - missingval = PointerGetDatum( - construct_array(&missingval, + missingval = PointerGetDatum(construct_array(&missingval, 1, defAttStruct->atttypid, defAttStruct->attlen, diff --git a/src/backend/commands/event_trigger.c b/src/backend/commands/event_trigger.c index 6d4154af508..71911d4067b 100644 --- a/src/backend/commands/event_trigger.c +++ b/src/backend/commands/event_trigger.c @@ -2163,8 +2163,7 @@ pg_event_trigger_ddl_commands(PG_FUNCTION_ARGS) /* command tag */ values[i++] = CStringGetTextDatum(CreateCommandTag(cmd->parsetree)); /* object_type */ - values[i++] = CStringGetTextDatum(stringify_adefprivs_objtype( - cmd->d.defprivs.objtype)); + values[i++] = CStringGetTextDatum(stringify_adefprivs_objtype(cmd->d.defprivs.objtype)); /* schema */ nulls[i++] = true; /* identity */ @@ -2186,8 +2185,7 @@ pg_event_trigger_ddl_commands(PG_FUNCTION_ARGS) values[i++] = CStringGetTextDatum(cmd->d.grant.istmt->is_grant ? "GRANT" : "REVOKE"); /* object_type */ - values[i++] = CStringGetTextDatum(stringify_grant_objtype( - cmd->d.grant.istmt->objtype)); + values[i++] = CStringGetTextDatum(stringify_grant_objtype(cmd->d.grant.istmt->objtype)); /* schema */ nulls[i++] = true; /* identity */ diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index c3cda680683..f5993934736 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -11481,8 +11481,7 @@ ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel, attTup->attbyval, attTup->attalign, &isNull); - missingval = PointerGetDatum( - construct_array(&missingval, + missingval = PointerGetDatum(construct_array(&missingval, 1, targettype, tform->typlen, diff --git a/src/backend/executor/execExprInterp.c b/src/backend/executor/execExprInterp.c index f901baf1ed3..061752ea9c1 100644 --- a/src/backend/executor/execExprInterp.c +++ b/src/backend/executor/execExprInterp.c @@ -3816,8 +3816,7 @@ ExecEvalXmlExpr(ExprState *state, ExprEvalStep *op) return; value = argvalue[0]; - *op->resvalue = PointerGetDatum( - xmltotext_with_xmloption(DatumGetXmlP(value), + *op->resvalue = PointerGetDatum(xmltotext_with_xmloption(DatumGetXmlP(value), xexpr->xmloption)); *op->resnull = false; } @@ -4174,8 +4173,7 @@ ExecAggInitGroup(AggState *aggstate, AggStatePerTrans pertrans, AggStatePerGroup * that the agg's input type is binary-compatible with its transtype, so * straight copy here is OK.) */ - oldContext = MemoryContextSwitchTo( - aggstate->curaggcontext->ecxt_per_tuple_memory); + oldContext = MemoryContextSwitchTo(aggstate->curaggcontext->ecxt_per_tuple_memory); pergroup->transValue = datumCopy(fcinfo->args[1].value, pertrans->transtypeByVal, pertrans->transtypeLen); diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index 7b8cb91f04d..9073395eacf 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -475,8 +475,7 @@ initialize_aggregate(AggState *aggstate, AggStatePerTrans pertrans, { MemoryContext oldContext; - oldContext = MemoryContextSwitchTo( - aggstate->curaggcontext->ecxt_per_tuple_memory); + oldContext = MemoryContextSwitchTo(aggstate->curaggcontext->ecxt_per_tuple_memory); pergroupstate->transValue = datumCopy(pertrans->initValue, pertrans->transtypeByVal, pertrans->transtypeLen); @@ -582,8 +581,7 @@ advance_transition_function(AggState *aggstate, * We must copy the datum into aggcontext if it is pass-by-ref. We * do not need to pfree the old transValue, since it's NULL. */ - oldContext = MemoryContextSwitchTo( - aggstate->curaggcontext->ecxt_per_tuple_memory); + oldContext = MemoryContextSwitchTo(aggstate->curaggcontext->ecxt_per_tuple_memory); pergroupstate->transValue = datumCopy(fcinfo->args[1].value, pertrans->transtypeByVal, pertrans->transtypeLen); diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index bd8c7f58119..c4f5a553ac4 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -188,8 +188,7 @@ static int pg_GSS_recvauth(Port *port); */ #ifdef ENABLE_SSPI typedef SECURITY_STATUS - (WINAPI * QUERY_SECURITY_CONTEXT_TOKEN_FN) ( - PCtxtHandle, void **); + (WINAPI * QUERY_SECURITY_CONTEXT_TOKEN_FN) (PCtxtHandle, void **); static int pg_SSPI_recvauth(Port *port); static int pg_SSPI_make_upn(char *accountname, size_t accountnamesize, @@ -1147,8 +1146,7 @@ pg_GSS_recvauth(Port *port) elog(DEBUG4, "processing received GSS token of length %u", (unsigned int) gbuf.length); - maj_stat = gss_accept_sec_context( - &min_stat, + maj_stat = gss_accept_sec_context(&min_stat, &port->gss->ctx, port->gss->cred, &gbuf, diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c index 7d2756e2347..db54a6ba2ea 100644 --- a/src/backend/optimizer/path/joinpath.c +++ b/src/backend/optimizer/path/joinpath.c @@ -1538,8 +1538,7 @@ match_unsorted_outer(PlannerInfo *root, if (save_jointype == JOIN_UNIQUE_INNER) return; - inner_cheapest_total = get_cheapest_parallel_safe_total_inner( - innerrel->pathlist); + inner_cheapest_total = get_cheapest_parallel_safe_total_inner(innerrel->pathlist); } if (inner_cheapest_total) diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index dff826a8280..e048d200bb4 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -5110,13 +5110,11 @@ static void bitmap_subplan_mark_shared(Plan *plan) { if (IsA(plan, BitmapAnd)) - bitmap_subplan_mark_shared( - linitial(((BitmapAnd *) plan)->bitmapplans)); + bitmap_subplan_mark_shared(linitial(((BitmapAnd *) plan)->bitmapplans)); else if (IsA(plan, BitmapOr)) { ((BitmapOr *) plan)->isshared = true; - bitmap_subplan_mark_shared( - linitial(((BitmapOr *) plan)->bitmapplans)); + bitmap_subplan_mark_shared(linitial(((BitmapOr *) plan)->bitmapplans)); } else if (IsA(plan, BitmapIndexScan)) ((BitmapIndexScan *) plan)->isshared = true; diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index 51c486bebdb..7169509a797 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -4571,14 +4571,12 @@ PgstatCollectorMain(int argc, char *argv[]) break; case PGSTAT_MTYPE_RESETSHAREDCOUNTER: - pgstat_recv_resetsharedcounter( - &msg.msg_resetsharedcounter, + pgstat_recv_resetsharedcounter(&msg.msg_resetsharedcounter, len); break; case PGSTAT_MTYPE_RESETSINGLECOUNTER: - pgstat_recv_resetsinglecounter( - &msg.msg_resetsinglecounter, + pgstat_recv_resetsinglecounter(&msg.msg_resetsinglecounter, len); break; @@ -4611,8 +4609,7 @@ PgstatCollectorMain(int argc, char *argv[]) break; case PGSTAT_MTYPE_RECOVERYCONFLICT: - pgstat_recv_recoveryconflict( - &msg.msg_recoveryconflict, + pgstat_recv_recoveryconflict(&msg.msg_recoveryconflict, len); break; @@ -4625,8 +4622,7 @@ PgstatCollectorMain(int argc, char *argv[]) break; case PGSTAT_MTYPE_CHECKSUMFAILURE: - pgstat_recv_checksum_failure( - &msg.msg_checksumfailure, + pgstat_recv_checksum_failure(&msg.msg_checksumfailure, len); break; diff --git a/src/backend/replication/logical/logicalfuncs.c b/src/backend/replication/logical/logicalfuncs.c index 8095ae4cb1e..2bba2b4f24d 100644 --- a/src/backend/replication/logical/logicalfuncs.c +++ b/src/backend/replication/logical/logicalfuncs.c @@ -90,8 +90,7 @@ LogicalOutputWrite(LogicalDecodingContext *ctx, XLogRecPtr lsn, TransactionId xi false)); /* 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)); + values[2] = PointerGetDatum(cstring_to_text_with_len(ctx->out->data, ctx->out->len)); tuplestore_putvalues(p->tupstore, p->tupdesc, values, nulls); p->returned_rows++; diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c index 73ca4f7884a..aeebbf243a5 100644 --- a/src/backend/replication/logical/reorderbuffer.c +++ b/src/backend/replication/logical/reorderbuffer.c @@ -3415,8 +3415,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)); + chunk = DatumGetPointer(fastgetattr(&ctup->tuple, 3, toast_desc, &isnull)); Assert(!isnull); Assert(!VARATT_IS_EXTERNAL(chunk)); diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 51925af6a05..bb85b5e52aa 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -2558,8 +2558,7 @@ CreateCommandTag(Node *parsetree) * When the column is renamed, the command tag is created from its * relation type */ - tag = AlterObjectTypeCommandTag( - ((RenameStmt *) parsetree)->renameType == OBJECT_COLUMN ? + tag = AlterObjectTypeCommandTag(((RenameStmt *) parsetree)->renameType == OBJECT_COLUMN ? ((RenameStmt *) parsetree)->relationType : ((RenameStmt *) parsetree)->renameType); break; diff --git a/src/backend/tsearch/dict_thesaurus.c b/src/backend/tsearch/dict_thesaurus.c index fb91a34b02b..cb0835982d8 100644 --- a/src/backend/tsearch/dict_thesaurus.c +++ b/src/backend/tsearch/dict_thesaurus.c @@ -533,15 +533,11 @@ compileTheSubstitute(DictThesaurus *d) } else { - lexized = (TSLexeme *) DatumGetPointer( - FunctionCall4( - &(d->subdict->lexize), + lexized = (TSLexeme *) DatumGetPointer(FunctionCall4(&(d->subdict->lexize), PointerGetDatum(d->subdict->dictData), PointerGetDatum(inptr->lexeme), Int32GetDatum(strlen(inptr->lexeme)), - PointerGetDatum(NULL) - ) - ); + PointerGetDatum(NULL))); } if (lexized && lexized->lexeme) diff --git a/src/backend/tsearch/to_tsany.c b/src/backend/tsearch/to_tsany.c index 1fe67c4c998..e7cd6264db2 100644 --- a/src/backend/tsearch/to_tsany.c +++ b/src/backend/tsearch/to_tsany.c @@ -49,8 +49,7 @@ compareWORD(const void *a, const void *b) { int res; - res = tsCompareString( - ((const ParsedWord *) a)->word, ((const ParsedWord *) a)->len, + res = tsCompareString(((const ParsedWord *) a)->word, ((const ParsedWord *) a)->len, ((const ParsedWord *) b)->word, ((const ParsedWord *) b)->len, false); diff --git a/src/backend/tsearch/ts_parse.c b/src/backend/tsearch/ts_parse.c index 1681621657e..1c0f94e7975 100644 --- a/src/backend/tsearch/ts_parse.c +++ b/src/backend/tsearch/ts_parse.c @@ -204,13 +204,11 @@ LexizeExec(LexizeData *ld, ParsedLex **correspondLexem) ld->dictState.isend = ld->dictState.getnext = false; ld->dictState.private_state = NULL; - res = (TSLexeme *) DatumGetPointer(FunctionCall4( - &(dict->lexize), + res = (TSLexeme *) DatumGetPointer(FunctionCall4(&(dict->lexize), PointerGetDatum(dict->dictData), PointerGetDatum(curValLemm), Int32GetDatum(curValLenLemm), - PointerGetDatum(&ld->dictState) - )); + PointerGetDatum(&ld->dictState))); if (ld->dictState.getnext) { @@ -293,13 +291,11 @@ LexizeExec(LexizeData *ld, ParsedLex **correspondLexem) ld->dictState.isend = (curVal->type == 0) ? true : false; ld->dictState.getnext = false; - res = (TSLexeme *) DatumGetPointer(FunctionCall4( - &(dict->lexize), + res = (TSLexeme *) DatumGetPointer(FunctionCall4(&(dict->lexize), PointerGetDatum(dict->dictData), PointerGetDatum(curVal->lemm), Int32GetDatum(curVal->lenlemm), - PointerGetDatum(&ld->dictState) - )); + PointerGetDatum(&ld->dictState))); if (ld->dictState.getnext) { diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index 792f9ca4fa2..f58331de75b 100644 --- a/src/backend/utils/adt/formatting.c +++ b/src/backend/utils/adt/formatting.c @@ -6217,8 +6217,7 @@ int8_to_char(PG_FUNCTION_ARGS) if (IS_ROMAN(&Num)) { /* Currently don't support int8 conversion to roman... */ - numstr = orgnum = int_to_roman(DatumGetInt32( - DirectFunctionCall1(int84, Int64GetDatum(value)))); + numstr = orgnum = int_to_roman(DatumGetInt32(DirectFunctionCall1(int84, Int64GetDatum(value)))); } else if (IS_EEEE(&Num)) { diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c index 74f899f24df..7b2da2b36f8 100644 --- a/src/backend/utils/adt/pgstatfuncs.c +++ b/src/backend/utils/adt/pgstatfuncs.c @@ -1501,8 +1501,7 @@ pg_stat_get_db_conflict_all(PG_FUNCTION_ARGS) if ((dbentry = pgstat_fetch_stat_dbentry(dbid)) == NULL) result = 0; else - result = (int64) ( - dbentry->n_conflict_tablespace + + result = (int64) (dbentry->n_conflict_tablespace + dbentry->n_conflict_lock + dbentry->n_conflict_snapshot + dbentry->n_conflict_bufferpin + @@ -1973,6 +1972,5 @@ pg_stat_get_archiver(PG_FUNCTION_ARGS) values[6] = TimestampTzGetDatum(archiver_stats->stat_reset_timestamp); /* Returns the record as Datum */ - PG_RETURN_DATUM(HeapTupleGetDatum( - heap_form_tuple(tupdesc, values, nulls))); + PG_RETURN_DATUM(HeapTupleGetDatum(heap_form_tuple(tupdesc, values, nulls))); } diff --git a/src/backend/utils/adt/rangetypes_spgist.c b/src/backend/utils/adt/rangetypes_spgist.c index 6fbd523bbb5..dd2bc742aab 100644 --- a/src/backend/utils/adt/rangetypes_spgist.c +++ b/src/backend/utils/adt/rangetypes_spgist.c @@ -346,8 +346,7 @@ spg_range_quad_inner_consistent(PG_FUNCTION_ARGS) * is RANGESTRAT_CONTAINS_ELEM. */ if (strategy != RANGESTRAT_CONTAINS_ELEM) - empty = RangeIsEmpty( - DatumGetRangeTypeP(in->scankeys[i].sk_argument)); + empty = RangeIsEmpty(DatumGetRangeTypeP(in->scankeys[i].sk_argument)); else empty = false; diff --git a/src/backend/utils/adt/rangetypes_typanalyze.c b/src/backend/utils/adt/rangetypes_typanalyze.c index fe6a75a0ca8..57413b07201 100644 --- a/src/backend/utils/adt/rangetypes_typanalyze.c +++ b/src/backend/utils/adt/rangetypes_typanalyze.c @@ -165,8 +165,7 @@ compute_range_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc, * For an ordinary range, use subdiff function between upper * and lower bound values. */ - length = DatumGetFloat8(FunctionCall2Coll( - &typcache->rng_subdiff_finfo, + length = DatumGetFloat8(FunctionCall2Coll(&typcache->rng_subdiff_finfo, typcache->rng_collation, upper.val, lower.val)); } @@ -246,8 +245,10 @@ 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)); + bound_hist_values[i] = PointerGetDatum(range_serialize(typcache, + &lowers[pos], + &uppers[pos], + false)); pos += delta; posfrac += deltafrac; if (posfrac >= (num_hist - 1)) diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index 116e00bce4e..158784474d8 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -6453,8 +6453,7 @@ get_update_query_targetlist_def(Query *query, List *targetList, { cur_ma_sublink = (SubLink *) lfirst(next_ma_cell); next_ma_cell = lnext(ma_sublinks, next_ma_cell); - remaining_ma_columns = count_nonjunk_tlist_entries( - ((Query *) cur_ma_sublink->subselect)->targetList); + remaining_ma_columns = count_nonjunk_tlist_entries(((Query *) cur_ma_sublink->subselect)->targetList); Assert(((Param *) expr)->paramid == ((cur_ma_sublink->subLinkId << 16) | 1)); appendStringInfoChar(buf, '('); diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c index ef99365b87e..0b6c9d5ea8e 100644 --- a/src/backend/utils/adt/timestamp.c +++ b/src/backend/utils/adt/timestamp.c @@ -5459,8 +5459,7 @@ generate_series_timestamp(PG_FUNCTION_ARGS) timestamp_cmp_internal(result, fctx->finish) >= 0) { /* increment current in preparation for next iteration */ - fctx->current = DatumGetTimestamp( - DirectFunctionCall2(timestamp_pl_interval, + fctx->current = DatumGetTimestamp(DirectFunctionCall2(timestamp_pl_interval, TimestampGetDatum(fctx->current), PointerGetDatum(&fctx->step))); @@ -5540,8 +5539,7 @@ generate_series_timestamptz(PG_FUNCTION_ARGS) timestamp_cmp_internal(result, fctx->finish) >= 0) { /* increment current in preparation for next iteration */ - fctx->current = DatumGetTimestampTz( - DirectFunctionCall2(timestamptz_pl_interval, + fctx->current = DatumGetTimestampTz(DirectFunctionCall2(timestamptz_pl_interval, TimestampTzGetDatum(fctx->current), PointerGetDatum(&fctx->step))); diff --git a/src/backend/utils/adt/tsgistidx.c b/src/backend/utils/adt/tsgistidx.c index 7fd32bcceb5..8320dcda800 100644 --- a/src/backend/utils/adt/tsgistidx.c +++ b/src/backend/utils/adt/tsgistidx.c @@ -704,9 +704,9 @@ gtsvector_picksplit(PG_FUNCTION_ARGS) if (ISALLTRUE(datum_l) && cache[j].allistrue) size_alpha = 0; else - size_alpha = SIGLENBIT - sizebitvec( - (cache[j].allistrue) ? GETSIGN(datum_l) : GETSIGN(cache[j].sign) - ); + size_alpha = SIGLENBIT - sizebitvec((cache[j].allistrue) ? + GETSIGN(datum_l) : + GETSIGN(cache[j].sign)); } else size_alpha = hemdistsign(cache[j].sign, GETSIGN(datum_l)); @@ -716,9 +716,9 @@ gtsvector_picksplit(PG_FUNCTION_ARGS) if (ISALLTRUE(datum_r) && cache[j].allistrue) size_beta = 0; else - size_beta = SIGLENBIT - sizebitvec( - (cache[j].allistrue) ? GETSIGN(datum_r) : GETSIGN(cache[j].sign) - ); + size_beta = SIGLENBIT - sizebitvec((cache[j].allistrue) ? + GETSIGN(datum_r) : + GETSIGN(cache[j].sign)); } else size_beta = hemdistsign(cache[j].sign, GETSIGN(datum_r)); diff --git a/src/backend/utils/adt/tsquery_op.c b/src/backend/utils/adt/tsquery_op.c index 663b434b6ab..ea40804110c 100644 --- a/src/backend/utils/adt/tsquery_op.c +++ b/src/backend/utils/adt/tsquery_op.c @@ -148,8 +148,7 @@ tsquery_phrase_distance(PG_FUNCTION_ARGS) Datum tsquery_phrase(PG_FUNCTION_ARGS) { - PG_RETURN_POINTER(DirectFunctionCall3( - tsquery_phrase_distance, + PG_RETURN_POINTER(DirectFunctionCall3(tsquery_phrase_distance, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), Int32GetDatum(1))); @@ -353,11 +352,7 @@ tsq_mcontains(PG_FUNCTION_ARGS) Datum tsq_mcontained(PG_FUNCTION_ARGS) { - PG_RETURN_DATUM( - DirectFunctionCall2( - tsq_mcontains, + PG_RETURN_DATUM(DirectFunctionCall2(tsq_mcontains, PG_GETARG_DATUM(1), - PG_GETARG_DATUM(0) - ) - ); + PG_GETARG_DATUM(0))); } diff --git a/src/backend/utils/adt/tsvector_op.c b/src/backend/utils/adt/tsvector_op.c index e33ca5abe75..cab6874e702 100644 --- a/src/backend/utils/adt/tsvector_op.c +++ b/src/backend/utils/adt/tsvector_op.c @@ -666,9 +666,7 @@ tsvector_unnest(PG_FUNCTION_ARGS) bool nulls[] = {false, false, false}; Datum values[3]; - values[0] = PointerGetDatum( - cstring_to_text_with_len(data + arrin[i].pos, arrin[i].len) - ); + values[0] = PointerGetDatum(cstring_to_text_with_len(data + arrin[i].pos, arrin[i].len)); if (arrin[i].haspos) { @@ -689,15 +687,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) - ); + weights[j] = PointerGetDatum(cstring_to_text_with_len(&weight, + 1)); } - values[1] = PointerGetDatum( - construct_array(positions, posv->npos, INT2OID, 2, true, 's')); - values[2] = PointerGetDatum( - construct_array(weights, posv->npos, TEXTOID, -1, false, 'i')); + values[1] = PointerGetDatum(construct_array(positions, posv->npos, + INT2OID, 2, true, 's')); + values[2] = PointerGetDatum(construct_array(weights, posv->npos, + TEXTOID, -1, false, 'i')); } else { @@ -730,9 +727,8 @@ 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) - ); + elements[i] = PointerGetDatum(cstring_to_text_with_len(STRPTR(tsin) + arrin[i].pos, + arrin[i].len)); } array = construct_array(elements, tsin->size, TEXTOID, -1, false, 'i'); diff --git a/src/backend/utils/misc/pg_controldata.c b/src/backend/utils/misc/pg_controldata.c index f2b49973924..419b58330fe 100644 --- a/src/backend/utils/misc/pg_controldata.c +++ b/src/backend/utils/misc/pg_controldata.c @@ -199,8 +199,7 @@ pg_control_checkpoint(PG_FUNCTION_ARGS) values[16] = TransactionIdGetDatum(ControlFile->checkPointCopy.newestCommitTsXid); nulls[16] = false; - values[17] = TimestampTzGetDatum( - time_t_to_timestamptz(ControlFile->checkPointCopy.time)); + values[17] = TimestampTzGetDatum(time_t_to_timestamptz(ControlFile->checkPointCopy.time)); nulls[17] = false; htup = heap_form_tuple(tupdesc, values, nulls); diff --git a/src/bin/pg_upgrade/tablespace.c b/src/bin/pg_upgrade/tablespace.c index eba4d835d3f..11a24297381 100644 --- a/src/bin/pg_upgrade/tablespace.c +++ b/src/bin/pg_upgrade/tablespace.c @@ -57,8 +57,8 @@ get_tablespace_paths(void) res = executeQueryOrDie(conn, "%s", query); if ((os_info.num_old_tablespaces = PQntuples(res)) != 0) - os_info.old_tablespaces = (char **) pg_malloc( - os_info.num_old_tablespaces * sizeof(char *)); + os_info.old_tablespaces = + (char **) pg_malloc(os_info.num_old_tablespaces * sizeof(char *)); else os_info.old_tablespaces = NULL; @@ -68,8 +68,7 @@ get_tablespace_paths(void) { struct stat statBuf; - os_info.old_tablespaces[tblnum] = pg_strdup( - PQgetvalue(res, tblnum, i_spclocation)); + os_info.old_tablespaces[tblnum] = pg_strdup(PQgetvalue(res, tblnum, i_spclocation)); /* * Check that the tablespace path exists and is a directory. diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index f2cbbf20230..66b47d98cbe 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -663,8 +663,7 @@ helpSQL(const char *topic, unsigned short int pager) void print_copyright(void) { - puts( - "PostgreSQL Database Management System\n" + puts("PostgreSQL Database Management System\n" "(formerly known as Postgres, then as Postgres95)\n\n" "Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group\n\n" "Portions Copyright (c) 1994, The Regents of the University of California\n\n" @@ -681,6 +680,5 @@ print_copyright(void) "INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY\n" "AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS\n" "ON AN \"AS IS\" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO\n" - "PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.\n" - ); + "PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.\n"); } diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index c57dee4e27a..2e2d217352d 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -2301,10 +2301,7 @@ PQconnectPoll(PGconn *conn) default: appendPQExpBufferStr(&conn->errorMessage, - libpq_gettext( - "invalid connection state, " - "probably indicative of memory corruption\n" - )); + libpq_gettext("invalid connection state, probably indicative of memory corruption\n")); goto error_return; } @@ -3217,9 +3214,7 @@ keep_going: /* We will come back to here until there is if (!(beresp == 'R' || beresp == 'E')) { appendPQExpBuffer(&conn->errorMessage, - libpq_gettext( - "expected authentication request from " - "server, but received %c\n"), + libpq_gettext("expected authentication request from server, but received %c\n"), beresp); goto error_return; } @@ -3250,9 +3245,7 @@ keep_going: /* We will come back to here until there is if (beresp == 'R' && (msgLength < 8 || msgLength > 2000)) { appendPQExpBuffer(&conn->errorMessage, - libpq_gettext( - "expected authentication request from " - "server, but received %c\n"), + libpq_gettext("expected authentication request from server, but received %c\n"), beresp); goto error_return; } @@ -4637,8 +4630,9 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options, p = strchr(url + strlen(LDAP_URL), '/'); if (p == NULL || *(p + 1) == '\0' || *(p + 1) == '?') { - printfPQExpBuffer(errorMessage, libpq_gettext( - "invalid LDAP URL \"%s\": missing distinguished name\n"), purl); + printfPQExpBuffer(errorMessage, + libpq_gettext("invalid LDAP URL \"%s\": missing distinguished name\n"), + purl); free(url); return 3; } @@ -4648,8 +4642,9 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options, /* attribute */ if ((p = strchr(dn, '?')) == NULL || *(p + 1) == '\0' || *(p + 1) == '?') { - printfPQExpBuffer(errorMessage, libpq_gettext( - "invalid LDAP URL \"%s\": must have exactly one attribute\n"), purl); + printfPQExpBuffer(errorMessage, + libpq_gettext("invalid LDAP URL \"%s\": must have exactly one attribute\n"), + purl); free(url); return 3; } @@ -4690,8 +4685,9 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options, lport = strtol(portstr, &endptr, 10); if (*portstr == '\0' || *endptr != '\0' || errno || lport < 0 || lport > 65535) { - printfPQExpBuffer(errorMessage, libpq_gettext( - "invalid LDAP URL \"%s\": invalid port number\n"), purl); + printfPQExpBuffer(errorMessage, + libpq_gettext("invalid LDAP URL \"%s\": invalid port number\n"), + purl); free(url); return 3; } @@ -4701,8 +4697,9 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options, /* Allow only one attribute */ if (strchr(attrs[0], ',') != NULL) { - printfPQExpBuffer(errorMessage, libpq_gettext( - "invalid LDAP URL \"%s\": must have exactly one attribute\n"), purl); + printfPQExpBuffer(errorMessage, + libpq_gettext("invalid LDAP URL \"%s\": must have exactly one attribute\n"), + purl); free(url); return 3; } @@ -4900,8 +4897,8 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options, } else if (ld_is_nl_cr(*p)) { - printfPQExpBuffer(errorMessage, libpq_gettext( - "missing \"=\" after \"%s\" in connection info string\n"), + printfPQExpBuffer(errorMessage, + libpq_gettext("missing \"=\" after \"%s\" in connection info string\n"), optname); free(result); return 3; @@ -4919,8 +4916,8 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options, } else if (!ld_is_sp_tab(*p)) { - printfPQExpBuffer(errorMessage, libpq_gettext( - "missing \"=\" after \"%s\" in connection info string\n"), + printfPQExpBuffer(errorMessage, + libpq_gettext("missing \"=\" after \"%s\" in connection info string\n"), optname); free(result); return 3; @@ -5008,8 +5005,8 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options, if (state == 5 || state == 6) { - printfPQExpBuffer(errorMessage, libpq_gettext( - "unterminated quoted string in connection info string\n")); + printfPQExpBuffer(errorMessage, + libpq_gettext("unterminated quoted string in connection info string\n")); return 3; } diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c index a9074d2f29c..19729f96311 100644 --- a/src/interfaces/libpq/fe-misc.c +++ b/src/interfaces/libpq/fe-misc.c @@ -802,8 +802,7 @@ retry4: */ definitelyEOF: printfPQExpBuffer(&conn->errorMessage, - libpq_gettext( - "server closed the connection unexpectedly\n" + libpq_gettext("server closed the connection unexpectedly\n" "\tThis probably means the server terminated abnormally\n" "\tbefore or while processing the request.\n")); diff --git a/src/interfaces/libpq/fe-protocol2.c b/src/interfaces/libpq/fe-protocol2.c index 275ecc5a0ac..9360c541bec 100644 --- a/src/interfaces/libpq/fe-protocol2.c +++ b/src/interfaces/libpq/fe-protocol2.c @@ -84,10 +84,7 @@ pqSetenvPoll(PGconn *conn) default: printfPQExpBuffer(&conn->errorMessage, - libpq_gettext( - "invalid setenv state %c, " - "probably indicative of memory corruption\n" - ), + libpq_gettext("invalid setenv state %c, probably indicative of memory corruption\n"), conn->setenv_state); goto error_return; } @@ -626,8 +623,7 @@ pqParseInput2(PGconn *conn) */ default: printfPQExpBuffer(&conn->errorMessage, - libpq_gettext( - "unexpected response from server; first received character was \"%c\"\n"), + libpq_gettext("unexpected response from server; first received character was \"%c\"\n"), id); /* build an error result holding the error message */ pqSaveErrorResult(conn); diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c index 850bf84c96a..16965254757 100644 --- a/src/interfaces/libpq/fe-protocol3.c +++ b/src/interfaces/libpq/fe-protocol3.c @@ -405,8 +405,7 @@ pqParseInput3(PGconn *conn) break; default: printfPQExpBuffer(&conn->errorMessage, - libpq_gettext( - "unexpected response from server; first received character was \"%c\"\n"), + libpq_gettext("unexpected response from server; first received character was \"%c\"\n"), id); /* build an error result holding the error message */ pqSaveErrorResult(conn); @@ -447,8 +446,7 @@ static void handleSyncLoss(PGconn *conn, char id, int msgLength) { printfPQExpBuffer(&conn->errorMessage, - libpq_gettext( - "lost synchronization with server: got message type \"%c\", length %d\n"), + libpq_gettext("lost synchronization with server: got message type \"%c\", length %d\n"), id, msgLength); /* build an error result holding the error message */ pqSaveErrorResult(conn); diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c index 026b14fa724..cf142fbaa48 100644 --- a/src/interfaces/libpq/fe-secure-openssl.c +++ b/src/interfaces/libpq/fe-secure-openssl.c @@ -206,8 +206,7 @@ rloop: if (result_errno == EPIPE || result_errno == ECONNRESET) printfPQExpBuffer(&conn->errorMessage, - libpq_gettext( - "server closed the connection unexpectedly\n" + libpq_gettext("server closed the connection unexpectedly\n" "\tThis probably means the server terminated abnormally\n" "\tbefore or while processing the request.\n")); else @@ -314,8 +313,7 @@ pgtls_write(PGconn *conn, const void *ptr, size_t len) result_errno = SOCK_ERRNO; if (result_errno == EPIPE || result_errno == ECONNRESET) printfPQExpBuffer(&conn->errorMessage, - libpq_gettext( - "server closed the connection unexpectedly\n" + libpq_gettext("server closed the connection unexpectedly\n" "\tThis probably means the server terminated abnormally\n" "\tbefore or while processing the request.\n")); else @@ -578,10 +576,8 @@ pgtls_verify_peer_name_matches_certificate_guts(PGconn *conn, if (cn_index >= 0) { (*names_examined)++; - rc = openssl_verify_peer_name_matches_certificate_name( - conn, - X509_NAME_ENTRY_get_data( - X509_NAME_get_entry(subject_name, cn_index)), + rc = openssl_verify_peer_name_matches_certificate_name(conn, + X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject_name, cn_index)), first_name); } } diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c index 52f6e8790ed..b455b45e964 100644 --- a/src/interfaces/libpq/fe-secure.c +++ b/src/interfaces/libpq/fe-secure.c @@ -264,8 +264,7 @@ pqsecure_raw_read(PGconn *conn, void *ptr, size_t len) #ifdef ECONNRESET case ECONNRESET: printfPQExpBuffer(&conn->errorMessage, - libpq_gettext( - "server closed the connection unexpectedly\n" + libpq_gettext("server closed the connection unexpectedly\n" "\tThis probably means the server terminated abnormally\n" "\tbefore or while processing the request.\n")); break; @@ -381,8 +380,7 @@ retry_masked: case ECONNRESET: #endif printfPQExpBuffer(&conn->errorMessage, - libpq_gettext( - "server closed the connection unexpectedly\n" + libpq_gettext("server closed the connection unexpectedly\n" "\tThis probably means the server terminated abnormally\n" "\tbefore or while processing the request.\n")); break; diff --git a/src/interfaces/libpq/win32.c b/src/interfaces/libpq/win32.c index 25ca38754ff..cd19ec92528 100644 --- a/src/interfaces/libpq/win32.c +++ b/src/interfaces/libpq/win32.c @@ -291,8 +291,7 @@ winsock_strerror(int err, char *strerrbuf, size_t buflen) if (!dlls[i].loaded) { dlls[i].loaded = 1; /* Only load once */ - dlls[i].handle = (void *) LoadLibraryEx( - dlls[i].dll_name, + dlls[i].handle = (void *) LoadLibraryEx(dlls[i].dll_name, 0, LOAD_LIBRARY_AS_DATAFILE); } @@ -304,13 +303,11 @@ winsock_strerror(int err, char *strerrbuf, size_t buflen) | FORMAT_MESSAGE_IGNORE_INSERTS | (dlls[i].handle ? FORMAT_MESSAGE_FROM_HMODULE : 0); - success = 0 != FormatMessage( - flags, + success = 0 != FormatMessage(flags, dlls[i].handle, err, MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT), strerrbuf, buflen - 64, - 0 - ); + 0); } if (!success) diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index c78891868a5..f5de2332d55 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -1631,11 +1631,8 @@ plperl_trigger_build_args(FunctionCallInfo fcinfo) tdata = (TriggerData *) fcinfo->context; tupdesc = tdata->tg_relation->rd_att; - relid = DatumGetCString( - DirectFunctionCall1(oidout, - ObjectIdGetDatum(tdata->tg_relation->rd_id) - ) - ); + relid = DatumGetCString(DirectFunctionCall1(oidout, + ObjectIdGetDatum(tdata->tg_relation->rd_id))); hv_store_string(hv, "name", cstr2sv(tdata->tg_trigger->tgname)); hv_store_string(hv, "relid", cstr2sv(relid)); diff --git a/src/pl/plpython/plpy_elog.c b/src/pl/plpython/plpy_elog.c index 71b433ef267..ae0b97c85d3 100644 --- a/src/pl/plpython/plpy_elog.c +++ b/src/pl/plpython/plpy_elog.c @@ -297,12 +297,10 @@ PLy_traceback(PyObject *e, PyObject *v, PyObject *tb, plain_lineno = PyInt_AsLong(lineno); if (proname == NULL) - appendStringInfo( - &tbstr, "\n PL/Python anonymous code block, line %ld, in %s", + appendStringInfo(&tbstr, "\n PL/Python anonymous code block, line %ld, in %s", plain_lineno - 1, fname); else - appendStringInfo( - &tbstr, "\n PL/Python function \"%s\", line %ld, in %s", + appendStringInfo(&tbstr, "\n PL/Python function \"%s\", line %ld, in %s", proname, plain_lineno - 1, fname); /* diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c index e7640008fdc..f0d170bec7b 100644 --- a/src/pl/tcl/pltcl.c +++ b/src/pl/tcl/pltcl.c @@ -2746,8 +2746,7 @@ pltcl_SPI_execute_plan(ClientData cdata, Tcl_Interp *interp, if (strlen(nulls) != qdesc->nargs) { Tcl_SetObjResult(interp, - Tcl_NewStringObj( - "length of nulls string doesn't match number of arguments", + Tcl_NewStringObj("length of nulls string doesn't match number of arguments", -1)); return TCL_ERROR; } @@ -2762,9 +2761,8 @@ pltcl_SPI_execute_plan(ClientData cdata, Tcl_Interp *interp, if (i >= objc) { Tcl_SetObjResult(interp, - Tcl_NewStringObj( - "argument list length doesn't match number of arguments for query" - ,-1)); + Tcl_NewStringObj("argument list length doesn't match number of arguments for query", + -1)); return TCL_ERROR; } diff --git a/src/port/gettimeofday.c b/src/port/gettimeofday.c index e11f0680526..ee8fe823378 100644 --- a/src/port/gettimeofday.c +++ b/src/port/gettimeofday.c @@ -74,8 +74,7 @@ init_gettimeofday(LPFILETIME lpSystemTimeAsFileTime) * and determining the windows version is its self somewhat Windows * version and development SDK specific... */ - pg_get_system_time = (PgGetSystemTimeFn) GetProcAddress( - GetModuleHandle(TEXT("kernel32.dll")), + pg_get_system_time = (PgGetSystemTimeFn) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetSystemTimePreciseAsFileTime"); if (pg_get_system_time == NULL) { |