Skip to content

Commit de94e2a

Browse files
committed
Run pgindent on a batch of (mostly-planner-related) source files.
Getting annoyed at the amount of unrelated chatter I get from pgindent'ing Rowley's unique-joins patch. Re-indent all the files it touches.
1 parent d25379e commit de94e2a

File tree

14 files changed

+118
-114
lines changed

14 files changed

+118
-114
lines changed

contrib/postgres_fdw/postgres_fdw.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,9 @@ static void postgresEndForeignModify(EState *estate,
317317
ResultRelInfo *resultRelInfo);
318318
static int postgresIsForeignRelUpdatable(Relation rel);
319319
static bool postgresPlanDirectModify(PlannerInfo *root,
320-
ModifyTable *plan,
321-
Index resultRelation,
322-
int subplan_index);
320+
ModifyTable *plan,
321+
Index resultRelation,
322+
int subplan_index);
323323
static void postgresBeginDirectModify(ForeignScanState *node, int eflags);
324324
static TupleTableSlot *postgresIterateDirectModify(ForeignScanState *node);
325325
static void postgresEndDirectModify(ForeignScanState *node);
@@ -331,7 +331,7 @@ static void postgresExplainForeignModify(ModifyTableState *mtstate,
331331
int subplan_index,
332332
ExplainState *es);
333333
static void postgresExplainDirectModify(ForeignScanState *node,
334-
ExplainState *es);
334+
ExplainState *es);
335335
static bool postgresAnalyzeForeignTable(Relation relation,
336336
AcquireSampleRowsFunc *func,
337337
BlockNumber *totalpages);
@@ -2101,8 +2101,8 @@ postgresPlanDirectModify(PlannerInfo *root,
21012101
int col;
21022102

21032103
/*
2104-
* We transmit only columns that were explicitly targets of the UPDATE,
2105-
* so as to avoid unnecessary data transmission.
2104+
* We transmit only columns that were explicitly targets of the
2105+
* UPDATE, so as to avoid unnecessary data transmission.
21062106
*/
21072107
col = -1;
21082108
while ((col = bms_next_member(rte->updatedCols, col)) >= 0)
@@ -2242,17 +2242,17 @@ postgresBeginDirectModify(ForeignScanState *node, int eflags)
22422242
dmstate->conn = GetConnection(user, false);
22432243

22442244
/* Initialize state variable */
2245-
dmstate->num_tuples = -1; /* -1 means not set yet */
2245+
dmstate->num_tuples = -1; /* -1 means not set yet */
22462246

22472247
/* Get private info created by planner functions. */
22482248
dmstate->query = strVal(list_nth(fsplan->fdw_private,
22492249
FdwDirectModifyPrivateUpdateSql));
22502250
dmstate->has_returning = intVal(list_nth(fsplan->fdw_private,
2251-
FdwDirectModifyPrivateHasReturning));
2251+
FdwDirectModifyPrivateHasReturning));
22522252
dmstate->retrieved_attrs = (List *) list_nth(fsplan->fdw_private,
2253-
FdwDirectModifyPrivateRetrievedAttrs);
2253+
FdwDirectModifyPrivateRetrievedAttrs);
22542254
dmstate->set_processed = intVal(list_nth(fsplan->fdw_private,
2255-
FdwDirectModifyPrivateSetProcessed));
2255+
FdwDirectModifyPrivateSetProcessed));
22562256

