mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
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.
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user