|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <limits.h>#include "access/nbtree.h"#include "catalog/pg_constraint.h"#include "miscadmin.h"#include "nodes/nodeFuncs.h"#include "optimizer/appendinfo.h"#include "optimizer/clauses.h"#include "optimizer/cost.h"#include "optimizer/inherit.h"#include "optimizer/optimizer.h"#include "optimizer/pathnode.h"#include "optimizer/paths.h"#include "optimizer/placeholder.h"#include "optimizer/plancat.h"#include "optimizer/planner.h"#include "optimizer/restrictinfo.h"#include "optimizer/tlist.h"#include "parser/parse_oper.h"#include "parser/parse_relation.h"#include "rewrite/rewriteManip.h"#include "utils/hsearch.h"#include "utils/lsyscache.h"#include "utils/selfuncs.h"#include "utils/typcache.h"
Go to the source code of this file.
Data Structures | |
| struct | JoinHashEntry |
Typedefs | |
| typedef struct JoinHashEntry | JoinHashEntry |
Variables | |
| joinrel_setup_hook_type | joinrel_setup_hook = NULL |
|
static |
Definition at line 746 of file relnode.c.
References Assert, fb(), HASH_ENTER, hash_search(), lappend(), RelOptInfo::relids, and root.
Referenced by build_child_join_rel(), and build_join_rel().
| RelOptInfo * build_child_join_rel | ( | PlannerInfo * | root, |
| RelOptInfo * | outer_rel, | ||
| RelOptInfo * | inner_rel, | ||
| RelOptInfo * | parent_joinrel, | ||
| List * | restrictlist, | ||
| SpecialJoinInfo * | sjinfo, | ||
| int | nappinfos, | ||
| AppendRelInfo ** | appinfos | ||
| ) |
Definition at line 1015 of file relnode.c.
References add_child_join_rel_equivalences(), add_join_rel(), adjust_appendrel_attrs(), adjust_child_relids(), RelOptInfo::agg_info, RelOptInfo::all_partrels, RelOptInfo::allvisfrac, RelOptInfo::amflags, Assert, RelOptInfo::baserestrictcost, RelOptInfo::baserestrictinfo, bms_copy(), build_child_join_reltarget(), build_joinrel_partition_info(), RelOptInfo::cheapest_parameterized_paths, RelOptInfo::cheapest_startup_path, RelOptInfo::cheapest_total_path, RelOptInfo::consider_parallel, RelOptInfo::consider_param_startup, RelOptInfo::consider_partitionwise_join, RelOptInfo::consider_startup, create_empty_pathtarget(), RelOptInfo::direct_lateral_relids, RelOptInfo::eclass_indexes, fb(), find_join_rel(), RelOptInfo::grouped_rel, RelOptInfo::has_eclass_joins, has_useful_pathkeys(), RelOptInfo::indexlist, InvalidOid, IS_OTHER_REL, RelOptInfo::joininfo, joinrel_setup_hook, RelOptInfo::lateral_referencers, RelOptInfo::lateral_relids, RelOptInfo::lateral_vars, RelOptInfo::live_parts, makeNode, RelOptInfo::max_attr, RelOptInfo::min_attr, NIL, RelOptInfo::notnullattnums, RelOptInfo::nparts, RelOptInfo::nulling_relids, RelOptInfo::pages, RelOptInfo::partbounds_merged, RelOptInfo::partial_pathlist, RelOptInfo::partition_qual, RelOptInfo::pathlist, QualCost::per_tuple, RelOptInfo::pgs_mask, RelOptInfo::ppilist, RelOptInfo::relid, RelOptInfo::relids, RELOPT_OTHER_JOINREL, RelOptInfo::reloptkind, RelOptInfo::reltarget, root, RelOptInfo::rows, RTE_JOIN, RelOptInfo::rtekind, RelOptInfo::serverid, set_foreign_rel_properties(), set_joinrel_size_estimates(), QualCost::startup, RelOptInfo::subplan_params, RelOptInfo::subroot, RelOptInfo::top_parent_relids, RelOptInfo::tuples, RelOptInfo::unique_groupclause, RelOptInfo::unique_pathkeys, RelOptInfo::unique_rel, RelOptInfo::userid, and RelOptInfo::useridiscurrent.
Referenced by try_partitionwise_join().
|
static |
Definition at line 2651 of file relnode.c.
References adjust_appendrel_attrs(), PathTarget::exprs, fb(), RelOptInfo::reltarget, and root.
Referenced by build_child_join_rel().
| RelOptInfo * build_grouped_rel | ( | PlannerInfo * | root, |
| RelOptInfo * | rel | ||
| ) |
Definition at line 488 of file relnode.c.
References RelOptInfo::all_partrels, RelOptInfo::cheapest_parameterized_paths, RelOptInfo::cheapest_startup_path, RelOptInfo::cheapest_total_path, RelOptInfo::consider_partitionwise_join, fb(), RelOptInfo::live_parts, makeNode, NIL, RelOptInfo::nparts, RelOptInfo::partbounds_merged, RelOptInfo::partial_pathlist, RelOptInfo::partition_qual, RelOptInfo::pathlist, RelOptInfo::ppilist, and RelOptInfo::rows.
Referenced by build_simple_grouped_rel(), and make_grouped_join_rel().
| RelOptInfo * build_join_rel | ( | PlannerInfo * | root, |
| Relids | joinrelids, | ||
| RelOptInfo * | outer_rel, | ||
| RelOptInfo * | inner_rel, | ||
| SpecialJoinInfo * | sjinfo, | ||
| List * | pushed_down_joins, | ||
| List ** | restrictlist_ptr | ||
| ) |
Definition at line 784 of file relnode.c.
References add_join_rel(), add_placeholders_to_joinrel(), RelOptInfo::agg_info, RelOptInfo::all_partrels, RelOptInfo::allvisfrac, RelOptInfo::amflags, Assert, RelOptInfo::baserestrict_min_security, RelOptInfo::baserestrictcost, RelOptInfo::baserestrictinfo, bms_copy(), bms_del_members(), bms_num_members(), bms_union(), build_joinrel_joinlist(), build_joinrel_partition_info(), build_joinrel_restrictlist(), build_joinrel_tlist(), RelOptInfo::cheapest_parameterized_paths, RelOptInfo::cheapest_startup_path, RelOptInfo::cheapest_total_path, RelOptInfo::consider_parallel, RelOptInfo::consider_param_startup, RelOptInfo::consider_partitionwise_join, RelOptInfo::consider_startup, create_empty_pathtarget(), RelOptInfo::direct_lateral_relids, RelOptInfo::eclass_indexes, PathTarget::exprs, fb(), find_join_rel(), RelOptInfo::grouped_rel, RelOptInfo::has_eclass_joins, has_relevant_eclass_joinclause(), RelOptInfo::indexlist, InvalidOid, IS_OTHER_REL, is_parallel_safe(), JOIN_FULL, JOIN_INNER, RelOptInfo::joininfo, joinrel_setup_hook, SpecialJoinInfo::jointype, lappend(), RelOptInfo::lateral_referencers, RelOptInfo::lateral_relids, RelOptInfo::lateral_vars, RelOptInfo::live_parts, makeNode, RelOptInfo::max_attr, RelOptInfo::min_attr, min_join_parameterization(), NIL, RelOptInfo::non_unique_for_rels, RelOptInfo::notnullattnums, RelOptInfo::nparts, RelOptInfo::nulling_relids, RelOptInfo::pages, RelOptInfo::partbounds_merged, RelOptInfo::partial_pathlist, RelOptInfo::partition_qual, RelOptInfo::pathlist, QualCost::per_tuple, RelOptInfo::pgs_mask, RelOptInfo::ppilist, RelOptInfo::rel_parallel_workers, RelOptInfo::relid, RelOptInfo::relids, RELOPT_JOINREL, RelOptInfo::reloptkind, RelOptInfo::reltarget, root, RelOptInfo::rows, RTE_JOIN, RelOptInfo::rtekind, RelOptInfo::serverid, set_foreign_rel_properties(), set_joinrel_size_estimates(), QualCost::startup, RelOptInfo::statlist, RelOptInfo::subplan_params, RelOptInfo::subroot, RelOptInfo::top_parent_relids, RelOptInfo::tuples, RelOptInfo::unique_for_rels, RelOptInfo::unique_groupclause, RelOptInfo::unique_pathkeys, RelOptInfo::unique_rel, RelOptInfo::userid, and RelOptInfo::useridiscurrent.
Referenced by make_join_rel().
|
static |
Definition at line 605 of file relnode.c.
References Assert, bitmap_hash(), bitmap_match(), CurrentMemoryContext, fb(), HASH_COMPARE, HASH_CONTEXT, hash_create(), HASH_ELEM, HASH_ENTER, HASH_FUNCTION, hash_search(), lfirst, RelOptInfo::relids, and root.
Referenced by find_join_rel().
|
static |
Definition at line 1470 of file relnode.c.
References fb(), RelOptInfo::joininfo, NIL, and subbuild_joinrel_joinlist().
Referenced by build_join_rel().
|
static |
Definition at line 2139 of file relnode.c.
References Assert, RelOptInfo::consider_partitionwise_join, fb(), have_partkey_equi_join(), IS_PARTITIONED_REL, SpecialJoinInfo::jointype, PGS_CONSIDER_PARTITIONWISE, RelOptInfo::pgs_mask, root, and set_joinrel_partition_key_exprs().
Referenced by build_child_join_rel(), and build_join_rel().
|
static |
Definition at line 1433 of file relnode.c.
References bms_union(), fb(), generate_join_implied_equalities(), list_concat(), NIL, RelOptInfo::relids, root, and subbuild_joinrel_restrictlist().
Referenced by build_join_rel().
|
static |
Definition at line 1248 of file relnode.c.
References Assert, bms_add_member(), bms_intersect(), bms_is_member(), bms_is_subset(), bms_join(), bms_nonempty_difference(), clamp_width_est(), SpecialJoinInfo::commute_above_r, copyObject, elog, ERROR, PathTarget::exprs, fb(), find_base_rel(), find_placeholder_info(), IsA, JOIN_FULL, SpecialJoinInfo::jointype, lappend(), lfirst, list_nth(), nodeTag, SpecialJoinInfo::ojrelid, RelOptInfo::relids, RelOptInfo::reltarget, root, ROWID_VAR, RowIdentityVarInfo::rowidwidth, SpecialJoinInfo::syn_lefthand, SpecialJoinInfo::syn_righthand, Var::varattno, Var::varno, and PathTarget::width.
Referenced by build_join_rel().
| RelOptInfo * build_simple_grouped_rel | ( | PlannerInfo * | root, |
| RelOptInfo * | rel | ||
| ) |
Definition at line 437 of file relnode.c.
References RelOptInfo::agg_info, RelAggInfo::agg_useful, RelAggInfo::apply_agg_at, Assert, bms_copy(), build_grouped_rel(), create_rel_agg_info(), fb(), RelOptInfo::grouped_rel, RelAggInfo::grouped_rows, IS_DUMMY_REL, NIL, RelOptInfo::relids, RelOptInfo::reltarget, root, RelOptInfo::rows, and RelAggInfo::target.
Referenced by setup_simple_grouped_rels().
| RelOptInfo * build_simple_rel | ( | PlannerInfo * | root, |
| int | relid, | ||
| RelOptInfo * | parent | ||
| ) |
Definition at line 209 of file relnode.c.
References RelOptInfo::agg_info, RelOptInfo::all_partrels, RelOptInfo::allvisfrac, RelOptInfo::amflags, apply_child_basequals(), Assert, RelOptInfo::baserestrict_min_security, RelOptInfo::baserestrictcost, RelOptInfo::baserestrictinfo, bms_make_singleton(), RelOptInfo::cheapest_parameterized_paths, RelOptInfo::cheapest_startup_path, RelOptInfo::cheapest_total_path, RelOptInfo::consider_parallel, RelOptInfo::consider_param_startup, RelOptInfo::consider_partitionwise_join, RelOptInfo::consider_startup, create_empty_pathtarget(), RelOptInfo::direct_lateral_relids, RelOptInfo::eclass_indexes, elog, ERROR, fb(), get_relation_info(), getRTEPermissionInfo(), RelOptInfo::grouped_rel, RelOptInfo::has_eclass_joins, RelOptInfo::indexlist, InvalidOid, RelOptInfo::joininfo, RelOptInfo::lateral_referencers, RelOptInfo::lateral_relids, RelOptInfo::lateral_vars, list_length(), RelOptInfo::live_parts, makeNode, mark_dummy_rel(), RelOptInfo::max_attr, RelOptInfo::min_attr, NIL, RelOptInfo::non_unique_for_rels, RelOptInfo::notnullattnums, RelOptInfo::nparts, RelOptInfo::nulling_relids, RelOptInfo::pages, palloc0_array, RelOptInfo::partbounds_merged, RelOptInfo::partial_pathlist, RelOptInfo::partition_qual, RelOptInfo::pathlist, QualCost::per_tuple, RelOptInfo::pgs_mask, RelOptInfo::ppilist, RelOptInfo::rel_parallel_workers, RelOptInfo::relid, RelOptInfo::relids, RELOPT_BASEREL, RELOPT_OTHER_MEMBER_REL, RelOptInfo::reloptkind, RelOptInfo::reltarget, root, RelOptInfo::rows, RTE_CTE, RTE_FUNCTION, RTE_NAMEDTUPLESTORE, RTE_RELATION, RTE_RESULT, RTE_SUBQUERY, RTE_TABLEFUNC, RTE_VALUES, RelOptInfo::rtekind, RelOptInfo::serverid, QualCost::startup, RelOptInfo::statlist, RelOptInfo::subplan_params, RelOptInfo::subroot, RelOptInfo::top_parent_relids, RelOptInfo::tuples, RelOptInfo::unique_for_rels, RelOptInfo::unique_groupclause, RelOptInfo::unique_pathkeys, RelOptInfo::unique_rel, RelOptInfo::userid, and RelOptInfo::useridiscurrent.
Referenced by add_base_rels_to_query(), expand_appendrel_subquery(), expand_inherited_rtentry(), expand_partitioned_rtentry(), plan_cluster_use_sort(), plan_create_index_workers(), query_planner(), and recurse_set_operations().
| RelAggInfo * create_rel_agg_info | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| bool | calculate_grouped_rows | ||
| ) |
Definition at line 2680 of file relnode.c.
References add_column_to_pathtarget(), adjust_appendrel_attrs_multilevel(), RelOptInfo::agg_info, RelAggInfo::agg_input, RelAggInfo::agg_useful, AGGSPLIT_INITIAL_SERIAL, RelAggInfo::apply_agg_at, Assert, copyObject, create_empty_pathtarget(), eager_aggregation_possible_for_relation(), estimate_num_groups(), fb(), RelAggInfo::group_clauses, RelAggInfo::group_exprs, RelOptInfo::grouped_rel, RelAggInfo::grouped_rows, init_grouping_targets(), IS_GROUPED_REL, IS_OTHER_REL, IsA, lfirst_node, makeNode, mark_partial_aggref(), min_eager_agg_group_size, NIL, root, RelOptInfo::rows, set_pathtarget_cost_width(), and RelAggInfo::target.
Referenced by build_simple_grouped_rel(), and make_grouped_join_rel().
|
static |
Definition at line 2810 of file relnode.c.
References Assert, bms_is_subset(), bms_next_member(), PathTarget::exprs, fb(), find_base_rel_ignore_join(), IsA, lfirst, lfirst_node, RelOptInfo::relids, RELOPT_BASEREL, RELOPT_JOINREL, RelOptInfo::reloptkind, RelOptInfo::reltarget, and root.
Referenced by create_rel_agg_info().
| void expand_planner_arrays | ( | PlannerInfo * | root, |
| int | add_size | ||
| ) |
Definition at line 180 of file relnode.c.
References add_size(), Assert, fb(), palloc0_array, repalloc0_array, and root.
Referenced by expand_inherited_rtentry(), and expand_partitioned_rtentry().
| RelOptInfo * fetch_upper_rel | ( | PlannerInfo * | root, |
| UpperRelationKind | kind, | ||
| Relids | relids | ||
| ) |
Definition at line 1606 of file relnode.c.
References bms_copy(), bms_equal(), create_empty_pathtarget(), fb(), lappend(), lfirst, makeNode, NIL, RELOPT_UPPER_REL, and root.
Referenced by add_rtes_to_flat_rtable(), build_setop_child_paths(), create_distinct_paths(), create_ordered_paths(), create_partial_distinct_paths(), create_partial_grouping_paths(), create_window_paths(), generate_nonunion_paths(), generate_recursion_path(), generate_union_paths(), grouping_planner(), make_grouping_rel(), make_subplan(), preprocess_minmax_aggregates(), set_subquery_pathlist(), set_subquery_size_estimates(), SS_process_ctes(), standard_planner(), and subquery_planner().
| RelOptInfo * find_base_rel | ( | PlannerInfo * | root, |
| int | relid | ||
| ) |
Definition at line 533 of file relnode.c.
References elog, ERROR, fb(), and root.
Referenced by add_base_clause_to_rel(), add_placeholders_to_base_rels(), add_vars_to_attr_needed(), add_vars_to_targetlist(), build_joinrel_tlist(), clause_selectivity_ext(), create_lateral_join_info(), distribute_row_identity_vars(), examine_simple_variable(), examine_variable(), finalize_plan(), find_childrel_parents(), find_join_input_rel(), find_single_rel_for_clauses(), get_foreign_key_join_selectivity(), get_matching_part_pairs(), get_rel_all_updated_cols(), get_translated_update_targetlist(), grouping_planner(), is_var_needed_by_join(), join_is_removable(), make_partition_pruneinfo(), make_partitionedrel_pruneinfo(), make_rel_from_joinlist(), postgresPlanForeignModify(), reduce_unique_semijoins(), remove_leftjoinrel_from_query(), set_append_rel_size(), set_base_rel_consider_startup(), set_subquery_size_estimates(), set_subqueryscan_references(), and var_is_nonnullable().
| RelOptInfo * find_base_rel_ignore_join | ( | PlannerInfo * | root, |
| int | relid | ||
| ) |
Definition at line 573 of file relnode.c.
References elog, ERROR, fb(), JOIN_INNER, root, and RTE_JOIN.
Referenced by add_join_clause_to_rels(), create_lateral_join_info(), eager_aggregation_possible_for_relation(), find_appinfos_by_relids(), and remove_join_clause_from_rels().
| RelOptInfo * find_base_rel_noerr | ( | PlannerInfo * | root, |
| int | relid | ||
| ) |
Definition at line 555 of file relnode.c.
Referenced by all_rows_selectable().
| Relids find_childrel_parents | ( | PlannerInfo * | root, |
| RelOptInfo * | rel | ||
| ) |
Definition at line 1657 of file relnode.c.
References Assert, bms_add_member(), fb(), find_base_rel(), AppendRelInfo::parent_relid, RelOptInfo::relid, RELOPT_BASEREL, RELOPT_OTHER_MEMBER_REL, RelOptInfo::reloptkind, and root.
Referenced by check_index_predicates(), and generate_implied_equalities_for_column().
| RelOptInfo * find_join_rel | ( | PlannerInfo * | root, |
| Relids | relids | ||
| ) |
Definition at line 646 of file relnode.c.
References bms_equal(), build_join_rel_hash(), fb(), HASH_FIND, hash_search(), JoinHashEntry::join_rel, lfirst, list_length(), RelOptInfo::relids, and root.
Referenced by build_child_join_rel(), build_join_rel(), examine_variable(), find_join_input_rel(), get_matching_part_pairs(), and postgresPlanDirectModify().
| ParamPathInfo * find_param_path_info | ( | RelOptInfo * | rel, |
| Relids | required_outer | ||
| ) |
Definition at line 2037 of file relnode.c.
References bms_equal(), fb(), lfirst, and RelOptInfo::ppilist.
Referenced by get_appendrel_parampathinfo(), get_baserel_parampathinfo(), get_joinrel_parampathinfo(), and reparameterize_path_by_child().
| ParamPathInfo * get_appendrel_parampathinfo | ( | RelOptInfo * | appendrel, |
| Relids | required_outer | ||
| ) |
Definition at line 2004 of file relnode.c.
References Assert, bms_is_empty, bms_is_subset(), bms_overlap(), fb(), find_param_path_info(), lappend(), makeNode, and NIL.
Referenced by create_append_path().
| ParamPathInfo * get_baserel_parampathinfo | ( | PlannerInfo * | root, |
| RelOptInfo * | baserel, | ||
| Relids | required_outer | ||
| ) |
Definition at line 1693 of file relnode.c.
References Assert, bms_add_member(), bms_is_empty, bms_is_subset(), bms_overlap(), bms_union(), fb(), find_param_path_info(), generate_join_implied_equalities(), get_parameterized_baserel_size(), join_clause_is_movable_into(), lappend(), lfirst, list_concat(), makeNode, NIL, RestrictInfo::rinfo_serial, and root.
Referenced by create_append_path(), create_bitmap_and_path(), create_bitmap_heap_path(), create_bitmap_or_path(), create_ctescan_path(), create_foreignscan_path(), create_functionscan_path(), create_gather_merge_path(), create_gather_path(), create_index_path(), create_namedtuplestorescan_path(), create_resultscan_path(), create_samplescan_path(), create_seqscan_path(), create_subqueryscan_path(), create_tablefuncscan_path(), create_tidrangescan_path(), create_tidscan_path(), create_valuesscan_path(), create_worktablescan_path(), postgresGetForeignPaths(), and reparameterize_path().
|
static |
Definition at line 3161 of file relnode.c.
References Assert, bms_is_member(), equal(), fb(), IsA, lfirst, lfirst_node, and root.
Referenced by init_grouping_targets().
| ParamPathInfo * get_joinrel_parampathinfo | ( | PlannerInfo * | root, |
| RelOptInfo * | joinrel, | ||
| Path * | outer_path, | ||
| Path * | inner_path, | ||
| SpecialJoinInfo * | sjinfo, | ||
| Relids | required_outer, | ||
| List ** | restrict_clauses | ||
| ) |
Definition at line 1807 of file relnode.c.
References Assert, bms_is_empty, bms_is_subset(), bms_overlap(), bms_union(), fb(), find_param_path_info(), generate_join_implied_equalities(), generate_join_implied_equalities_for_ecs(), get_parameterized_joinrel_size(), join_clause_is_movable_into(), RelOptInfo::joininfo, lappend(), RelOptInfo::lateral_relids, lfirst, list_concat(), makeNode, NIL, PATH_REQ_OUTER, RelOptInfo::ppilist, RelOptInfo::relids, and root.
Referenced by create_hashjoin_path(), create_mergejoin_path(), and create_nestloop_path().
Definition at line 2058 of file relnode.c.
References Assert, bms_add_member(), bms_add_members(), bms_copy(), bms_int_members(), fb(), get_param_path_clause_serials(), JoinPath::innerjoinpath, IsA, JoinPath::joinrestrictinfo, lfirst, list_head(), JoinPath::outerjoinpath, RestrictInfo::rinfo_serial, and subpath().
Referenced by create_nestloop_path(), and get_param_path_clause_serials().
|
static |
Definition at line 2212 of file relnode.c.
References OpExpr::args, Assert, bms_is_subset(), bms_overlap(), castNode, RestrictInfo::clause, exprCollation(), exprs_known_equal(), fb(), get_mergejoin_opfamilies(), get_opfamily_member(), HTEqualStrategyNumber, IS_OUTER_JOIN, lfirst, lfirst_node, linitial, linitial_oid, list_member_oid(), lsecond, match_expr_to_partition_keys(), NIL, OidIsValid, op_in_opfamily(), op_strict(), OpExpr::opno, PARTITION_MAX_KEYS, PARTITION_STRATEGY_HASH, PG_USED_FOR_ASSERTS_ONLY, RelOptInfo::relids, remove_nulling_relids(), RINFO_IS_PUSHED_DOWN, and root.
Referenced by build_joinrel_partition_info().
|
static |
Definition at line 2890 of file relnode.c.
References add_column_to_pathtarget(), add_new_column_to_pathtarget(), Assert, BTEQUALIMAGE_PROC, check_functional_grouping(), DatumGetBool(), PathTarget::exprs, exprType(), fb(), get_expression_sortgroupref(), get_opfamily_proc(), get_sort_group_operators(), get_sortgroupref_clause(), is_var_in_aggref_only(), is_var_needed_by_join(), IsA, lappend(), lfirst, lfirst_node, list_member(), lookup_type_cache(), makeNode, NIL, ObjectIdGetDatum(), OidFunctionCall1Coll(), OidIsValid, RelOptInfo::reltarget, root, and TYPECACHE_BTREE_OPFAMILY.
Referenced by create_rel_agg_info().
|
static |
Definition at line 3094 of file relnode.c.
References Assert, bms_is_member(), fb(), IsA, lfirst_node, list_free(), list_member(), pull_var_clause(), PVC_RECURSE_AGGREGATES, PVC_RECURSE_PLACEHOLDERS, PVC_RECURSE_WINDOWFUNCS, root, and Var::varno.
Referenced by init_grouping_targets().
|
static |
Definition at line 3133 of file relnode.c.
References bms_add_member(), bms_copy(), bms_nonempty_difference(), fb(), find_base_rel(), RelOptInfo::relids, root, Var::varattno, and Var::varno.
Referenced by init_grouping_targets().
|
static |
Definition at line 2459 of file relnode.c.
References arg, Assert, castNode, equal(), fb(), IsA, and lfirst.
Referenced by have_partkey_equi_join().
| Relids min_join_parameterization | ( | PlannerInfo * | root, |
| Relids | joinrelids, | ||
| RelOptInfo * | outer_rel, | ||
| RelOptInfo * | inner_rel | ||
| ) |
Definition at line 1170 of file relnode.c.
References bms_del_members(), bms_union(), and fb().
Referenced by build_join_rel(), and join_is_legal().
|
static |
Definition at line 708 of file relnode.c.
References fb(), GetUserId(), OidIsValid, RelOptInfo::serverid, RelOptInfo::userid, and RelOptInfo::useridiscurrent.
Referenced by build_child_join_rel(), and build_join_rel().
|
static |
Definition at line 2508 of file relnode.c.
References elog, ERROR, exprCollation(), exprType(), fb(), JOIN_ANTI, JOIN_FULL, JOIN_INNER, JOIN_LEFT, JOIN_SEMI, lappend(), lfirst, list_concat(), list_concat_copy(), list_copy(), list_make2, makeNode, NIL, and palloc0_array.
Referenced by build_joinrel_partition_info().
| void setup_simple_rel_arrays | ( | PlannerInfo * | root | ) |
Definition at line 111 of file relnode.c.
References Assert, elog, ERROR, fb(), lfirst, lfirst_node, list_length(), NIL, palloc0_array, and root.
Referenced by plan_cluster_use_sort(), plan_create_index_workers(), plan_set_operations(), and query_planner().
|
static |
Definition at line 1554 of file relnode.c.
References Assert, bms_is_subset(), fb(), lfirst, list_append_unique_ptr(), RelOptInfo::relids, RELOPT_JOINREL, RelOptInfo::reloptkind, and RestrictInfo::required_relids.
Referenced by build_joinrel_joinlist().
|
static |
Definition at line 1488 of file relnode.c.
References Assert, bms_is_subset(), bms_overlap(), fb(), RestrictInfo::has_clone, RestrictInfo::incompatible_relids, RestrictInfo::is_clone, lfirst, list_append_unique_ptr(), RelOptInfo::relids, RestrictInfo::required_relids, and RINFO_IS_PUSHED_DOWN.
Referenced by build_joinrel_restrictlist().
| joinrel_setup_hook_type joinrel_setup_hook = NULL |
Definition at line 51 of file relnode.c.
Referenced by build_child_join_rel(), and build_join_rel().