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/fd256561-31a2-4b7e-cd84-d8241e7ebc3f@lab.ntt.co.jp
This commit is contained in:
parent
74cfbc8efd
commit
8f97af60d1
@ -176,7 +176,7 @@ static bool partkey_datum_from_expr(PartitionPruneContext *context,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* make_partition_pruneinfo
|
* make_partition_pruneinfo
|
||||||
* Build List of PartitionPruneInfos, one for each 'partitioned_rels'.
|
* Build List of PartitionPruneInfos, one for each partitioned rel.
|
||||||
* These can be used in the executor to allow additional partition
|
* These can be used in the executor to allow additional partition
|
||||||
* pruning to take place.
|
* pruning to take place.
|
||||||
*
|
*
|
||||||
@ -190,7 +190,7 @@ static bool partkey_datum_from_expr(PartitionPruneContext *context,
|
|||||||
* pruning done during planning will have pruned everything that can be.
|
* pruning done during planning will have pruned everything that can be.
|
||||||
*/
|
*/
|
||||||
List *
|
List *
|
||||||
make_partition_pruneinfo(PlannerInfo *root, List *partition_rels,
|
make_partition_pruneinfo(PlannerInfo *root, List *partitioned_rels,
|
||||||
List *subpaths, List *prunequal)
|
List *subpaths, List *prunequal)
|
||||||
{
|
{
|
||||||
RelOptInfo *targetpart = NULL;
|
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
|
* 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).
|
* returned PartitionPruneInfo list of the info for that partition).
|
||||||
*/
|
*/
|
||||||
i = 1;
|
i = 1;
|
||||||
foreach(lc, partition_rels)
|
foreach(lc, partitioned_rels)
|
||||||
{
|
{
|
||||||
Index rti = lfirst_int(lc);
|
Index rti = lfirst_int(lc);
|
||||||
|
|
||||||
@ -246,8 +246,8 @@ make_partition_pruneinfo(PlannerInfo *root, List *partition_rels,
|
|||||||
relid_subpart_map[rti] = i++;
|
relid_subpart_map[rti] = i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We now build a PartitionPruneInfo for each rel in partition_rels */
|
/* We now build a PartitionPruneInfo for each partitioned rel */
|
||||||
foreach(lc, partition_rels)
|
foreach(lc, partitioned_rels)
|
||||||
{
|
{
|
||||||
Index rti = lfirst_int(lc);
|
Index rti = lfirst_int(lc);
|
||||||
RelOptInfo *subpart = find_base_rel(root, rti);
|
RelOptInfo *subpart = find_base_rel(root, rti);
|
||||||
|
@ -74,7 +74,8 @@ typedef struct PartitionPruneContext
|
|||||||
#define PruneCxtStateIdx(partnatts, step_id, keyno) \
|
#define PruneCxtStateIdx(partnatts, step_id, keyno) \
|
||||||
((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);
|
List *subpaths, List *prunequal);
|
||||||
extern Relids prune_append_rel_partitions(RelOptInfo *rel);
|
extern Relids prune_append_rel_partitions(RelOptInfo *rel);
|
||||||
extern Bitmapset *get_matching_partitions(PartitionPruneContext *context,
|
extern Bitmapset *get_matching_partitions(PartitionPruneContext *context,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user