PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | PartitionPruneContext |
Macros | |
#define | PruneCxtStateIdx(partnatts, step_id, keyno) ((partnatts) * (step_id) + (keyno)) |
Typedefs | |
typedef struct PartitionPruneContext | PartitionPruneContext |
Functions | |
PartitionPruneInfo * | make_partition_pruneinfo (struct PlannerInfo *root, struct RelOptInfo *parentrel, List *subpaths, List *prunequal) |
Bitmapset * | prune_append_rel_partitions (struct RelOptInfo *rel) |
Bitmapset * | get_matching_partitions (PartitionPruneContext *context, List *pruning_steps) |
#define PruneCxtStateIdx | ( | partnatts, | |
step_id, | |||
keyno | |||
) | ((partnatts) * (step_id) + (keyno)) |
Definition at line 70 of file partprune.h.
typedef struct PartitionPruneContext PartitionPruneContext |
Bitmapset* get_matching_partitions | ( | PartitionPruneContext * | context, |
List * | pruning_steps | ||
) |
Definition at line 817 of file partprune.c.
References Assert, bms_add_member(), bms_add_range(), bms_next_member(), PruneStepResult::bound_offsets, context, elog, ERROR, i, lfirst, list_length(), nodeTag, palloc0(), partition_bound_accepts_nulls, partition_bound_has_default, PARTITION_STRATEGY_LIST, PARTITION_STRATEGY_RANGE, perform_pruning_base_step(), perform_pruning_combine_step(), PruneStepResult::scan_default, PruneStepResult::scan_null, and PartitionPruneStep::step_id.
Referenced by find_matching_subplans_recurse(), and prune_append_rel_partitions().
PartitionPruneInfo* make_partition_pruneinfo | ( | struct PlannerInfo * | root, |
struct RelOptInfo * | parentrel, | ||
List * | subpaths, | ||
List * | prunequal | ||
) |
Definition at line 220 of file partprune.c.
References add_part_relids(), Assert, bms_add_member(), bms_add_range(), bms_del_members(), bms_join(), bms_num_members(), find_base_rel(), i, IS_PARTITIONED_REL, lappend(), lfirst, list_length(), make_partitionedrel_pruneinfo(), makeNode, NIL, PartitionPruneInfo::other_subplans, palloc0(), AppendRelInfo::parent_relid, pfree(), PartitionPruneInfo::prune_infos, RelOptInfo::relid, RELOPT_OTHER_MEMBER_REL, RelOptInfo::reloptkind, and root.
Referenced by create_append_plan(), and create_merge_append_plan().
Bitmapset* prune_append_rel_partitions | ( | struct RelOptInfo * | rel | ) |
Definition at line 750 of file partprune.c.
References Assert, RelOptInfo::baserestrictinfo, bms_add_range(), context, GeneratePruningStepsContext::contradictory, CurrentMemoryContext, enable_partition_pruning, gen_partprune_steps(), get_matching_partitions(), list_length(), NIL, RelOptInfo::nparts, palloc0(), PARTTARGET_PLANNER, and GeneratePruningStepsContext::steps.
Referenced by expand_partitioned_rtentry().