aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/optimizer')
-rw-r--r--src/backend/optimizer/path/allpaths.c17
-rw-r--r--src/backend/optimizer/path/indxpath.c3
-rw-r--r--src/backend/optimizer/path/joinrels.c14
-rw-r--r--src/backend/optimizer/plan/planner.c8
-rw-r--r--src/backend/optimizer/prep/prepunion.c6
-rw-r--r--src/backend/optimizer/util/plancat.c6
6 files changed, 28 insertions, 26 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index afc663cfd8f..477b9f7fb81 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -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().
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c
index 07d55a59ad6..f295558f767 100644
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -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 */
diff --git a/src/backend/optimizer/path/joinrels.c b/src/backend/optimizer/path/joinrels.c
index 6d41d307ead..7008e1318e4 100644
--- a/src/backend/optimizer/path/joinrels.c
+++ b/src/backend/optimizer/path/joinrels.c
@@ -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,
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index 24e6ee026e1..67a2c7a5818 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -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.
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c
index 61d0770f108..0ab4014be6d 100644
--- a/src/backend/optimizer/prep/prepunion.c
+++ b/src/backend/optimizer/prep/prepunion.c
@@ -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 =
diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c
index 6973fe34586..8369e3ad62d 100644
--- a/src/backend/optimizer/util/plancat.c
+++ b/src/backend/optimizer/util/plancat.c
@@ -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 */
}
/*