Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8f97af6

Browse files
committed
Consistently use the term 'partitioned rel' in partprune comments
We were using 'partition rel' in a few places, which is quite confusing. Author: Amit Langote Reviewed-by: David Rowley Reviewed-by: Michaël Paquier Discussion: https://postgr.es/m/[email protected]
1 parent 74cfbc8 commit 8f97af6

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/backend/partitioning/partprune.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ static bool partkey_datum_from_expr(PartitionPruneContext *context,
176176

177177
/*
178178
* make_partition_pruneinfo
179-
* Build List of PartitionPruneInfos, one for each 'partitioned_rels'.
179+
* Build List of PartitionPruneInfos, one for each partitioned rel.
180180
* These can be used in the executor to allow additional partition
181181
* pruning to take place.
182182
*
@@ -190,7 +190,7 @@ static bool partkey_datum_from_expr(PartitionPruneContext *context,
190190
* pruning done during planning will have pruned everything that can be.
191191
*/
192192
List *
193-
make_partition_pruneinfo(PlannerInfo *root, List *partition_rels,
193+
make_partition_pruneinfo(PlannerInfo *root, List *partitioned_rels,
194194
List *subpaths, List *prunequal)
195195
{
196196
RelOptInfo *targetpart = NULL;
@@ -229,11 +229,11 @@ make_partition_pruneinfo(PlannerInfo *root, List *partition_rels,
229229

230230
/*
231231
* relid_subpart_map maps relid of a non-leaf partition to the index in
232-
* 'partition_rels' of that rel (which will also be the index in the
232+
* 'partitioned_rels' of that rel (which will also be the index in the
233233
* returned PartitionPruneInfo list of the info for that partition).
234234
*/
235235
i = 1;
236-
foreach(lc, partition_rels)
236+
foreach(lc, partitioned_rels)
237237
{
238238
Index rti = lfirst_int(lc);
239239

@@ -246,8 +246,8 @@ make_partition_pruneinfo(PlannerInfo *root, List *partition_rels,
246246
relid_subpart_map[rti] = i++;
247247
}
248248

249-
/* We now build a PartitionPruneInfo for each rel in partition_rels */
250-
foreach(lc, partition_rels)
249+
/* We now build a PartitionPruneInfo for each partitioned rel */
250+
foreach(lc, partitioned_rels)
251251
{
252252
Index rti = lfirst_int(lc);
253253
RelOptInfo *subpart = find_base_rel(root, rti);

src/include/partitioning/partprune.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ typedef struct PartitionPruneContext
7474
#define PruneCxtStateIdx(partnatts, step_id, keyno) \
7575
((partnatts) * (step_id) + (keyno))
7676

77-
extern List *make_partition_pruneinfo(PlannerInfo *root, List *partition_rels,
77+
extern List *make_partition_pruneinfo(PlannerInfo *root,
78+
List *partitioned_rels,
7879
List *subpaths, List *prunequal);
7980
extern Relids prune_append_rel_partitions(RelOptInfo *rel);
8081
extern Bitmapset *get_matching_partitions(PartitionPruneContext *context,

0 commit comments

Comments
 (0)