1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-15 14:02:29 +03:00

Post-feature-freeze pgindent run.

Discussion: https://postgr.es/m/15719.1523984266@sss.pgh.pa.us
This commit is contained in:
Tom Lane
2018-04-26 14:47:16 -04:00
parent f83bf385c1
commit bdf46af748
167 changed files with 1174 additions and 1061 deletions

View File

@@ -963,10 +963,10 @@ set_append_rel_size(PlannerInfo *root, RelOptInfo *rel,
/*
* We need attr_needed data for building targetlist of a join
* relation representing join between matching partitions for
* partitionwise join. A given attribute of a child will be
* needed in the same highest joinrel where the corresponding
* attribute of parent is needed. Hence it suffices to use the
* same Relids set for parent and child.
* partitionwise join. A given attribute of a child will be needed
* in the same highest joinrel where the corresponding attribute
* of parent is needed. Hence it suffices to use the same Relids
* set for parent and child.
*/
for (attno = rel->min_attr; attno <= rel->max_attr; attno++)
{
@@ -2742,11 +2742,10 @@ standard_join_search(PlannerInfo *root, int levels_needed, List *initial_rels)
join_search_one_level(root, lev);
/*
* Run generate_partitionwise_join_paths() and
* generate_gather_paths() for each just-processed joinrel. We could
* not do this earlier because both regular and partial paths can get
* added to a particular joinrel at multiple times within
* join_search_one_level.
* Run generate_partitionwise_join_paths() and generate_gather_paths()
* for each just-processed joinrel. We could not do this earlier
* because both regular and partial paths can get added to a
* particular joinrel at multiple times within join_search_one_level.
*
* After that, we're done creating paths for the joinrel, so run
* set_cheapest().

View File

@@ -2696,6 +2696,7 @@ match_clause_to_ordering_op(IndexOptInfo *index,
opfamily = index->opfamily[indexcol];
idxcollation = index->indexcollations[indexcol];
/*
* Clause must be a binary opclause.
*/
@@ -3945,7 +3946,7 @@ adjust_rowcompare_for_index(RowCompareExpr *clause,
IndexCollMatchesExprColl(index->indexcollations[i],
lfirst_oid(collids_cell)))
break;
break;
}
if (i >= index->ncolumns)
break; /* no match found */

View File

@@ -41,9 +41,9 @@ static void populate_joinrel_with_paths(PlannerInfo *root, RelOptInfo *rel1,
RelOptInfo *rel2, RelOptInfo *joinrel,
SpecialJoinInfo *sjinfo, List *restrictlist);
static void try_partitionwise_join(PlannerInfo *root, RelOptInfo *rel1,
RelOptInfo *rel2, RelOptInfo *joinrel,
SpecialJoinInfo *parent_sjinfo,
List *parent_restrictlist);
RelOptInfo *rel2, RelOptInfo *joinrel,
SpecialJoinInfo *parent_sjinfo,
List *parent_restrictlist);
static int match_expr_to_partition_keys(Expr *expr, RelOptInfo *rel,
bool strict_op);
@@ -1309,8 +1309,8 @@ restriction_is_constant_false(List *restrictlist,
*/
static void
try_partitionwise_join(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2,
RelOptInfo *joinrel, SpecialJoinInfo *parent_sjinfo,
List *parent_restrictlist)
RelOptInfo *joinrel, SpecialJoinInfo *parent_sjinfo,
List *parent_restrictlist)
{
int nparts;
int cnt_parts;
@@ -1338,8 +1338,8 @@ try_partitionwise_join(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2,
joinrel->part_scheme == rel2->part_scheme);
/*
* Since we allow partitionwise join only when the partition bounds of
* the joining relations exactly match, the partition bounds of the join
* Since we allow partitionwise join only when the partition bounds of the
* joining relations exactly match, the partition bounds of the join
* should match those of the joining relations.
*/
Assert(partition_bounds_equal(joinrel->part_scheme->partnatts,

View File

@@ -6797,10 +6797,10 @@ apply_scanjoin_target_to_paths(PlannerInfo *root,
{
/*
* Since we can't generate the final scan/join target, this is our
* last opportunity to use any partial paths that exist. We don't
* do this if the case where the target is parallel-safe, since we
* will be able to generate superior paths by doing it after the
* final scan/join target has been applied.
* last opportunity to use any partial paths that exist. We don't do
* this if the case where the target is parallel-safe, since we will
* be able to generate superior paths by doing it after the final
* scan/join target has been applied.
*
* Note that this may invalidate rel->cheapest_total_path, so we must
* not rely on it after this point without first calling set_cheapest.

View File

@@ -1688,9 +1688,9 @@ expand_partitioned_rtentry(PlannerInfo *root, RangeTblEntry *parentrte,
/*
* Note down whether any partition key cols are being updated. Though it's
* the root partitioned table's updatedCols we are interested in, we
* instead use parentrte to get the updatedCols. This is convenient because
* parentrte already has the root partrel's updatedCols translated to match
* the attribute ordering of parentrel.
* instead use parentrte to get the updatedCols. This is convenient
* because parentrte already has the root partrel's updatedCols translated
* to match the attribute ordering of parentrel.
*/
if (!root->partColsUpdated)
root->partColsUpdated =

View File

@@ -1421,6 +1421,7 @@ relation_excluded_by_constraints(PlannerInfo *root,
switch (constraint_exclusion)
{
case CONSTRAINT_EXCLUSION_OFF:
/*
* Don't prune if feature turned off -- except if the relation is
* a partition. While partprune.c-style partition pruning is not
@@ -1435,6 +1436,7 @@ relation_excluded_by_constraints(PlannerInfo *root,
return false;
case CONSTRAINT_EXCLUSION_PARTITION:
/*
* When constraint_exclusion is set to 'partition' we only handle
* OTHER_MEMBER_RELs, or BASERELs in cases where the result target
@@ -1444,11 +1446,11 @@ relation_excluded_by_constraints(PlannerInfo *root,
!(rel->reloptkind == RELOPT_BASEREL &&
root->inhTargetKind != INHKIND_NONE &&
rel->relid == root->parse->resultRelation))
return false;
return false;
break;
case CONSTRAINT_EXCLUSION_ON:
break; /* always try to exclude */
break; /* always try to exclude */
}
/*