22572257
/* Create context for per-tuple temp workspace. */
22582258
dmstate->temp_cxt = AllocSetContextCreate(estate->es_query_cxt,
@@ -3911,10 +3911,10 @@ foreign_join_ok(PlannerInfo *root, RelOptInfo *joinrel, JoinType jointype,
39113911
List *otherclauses;
39123912

39133913
/*
3914-
* Core code may call GetForeignJoinPaths hook even when the join
3915-
* relation doesn't have a valid user mapping associated with it. See
3916-
* build_join_rel() for details. We can't push down such join, since
3917-
* there doesn't exist a user mapping which can be used to connect to the
3914+
* Core code may call GetForeignJoinPaths hook even when the join relation
3915+
* doesn't have a valid user mapping associated with it. See
3916+
* build_join_rel() for details. We can't push down such join, since there
3917+
* doesn't exist a user mapping which can be used to connect to the
39183918
* foreign server.
39193919
*/
39203920
if (!OidIsValid(joinrel->umid))

src/backend/commands/explain.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ void
574574
ExplainPrintPlan(ExplainState *es, QueryDesc *queryDesc)
575575
{
576576
Bitmapset *rels_used = NULL;
577-
PlanState *ps;
577+
PlanState *ps;
578578

579579
Assert(queryDesc->plannedstmt != NULL);
580580
es->pstmt = queryDesc->plannedstmt;
@@ -1333,7 +1333,7 @@ ExplainNode(PlanState *planstate, List *ancestors,
13331333
break;
13341334
case T_Gather:
13351335
{
1336-
Gather *gather = (Gather *) plan;
1336+
Gather *gather = (Gather *) plan;
13371337

13381338
show_scan_qual(plan->qual, "Filter", planstate, ancestors, es);
13391339
if (plan->qual)
@@ -1343,7 +1343,7 @@ ExplainNode(PlanState *planstate, List *ancestors,
13431343
gather->num_workers, es);
13441344
if (gather->single_copy)
13451345
ExplainPropertyText("Single Copy",
1346-
gather->single_copy ? "true" : "false",
1346+
gather->single_copy ? "true" : "false",
13471347
es);
13481348
}
13491349
break;
@@ -1514,8 +1514,8 @@ ExplainNode(PlanState *planstate, List *ancestors,
15141514
appendStringInfo(es->str, "Worker %d: ", n);
15151515
if (es->timing)
15161516
appendStringInfo(es->str,
1517-
"actual time=%.3f..%.3f rows=%.0f loops=%.0f\n",
1518-
startup_sec, total_sec, rows, nloops);
1517+
"actual time=%.3f..%.3f rows=%.0f loops=%.0f\n",
1518+
startup_sec, total_sec, rows, nloops);
15191519
else
15201520
appendStringInfo(es->str,
15211521
"actual rows=%.0f loops=%.0f\n",
@@ -1671,6 +1671,7 @@ show_plan_tlist(PlanState *planstate, List *ancestors, ExplainState *es)
16711671
return;
16721672
if (IsA(plan, RecursiveUnion))
16731673
return;
1674+
16741675
/*
16751676
* Likewise for ForeignScan that executes a direct INSERT/UPDATE/DELETE
16761677
*
@@ -2329,7 +2330,7 @@ show_buffer_usage(ExplainState *es, const BufferUsage *usage)
23292330
bool has_temp = (usage->temp_blks_read > 0 ||
23302331
usage->temp_blks_written > 0);
23312332
bool has_timing = (!INSTR_TIME_IS_ZERO(usage->blk_read_time) ||
2332-
!INSTR_TIME_IS_ZERO(usage->blk_write_time));
2333+
!INSTR_TIME_IS_ZERO(usage->blk_write_time));
23332334

23342335
/* Show only positive counter values. */
23352336
if (has_shared || has_local || has_temp)
@@ -2393,10 +2394,10 @@ show_buffer_usage(ExplainState *es, const BufferUsage *usage)
23932394
appendStringInfoString(es->str, "I/O Timings:");
23942395
if (!INSTR_TIME_IS_ZERO(usage->blk_read_time))
23952396
appendStringInfo(es->str, " read=%0.3f",
2396-
INSTR_TIME_GET_MILLISEC(usage->blk_read_time));
2397+
INSTR_TIME_GET_MILLISEC(usage->blk_read_time));
23972398
if (!INSTR_TIME_IS_ZERO(usage->blk_write_time))
23982399
appendStringInfo(es->str, " write=%0.3f",
2399-
INSTR_TIME_GET_MILLISEC(usage->blk_write_time));
2400+
INSTR_TIME_GET_MILLISEC(usage->blk_write_time));
24002401
appendStringInfoChar(es->str, '\n');
24012402
}
24022403
}

src/backend/nodes/copyfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4203,7 +4203,7 @@ _copyList(const List *from)
42034203
static ExtensibleNode *
42044204
_copyExtensibleNode(const ExtensibleNode *from)
42054205
{
4206-
ExtensibleNode *newnode;
4206+
ExtensibleNode *newnode;
42074207
const ExtensibleNodeMethods *methods;
42084208

42094209
methods = GetExtensibleNodeMethods(from->extnodename, false);

src/backend/nodes/equalfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ _equalPlaceHolderInfo(const PlaceHolderInfo *a, const PlaceHolderInfo *b)
879879
static bool
880880
_equalExtensibleNode(const ExtensibleNode *a, const ExtensibleNode *b)
881881
{
882-
const ExtensibleNodeMethods *methods;
882+
const ExtensibleNodeMethods *methods;
883883

884884
COMPARE_STRING_FIELD(extnodename);
885885

src/backend/nodes/outfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2332,7 +2332,7 @@ _outPlannerParamItem(StringInfo str, const PlannerParamItem *node)
23322332
static void
23332333
_outExtensibleNode(StringInfo str, const ExtensibleNode *node)
23342334
{
2335-
const ExtensibleNodeMethods *methods;
2335+
const ExtensibleNodeMethods *methods;
23362336

23372337
methods = GetExtensibleNodeMethods(node->extnodename, false);
23382338

src/backend/optimizer/path/costsize.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
* plan nodes below the LIMIT node) are set without regard to any LIMIT, so
4848
* that this equation works properly. (Note: while path->rows is never zero
4949
* for ordinary relations, it is zero for paths for provably-empty relations,
50-
* so beware of division-by-zero.) The LIMIT is applied as a top-level
50+
* so beware of division-by-zero.) The LIMIT is applied as a top-level
5151
* plan node.
5252
*
5353
* For largely historical reasons, most of the routines in this module use
@@ -231,8 +231,8 @@ cost_seqscan(Path *path, PlannerInfo *root,
231231
/* Adjust costing for parallelism, if used. */
232232
if (path->parallel_degree > 0)
233233
{
234-
double parallel_divisor = path->parallel_degree;
235-
double leader_contribution;
234+
double parallel_divisor = path->parallel_degree;
235+
double leader_contribution;
236236

237237
/*
238238
* Early experience with parallel query suggests that when there is

src/backend/optimizer/path/joinpath.c

Lines changed: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,12 @@ try_nestloop_path(PlannerInfo *root,
348348
*/
349349
static void
350350
try_partial_nestloop_path(PlannerInfo *root,
351-
RelOptInfo *joinrel,
352-
Path *outer_path,
353-
Path *inner_path,
354-
List *pathkeys,
355-
JoinType jointype,
356-
JoinPathExtraData *extra)
351+
RelOptInfo *joinrel,
352+
Path *outer_path,
353+
Path *inner_path,
354+
List *pathkeys,
355+
JoinType jointype,
356+
JoinPathExtraData *extra)
357357
{
358358
JoinCostWorkspace workspace;
359359

@@ -373,8 +373,8 @@ try_partial_nestloop_path(PlannerInfo *root,
373373
}
374374

375375
/*
376-
* Before creating a path, get a quick lower bound on what it is likely
377-
* to cost. Bail out right away if it looks terrible.
376+
* Before creating a path, get a quick lower bound on what it is likely to
377+
* cost. Bail out right away if it looks terrible.
378378
*/
379379
initial_cost_nestloop(root, &workspace, jointype,
380380
outer_path, inner_path,
@@ -384,17 +384,17 @@ try_partial_nestloop_path(PlannerInfo *root,
384384

385385
/* Might be good enough to be worth trying, so let's try it. */
386386
add_partial_path(joinrel, (Path *)
387-
create_nestloop_path(root,
388-
joinrel,
389-
jointype,
390-
&workspace,
391-
extra->sjinfo,
392-
&extra->semifactors,
393-
outer_path,
394-
inner_path,
395-
extra->restrictlist,
396-
pathkeys,
397-
NULL));
387+
create_nestloop_path(root,
388+
joinrel,
389+
jointype,
390+
&workspace,
391+
extra->sjinfo,
392+
&extra->semifactors,
393+
outer_path,
394+
inner_path,
395+
extra->restrictlist,
396+
pathkeys,
397+
NULL));
398398
}
399399

400400
/*
@@ -571,8 +571,8 @@ try_partial_hashjoin_path(PlannerInfo *root,
571571
}
572572

573573
/*
574-
* Before creating a path, get a quick lower bound on what it is likely
575-
* to cost. Bail out right away if it looks terrible.
574+
* Before creating a path, get a quick lower bound on what it is likely to
575+
* cost. Bail out right away if it looks terrible.
576576
*/
577577
initial_cost_hashjoin(root, &workspace, jointype, hashclauses,
578578
outer_path, inner_path,
@@ -582,17 +582,17 @@ try_partial_hashjoin_path(PlannerInfo *root,
582582

583583
/* Might be good enough to be worth trying, so let's try it. */
584584
add_partial_path(joinrel, (Path *)
585-
create_hashjoin_path(root,
586-
joinrel,
587-
jointype,
588-
&workspace,
589-
extra->sjinfo,
590-
&extra->semifactors,
591-
outer_path,
592-
inner_path,
593-
extra->restrictlist,
594-
NULL,
595-
hashclauses));
585+
create_hashjoin_path(root,
586+
joinrel,
587+
jointype,
588+
&workspace,
589+
extra->sjinfo,
590+
&extra->semifactors,
591+
outer_path,
592+
inner_path,
593+
extra->restrictlist,
594+
NULL,
595+
hashclauses));
596596
}
597597

598598
/*
@@ -1189,11 +1189,11 @@ match_unsorted_outer(PlannerInfo *root,
11891189
}
11901190

11911191
/*
1192-
* If the joinrel is parallel-safe and the join type supports nested loops,
1193-
* we may be able to consider a partial nestloop plan. However, we can't
1194-
* handle JOIN_UNIQUE_OUTER, because the outer path will be partial, and
1195-
* therefore we won't be able to properly guarantee uniqueness. Nor can
1196-
* we handle extra_lateral_rels, since partial paths must not be
1192+
* If the joinrel is parallel-safe and the join type supports nested
1193+
* loops, we may be able to consider a partial nestloop plan. However, we
1194+
* can't handle JOIN_UNIQUE_OUTER, because the outer path will be partial,
1195+
* and therefore we won't be able to properly guarantee uniqueness. Nor
1196+
* can we handle extra_lateral_rels, since partial paths must not be
11971197
* parameterized.
11981198
*/
11991199
if (joinrel->consider_parallel && nestjoinOK &&
@@ -1235,10 +1235,10 @@ consider_parallel_nestloop(PlannerInfo *root,
12351235
outerpath->pathkeys);
12361236

12371237
/*
1238-
* Try the cheapest parameterized paths; only those which will
1239-
* produce an unparameterized path when joined to this outerrel
1240-
* will survive try_partial_nestloop_path. The cheapest
1241-
* unparameterized path is also in this list.
1238+
* Try the cheapest parameterized paths; only those which will produce
1239+
* an unparameterized path when joined to this outerrel will survive
1240+
* try_partial_nestloop_path. The cheapest unparameterized path is
1241+
* also in this list.
12421242
*/
12431243
foreach(lc2, innerrel->cheapest_parameterized_paths)
12441244
{
@@ -1250,16 +1250,17 @@ consider_parallel_nestloop(PlannerInfo *root,
12501250

12511251
/*
12521252
* Like match_unsorted_outer, we only consider a single nestloop
1253-
* path when the jointype is JOIN_UNIQUE_INNER. But we have to scan
1254-
* cheapest_parameterized_paths to find the one we want to consider,
1255-
* because cheapest_total_path might not be parallel-safe.
1253+
* path when the jointype is JOIN_UNIQUE_INNER. But we have to
1254+
* scan cheapest_parameterized_paths to find the one we want to
1255+
* consider, because cheapest_total_path might not be
1256+
* parallel-safe.
12561257
*/
12571258
if (jointype == JOIN_UNIQUE_INNER)
12581259
{
12591260
if (!bms_is_empty(PATH_REQ_OUTER(innerpath)))
12601261
continue;
12611262
innerpath = (Path *) create_unique_path(root, innerrel,
1262-
innerpath, extra->sjinfo);
1263+
innerpath, extra->sjinfo);
12631264
Assert(innerpath);
12641265
}
12651266

@@ -1456,8 +1457,8 @@ hash_inner_and_outer(PlannerInfo *root,
14561457
outerrel->partial_pathlist != NIL &&
14571458
bms_is_empty(joinrel->lateral_relids))
14581459
{
1459-
Path *cheapest_partial_outer;
1460-
Path *cheapest_safe_inner = NULL;
1460+
Path *cheapest_partial_outer;
1461+
Path *cheapest_safe_inner = NULL;
14611462

14621463
cheapest_partial_outer =
14631464
(Path *) linitial(outerrel->partial_pathlist);

src/backend/optimizer/plan/planmain.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ query_planner(PlannerInfo *root, List *tlist,
7070
final_rel = build_empty_join_rel(root);
7171

7272
/*
73-
* If query allows parallelism in general, check whether the quals
74-
* are parallel-restricted. There's currently no real benefit to
75-
* setting this flag correctly because we can't yet reference subplans
76-
* from parallel workers. But that might change someday, so set this
73+
* If query allows parallelism in general, check whether the quals are
74+
* parallel-restricted. There's currently no real benefit to setting
75+
* this flag correctly because we can't yet reference subplans from
76+
* parallel workers. But that might change someday, so set this
7777
* correctly anyway.
7878
*/
7979
if (root->glob->parallelModeOK)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy