use-partitioned-not-partition-v2.patch
text/plain
Filename: use-partitioned-not-partition-v2.patch
Type: text/plain
Part: 0
Message:
Re: partition -> partitioned
Patch
Format: unified
Series: patch v2
| File | + | − |
|---|---|---|
| src/backend/partitioning/partprune.c | 8 | 8 |
| src/include/partitioning/partprune.h | 2 | 1 |
diff --git a/src/backend/partitioning/partprune.c b/src/backend/partitioning/partprune.c
index 0a76b77d3e..aad75f113d 100644
--- a/src/backend/partitioning/partprune.c
+++ b/src/backend/partitioning/partprune.c
@@ -176,9 +176,9 @@ static bool partkey_datum_from_expr(PartitionPruneContext *context,
/*
* make_partition_pruneinfo
- * Build List of PartitionPruneInfos, one for each 'partitioned_rels'.
- * These can be used in the executor to allow additional partition
- * pruning to take place.
+ * Build List of PartitionPruneInfos, one for each relation mentioned
+ * in 'partitioned_rels'. These can be used in the executor to allow
+ * additional partition pruning to take place.
*
* Here we generate partition pruning steps for 'prunequal' and also build a
* data structure which allows mapping of partition indexes into 'subpaths'
@@ -190,7 +190,7 @@ static bool partkey_datum_from_expr(PartitionPruneContext *context,
* pruning done during planning will have pruned everything that can be.
*/
List *
-make_partition_pruneinfo(PlannerInfo *root, List *partition_rels,
+make_partition_pruneinfo(PlannerInfo *root, List *partitioned_rels,
List *subpaths, List *prunequal)
{
RelOptInfo *targetpart = NULL;
@@ -229,11 +229,11 @@ make_partition_pruneinfo(PlannerInfo *root, List *partition_rels,
/*
* relid_subpart_map maps relid of a non-leaf partition to the index in
- * 'partition_rels' of that rel (which will also be the index in the
+ * 'partitioned_rels' of that rel (which will also be the index in the
* returned PartitionPruneInfo list of the info for that partition).
*/
i = 1;
- foreach(lc, partition_rels)
+ foreach(lc, partitioned_rels)
{
Index rti = lfirst_int(lc);
@@ -246,8 +246,8 @@ make_partition_pruneinfo(PlannerInfo *root, List *partition_rels,
relid_subpart_map[rti] = i++;
}
- /* We now build a PartitionPruneInfo for each rel in partition_rels */
- foreach(lc, partition_rels)
+ /* We now build a PartitionPruneInfo for each rel in partitioned_rels */
+ foreach(lc, partitioned_rels)
{
Index rti = lfirst_int(lc);
RelOptInfo *subpart = find_base_rel(root, rti);
diff --git a/src/include/partitioning/partprune.h b/src/include/partitioning/partprune.h
index 09147b532c..9944d2832f 100644
--- a/src/include/partitioning/partprune.h
+++ b/src/include/partitioning/partprune.h
@@ -74,7 +74,8 @@ typedef struct PartitionPruneContext
#define PruneCxtStateIdx(partnatts, step_id, keyno) \
((partnatts) * (step_id) + (keyno))
-extern List *make_partition_pruneinfo(PlannerInfo *root, List *partition_rels,
+extern List *make_partition_pruneinfo(PlannerInfo *root,
+ List *partitioned_rels,
List *subpaths, List *prunequal);
extern Relids prune_append_rel_partitions(RelOptInfo *rel);
extern Bitmapset *get_matching_partitions(PartitionPruneContext *context,