diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2021-05-12 13:14:10 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2021-05-12 13:14:10 -0400 |
commit | def5b065ff22a16a80084587613599fe15627213 (patch) | |
tree | 13f424449b7fb90c85659071b6adf4e27ae6d272 /src/backend/executor | |
parent | e6ccd1ce1644d1b40b7981f8bc172394de524f99 (diff) | |
download | postgresql-def5b065ff22a16a80084587613599fe15627213.tar.gz postgresql-def5b065ff22a16a80084587613599fe15627213.zip |
Initial pgindent and pgperltidy run for v14.
Also "make reformat-dat-files".
The only change worthy of note is that pgindent messed up the formatting
of launcher.c's struct LogicalRepWorkerId, which led me to notice that
that struct wasn't used at all anymore, so I just took it out.
Diffstat (limited to 'src/backend/executor')
-rw-r--r-- | src/backend/executor/execAmi.c | 1 | ||||
-rw-r--r-- | src/backend/executor/execAsync.c | 4 | ||||
-rw-r--r-- | src/backend/executor/execMain.c | 4 | ||||
-rw-r--r-- | src/backend/executor/execPartition.c | 4 | ||||
-rw-r--r-- | src/backend/executor/nodeAgg.c | 21 | ||||
-rw-r--r-- | src/backend/executor/nodeAppend.c | 16 | ||||
-rw-r--r-- | src/backend/executor/nodeGather.c | 4 | ||||
-rw-r--r-- | src/backend/executor/nodeGatherMerge.c | 6 | ||||
-rw-r--r-- | src/backend/executor/nodeIncrementalSort.c | 4 | ||||
-rw-r--r-- | src/backend/executor/nodeModifyTable.c | 66 |
10 files changed, 66 insertions, 64 deletions
diff --git a/src/backend/executor/execAmi.c b/src/backend/executor/execAmi.c index b3726a54f37..10f0b349b58 100644 --- a/src/backend/executor/execAmi.c +++ b/src/backend/executor/execAmi.c @@ -427,6 +427,7 @@ ExecSupportsMarkRestore(Path *pathnode) { case T_IndexScan: case T_IndexOnlyScan: + /* * Not all index types support mark/restore. */ diff --git a/src/backend/executor/execAsync.c b/src/backend/executor/execAsync.c index 75108d36be2..94a284a31e1 100644 --- a/src/backend/executor/execAsync.c +++ b/src/backend/executor/execAsync.c @@ -26,7 +26,7 @@ void ExecAsyncRequest(AsyncRequest *areq) { if (areq->requestee->chgParam != NULL) /* something changed? */ - ExecReScan(areq->requestee); /* let ReScan handle this */ + ExecReScan(areq->requestee); /* let ReScan handle this */ /* must provide our own instrumentation support */ if (areq->requestee->instrument) @@ -124,7 +124,7 @@ ExecAsyncResponse(AsyncRequest *areq) default: /* If the node doesn't support async, caller messed up. */ elog(ERROR, "unrecognized node type: %d", - (int) nodeTag(areq->requestor)); + (int) nodeTag(areq->requestor)); } } diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 58b49687350..b3ce4bae530 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -132,8 +132,8 @@ ExecutorStart(QueryDesc *queryDesc, int eflags) /* * In some cases (e.g. an EXECUTE statement) a query execution will skip * parse analysis, which means that the query_id won't be reported. Note - * that it's harmless to report the query_id multiple time, as the call will - * be ignored if the top level query_id has already been reported. + * that it's harmless to report the query_id multiple time, as the call + * will be ignored if the top level query_id has already been reported. */ pgstat_report_query_id(queryDesc->plannedstmt->queryId, false); diff --git a/src/backend/executor/execPartition.c b/src/backend/executor/execPartition.c index 8e2feafd28c..606c920b068 100644 --- a/src/backend/executor/execPartition.c +++ b/src/backend/executor/execPartition.c @@ -917,8 +917,8 @@ ExecInitRoutingInfo(ModifyTableState *mtstate, partRelInfo->ri_FdwRoutine->BeginForeignInsert(mtstate, partRelInfo); /* - * Determine if the FDW supports batch insert and determine the batch - * size (a FDW may support batching, but it may be disabled for the + * Determine if the FDW supports batch insert and determine the batch size + * (a FDW may support batching, but it may be disabled for the * server/table or for this particular query). * * If the FDW does not support batching, we set the batch size to 1. diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index d80adc519dd..8440a76fbdc 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -349,7 +349,7 @@ typedef struct HashAggSpill int64 *ntuples; /* number of tuples in each partition */ uint32 mask; /* mask to find partition from hash value */ int shift; /* after masking, shift by this amount */ - hyperLogLogState *hll_card; /* cardinality estimate for contents */ + hyperLogLogState *hll_card; /* cardinality estimate for contents */ } HashAggSpill; /* @@ -374,9 +374,9 @@ typedef struct HashAggBatch /* used to find referenced colnos */ typedef struct FindColsContext { - bool is_aggref; /* is under an aggref */ - Bitmapset *aggregated; /* column references under an aggref */ - Bitmapset *unaggregated; /* other column references */ + bool is_aggref; /* is under an aggref */ + Bitmapset *aggregated; /* column references under an aggref */ + Bitmapset *unaggregated; /* other column references */ } FindColsContext; static void select_current_set(AggState *aggstate, int setno, bool is_hash); @@ -1397,7 +1397,7 @@ project_aggregates(AggState *aggstate) static void find_cols(AggState *aggstate, Bitmapset **aggregated, Bitmapset **unaggregated) { - Agg *agg = (Agg *) aggstate->ss.ps.plan; + Agg *agg = (Agg *) aggstate->ss.ps.plan; FindColsContext context; context.is_aggref = false; @@ -1579,7 +1579,8 @@ find_hash_columns(AggState *aggstate) for (int i = 0; i < scanDesc->natts; i++) { - int colno = i + 1; + int colno = i + 1; + if (bms_is_member(colno, aggstate->colnos_needed)) aggstate->max_colno_needed = colno; else @@ -3158,10 +3159,10 @@ hashagg_spill_finish(AggState *aggstate, HashAggSpill *spill, int setno) for (i = 0; i < spill->npartitions; i++) { - LogicalTapeSet *tapeset = aggstate->hash_tapeinfo->tapeset; - int tapenum = spill->partitions[i]; - HashAggBatch *new_batch; - double cardinality; + LogicalTapeSet *tapeset = aggstate->hash_tapeinfo->tapeset; + int tapenum = spill->partitions[i]; + HashAggBatch *new_batch; + double cardinality; /* if the partition is empty, don't create a new batch of work */ if (spill->ntuples[i] == 0) diff --git a/src/backend/executor/nodeAppend.c b/src/backend/executor/nodeAppend.c index 1558fafad1e..62335ed4c47 100644 --- a/src/backend/executor/nodeAppend.c +++ b/src/backend/executor/nodeAppend.c @@ -566,9 +566,9 @@ choose_next_subplan_locally(AppendState *node) /* * If first call then have the bms member function choose the first valid - * sync subplan by initializing whichplan to -1. If there happen to be - * no valid sync subplans then the bms member function will handle that - * by returning a negative number which will allow us to exit returning a + * sync subplan by initializing whichplan to -1. If there happen to be no + * valid sync subplans then the bms member function will handle that by + * returning a negative number which will allow us to exit returning a * false value. */ if (whichplan == INVALID_SUBPLAN_INDEX) @@ -925,8 +925,8 @@ ExecAppendAsyncGetNext(AppendState *node, TupleTableSlot **result) /* * If all sync subplans are complete, we're totally done scanning the - * given node. Otherwise, we're done with the asynchronous stuff but - * must continue scanning the sync subplans. + * given node. Otherwise, we're done with the asynchronous stuff but must + * continue scanning the sync subplans. */ if (node->as_syncdone) { @@ -1003,7 +1003,7 @@ ExecAppendAsyncEventWait(AppendState *node) { int nevents = node->as_nasyncplans + 1; long timeout = node->as_syncdone ? -1 : 0; - WaitEvent occurred_event[EVENT_BUFFER_SIZE]; + WaitEvent occurred_event[EVENT_BUFFER_SIZE]; int noccurred; int i; @@ -1054,8 +1054,8 @@ ExecAppendAsyncEventWait(AppendState *node) /* * Mark it as no longer needing a callback. We must do this - * before dispatching the callback in case the callback resets - * the flag. + * before dispatching the callback in case the callback resets the + * flag. */ Assert(areq->callback_pending); areq->callback_pending = false; diff --git a/src/backend/executor/nodeGather.c b/src/backend/executor/nodeGather.c index 9e1dc464cb0..734142b7b16 100644 --- a/src/backend/executor/nodeGather.c +++ b/src/backend/executor/nodeGather.c @@ -266,7 +266,7 @@ gather_getnext(GatherState *gatherstate) PlanState *outerPlan = outerPlanState(gatherstate); TupleTableSlot *outerTupleSlot; TupleTableSlot *fslot = gatherstate->funnel_slot; - MinimalTuple tup; + MinimalTuple tup; while (gatherstate->nreaders > 0 || gatherstate->need_to_scan_locally) { @@ -278,7 +278,7 @@ gather_getnext(GatherState *gatherstate) if (HeapTupleIsValid(tup)) { - ExecStoreMinimalTuple(tup, /* tuple to store */ + ExecStoreMinimalTuple(tup, /* tuple to store */ fslot, /* slot to store the tuple */ false); /* don't pfree tuple */ return fslot; diff --git a/src/backend/executor/nodeGatherMerge.c b/src/backend/executor/nodeGatherMerge.c index aa5743cebfc..03f02a19aab 100644 --- a/src/backend/executor/nodeGatherMerge.c +++ b/src/backend/executor/nodeGatherMerge.c @@ -700,9 +700,9 @@ gather_merge_readnext(GatherMergeState *gm_state, int reader, bool nowait) Assert(tup); /* Build the TupleTableSlot for the given tuple */ - ExecStoreMinimalTuple(tup, /* tuple to store */ - gm_state->gm_slots[reader], /* slot in which to store - * the tuple */ + ExecStoreMinimalTuple(tup, /* tuple to store */ + gm_state->gm_slots[reader], /* slot in which to + * store the tuple */ true); /* pfree tuple when done with it */ return true; diff --git a/src/backend/executor/nodeIncrementalSort.c b/src/backend/executor/nodeIncrementalSort.c index 18f246a8233..934426a6679 100644 --- a/src/backend/executor/nodeIncrementalSort.c +++ b/src/backend/executor/nodeIncrementalSort.c @@ -1162,8 +1162,8 @@ ExecReScanIncrementalSort(IncrementalSortState *node) } /* - * If chgParam of subnode is not null, then the plan will be re-scanned - * by the first ExecProcNode. + * If chgParam of subnode is not null, then the plan will be re-scanned by + * the first ExecProcNode. */ if (outerPlan->chgParam == NULL) ExecReScan(outerPlan); diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c index a62928ae7ce..0816027f7f7 100644 --- a/src/backend/executor/nodeModifyTable.c +++ b/src/backend/executor/nodeModifyTable.c @@ -61,12 +61,12 @@ typedef struct MTTargetRelLookup } MTTargetRelLookup; static void ExecBatchInsert(ModifyTableState *mtstate, - ResultRelInfo *resultRelInfo, - TupleTableSlot **slots, - TupleTableSlot **planSlots, - int numSlots, - EState *estate, - bool canSetTag); + ResultRelInfo *resultRelInfo, + TupleTableSlot **slots, + TupleTableSlot **planSlots, + int numSlots, + EState *estate, + bool canSetTag); static bool ExecOnConflictUpdate(ModifyTableState *mtstate, ResultRelInfo *resultRelInfo, ItemPointer conflictTid, @@ -673,17 +673,17 @@ ExecInsert(ModifyTableState *mtstate, if (resultRelInfo->ri_BatchSize > 1) { /* - * If a certain number of tuples have already been accumulated, - * or a tuple has come for a different relation than that for - * the accumulated tuples, perform the batch insert + * If a certain number of tuples have already been accumulated, or + * a tuple has come for a different relation than that for the + * accumulated tuples, perform the batch insert */ if (resultRelInfo->ri_NumSlots == resultRelInfo->ri_BatchSize) { ExecBatchInsert(mtstate, resultRelInfo, - resultRelInfo->ri_Slots, - resultRelInfo->ri_PlanSlots, - resultRelInfo->ri_NumSlots, - estate, canSetTag); + resultRelInfo->ri_Slots, + resultRelInfo->ri_PlanSlots, + resultRelInfo->ri_NumSlots, + estate, canSetTag); resultRelInfo->ri_NumSlots = 0; } @@ -692,9 +692,9 @@ ExecInsert(ModifyTableState *mtstate, if (resultRelInfo->ri_Slots == NULL) { resultRelInfo->ri_Slots = palloc(sizeof(TupleTableSlot *) * - resultRelInfo->ri_BatchSize); + resultRelInfo->ri_BatchSize); resultRelInfo->ri_PlanSlots = palloc(sizeof(TupleTableSlot *) * - resultRelInfo->ri_BatchSize); + resultRelInfo->ri_BatchSize); } resultRelInfo->ri_Slots[resultRelInfo->ri_NumSlots] = @@ -982,12 +982,12 @@ ExecInsert(ModifyTableState *mtstate, */ static void ExecBatchInsert(ModifyTableState *mtstate, - ResultRelInfo *resultRelInfo, - TupleTableSlot **slots, - TupleTableSlot **planSlots, - int numSlots, - EState *estate, - bool canSetTag) + ResultRelInfo *resultRelInfo, + TupleTableSlot **slots, + TupleTableSlot **planSlots, + int numSlots, + EState *estate, + bool canSetTag) { int i; int numInserted = numSlots; @@ -998,10 +998,10 @@ ExecBatchInsert(ModifyTableState *mtstate, * insert into foreign table: let the FDW do it */ rslots = resultRelInfo->ri_FdwRoutine->ExecForeignBatchInsert(estate, - resultRelInfo, - slots, - planSlots, - &numInserted); + resultRelInfo, + slots, + planSlots, + &numInserted); for (i = 0; i < numInserted; i++) { @@ -2604,10 +2604,10 @@ ExecModifyTable(PlanState *pstate) resultRelInfo = lfirst(lc); if (resultRelInfo->ri_NumSlots > 0) ExecBatchInsert(node, resultRelInfo, - resultRelInfo->ri_Slots, - resultRelInfo->ri_PlanSlots, - resultRelInfo->ri_NumSlots, - estate, node->canSetTag); + resultRelInfo->ri_Slots, + resultRelInfo->ri_PlanSlots, + resultRelInfo->ri_NumSlots, + estate, node->canSetTag); } /* @@ -3091,12 +3091,12 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags) mtstate->mt_resultOidHash = NULL; /* - * Determine if the FDW supports batch insert and determine the batch - * size (a FDW may support batching, but it may be disabled for the + * Determine if the FDW supports batch insert and determine the batch size + * (a FDW may support batching, but it may be disabled for the * server/table). * - * We only do this for INSERT, so that for UPDATE/DELETE the batch - * size remains set to 0. + * We only do this for INSERT, so that for UPDATE/DELETE the batch size + * remains set to 0. */ if (operation == CMD_INSERT) { |