Commit de94e2af authored by Tom Lane's avatar Tom Lane

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.
parent d25379eb
......@@ -2101,8 +2101,8 @@ postgresPlanDirectModify(PlannerInfo *root,
int col;
/*
* We transmit only columns that were explicitly targets of the UPDATE,
* so as to avoid unnecessary data transmission.
* We transmit only columns that were explicitly targets of the
* UPDATE, so as to avoid unnecessary data transmission.
*/
col = -1;
while ((col = bms_next_member(rte->updatedCols, col)) >= 0)
......@@ -3911,10 +3911,10 @@ foreign_join_ok(PlannerInfo *root, RelOptInfo *joinrel, JoinType jointype,
List *otherclauses;
/*
* Core code may call GetForeignJoinPaths hook even when the join
* relation doesn't have a valid user mapping associated with it. See
* build_join_rel() for details. We can't push down such join, since
* there doesn't exist a user mapping which can be used to connect to the
* Core code may call GetForeignJoinPaths hook even when the join relation
* doesn't have a valid user mapping associated with it. See
* build_join_rel() for details. We can't push down such join, since there
* doesn't exist a user mapping which can be used to connect to the
* foreign server.
*/
if (!OidIsValid(joinrel->umid))
......
......@@ -1671,6 +1671,7 @@ show_plan_tlist(PlanState *planstate, List *ancestors, ExplainState *es)
return;
if (IsA(plan, RecursiveUnion))
return;
/*
* Likewise for ForeignScan that executes a direct INSERT/UPDATE/DELETE
*
......
......@@ -373,8 +373,8 @@ try_partial_nestloop_path(PlannerInfo *root,
}
/*
* Before creating a path, get a quick lower bound on what it is likely
* to cost. Bail out right away if it looks terrible.
* Before creating a path, get a quick lower bound on what it is likely to
* cost. Bail out right away if it looks terrible.
*/
initial_cost_nestloop(root, &workspace, jointype,
outer_path, inner_path,
......@@ -571,8 +571,8 @@ try_partial_hashjoin_path(PlannerInfo *root,
}
/*
* Before creating a path, get a quick lower bound on what it is likely
* to cost. Bail out right away if it looks terrible.
* Before creating a path, get a quick lower bound on what it is likely to
* cost. Bail out right away if it looks terrible.
*/
initial_cost_hashjoin(root, &workspace, jointype, hashclauses,
outer_path, inner_path,
......@@ -1189,11 +1189,11 @@ match_unsorted_outer(PlannerInfo *root,
}
/*
* If the joinrel is parallel-safe and the join type supports nested loops,
* we may be able to consider a partial nestloop plan. However, we can't
* handle JOIN_UNIQUE_OUTER, because the outer path will be partial, and
* therefore we won't be able to properly guarantee uniqueness. Nor can
* we handle extra_lateral_rels, since partial paths must not be
* If the joinrel is parallel-safe and the join type supports nested
* loops, we may be able to consider a partial nestloop plan. However, we
* can't handle JOIN_UNIQUE_OUTER, because the outer path will be partial,
* and therefore we won't be able to properly guarantee uniqueness. Nor
* can we handle extra_lateral_rels, since partial paths must not be
* parameterized.
*/
if (joinrel->consider_parallel && nestjoinOK &&
......@@ -1235,10 +1235,10 @@ consider_parallel_nestloop(PlannerInfo *root,
outerpath->pathkeys);
/*
* Try the cheapest parameterized paths; only those which will
* produce an unparameterized path when joined to this outerrel
* will survive try_partial_nestloop_path. The cheapest
* unparameterized path is also in this list.
* Try the cheapest parameterized paths; only those which will produce
* an unparameterized path when joined to this outerrel will survive
* try_partial_nestloop_path. The cheapest unparameterized path is
* also in this list.
*/
foreach(lc2, innerrel->cheapest_parameterized_paths)
{
......@@ -1250,9 +1250,10 @@ consider_parallel_nestloop(PlannerInfo *root,
/*
* Like match_unsorted_outer, we only consider a single nestloop
* path when the jointype is JOIN_UNIQUE_INNER. But we have to scan
* cheapest_parameterized_paths to find the one we want to consider,
* because cheapest_total_path might not be parallel-safe.
* path when the jointype is JOIN_UNIQUE_INNER. But we have to
* scan cheapest_parameterized_paths to find the one we want to
* consider, because cheapest_total_path might not be
* parallel-safe.
*/
if (jointype == JOIN_UNIQUE_INNER)
{
......
......@@ -70,10 +70,10 @@ query_planner(PlannerInfo *root, List *tlist,
final_rel = build_empty_join_rel(root);
/*
* If query allows parallelism in general, check whether the quals
* are parallel-restricted. There's currently no real benefit to
* setting this flag correctly because we can't yet reference subplans
* from parallel workers. But that might change someday, so set this
* If query allows parallelism in general, check whether the quals are
* parallel-restricted. There's currently no real benefit to setting
* this flag correctly because we can't yet reference subplans from
* parallel workers. But that might change someday, so set this
* correctly anyway.
*/
if (root->glob->parallelModeOK)
......
......@@ -175,8 +175,8 @@ build_simple_rel(PlannerInfo *root, int relid, RelOptKind reloptkind)
/*
* This should match what ExecCheckRTEPerms() does.
*
* Note that if the plan ends up depending on the user OID in any
* way - e.g. if it depends on the computed user mapping OID - we must
* Note that if the plan ends up depending on the user OID in any way
* - e.g. if it depends on the computed user mapping OID - we must
* ensure that it gets invalidated in the case of a user OID change.
* See RevalidateCachedQuery and more generally the hasForeignJoin
* flags in PlannerGlobal and PlannedStmt.
......@@ -434,16 +434,16 @@ build_join_rel(PlannerInfo *root,
/*
* Set up foreign-join fields if outer and inner relation are foreign
* tables (or joins) belonging to the same server and using the same
* user mapping.
* tables (or joins) belonging to the same server and using the same user
* mapping.
*
* Otherwise those fields are left invalid, so FDW API will not be called
* for the join relation.
*
* For FDWs like file_fdw, which ignore user mapping, the user mapping id
* associated with the joining relation may be invalid. A valid serverid
* distinguishes between a pushed down join with no user mapping and
* a join which can not be pushed down because of user mapping mismatch.
* distinguishes between a pushed down join with no user mapping and a
* join which can not be pushed down because of user mapping mismatch.
*/
if (OidIsValid(outer_rel->serverid) &&
inner_rel->serverid == outer_rel->serverid &&
......
......@@ -1887,7 +1887,7 @@ flatten_grouping_sets(Node *expr, bool toplevel, bool *hasGroupingSets)
Node *n2 = flatten_grouping_sets(n1, false, NULL);
if (IsA(n1, GroupingSet) &&
((GroupingSet *)n1)->kind == GROUPING_SET_SETS)
((GroupingSet *) n1)->kind == GROUPING_SET_SETS)
{
result_set = list_concat(result_set, (List *) n2);
}
......
......@@ -524,7 +524,8 @@ typedef struct RelOptInfo
/* Information about foreign tables and foreign joins */
Oid serverid; /* identifies server for the table or join */
Oid umid; /* identifies user mapping for the table or join */
Oid umid; /* identifies user mapping for the table or
* join */
/* use "struct FdwRoutine" to avoid including fdwapi.h here */
struct FdwRoutine *fdwroutine;
void *fdw_private;
......
......@@ -55,6 +55,7 @@ extern ForeignScan *make_foreignscan(List *qptlist, List *qpqual,
extern Plan *materialize_finished_plan(Plan *subplan);
extern bool is_projection_capable_path(Path *path);
extern bool is_projection_capable_plan(Plan *plan);
/* External use of these functions is deprecated: */
extern Sort *make_sort_from_sortclauses(List *sortcls, Plan *lefttree);
extern Agg *make_agg(List *tlist, List *qual, AggStrategy aggstrategy,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment