PostgreSQL Source Code git master
|
#include "nodes/parsenodes.h"
Go to the source code of this file.
Macros | |
#define | HAVE_PLANNERINFO_TYPEDEF 1 |
#define | HAVE_INDEXOPTINFO_TYPEDEF 1 |
#define | HAVE_SPECIALJOININFO_TYPEDEF 1 |
#define | PVC_INCLUDE_AGGREGATES 0x0001 /* include Aggrefs in output list */ |
#define | PVC_RECURSE_AGGREGATES 0x0002 /* recurse into Aggref arguments */ |
#define | PVC_INCLUDE_WINDOWFUNCS 0x0004 /* include WindowFuncs in output list */ |
#define | PVC_RECURSE_WINDOWFUNCS 0x0008 /* recurse into WindowFunc arguments */ |
#define | PVC_INCLUDE_PLACEHOLDERS |
#define | PVC_RECURSE_PLACEHOLDERS |
#define | PVC_INCLUDE_CONVERTROWTYPES |
Typedefs | |
typedef struct PlannerInfo | PlannerInfo |
typedef struct IndexOptInfo | IndexOptInfo |
typedef struct SpecialJoinInfo | SpecialJoinInfo |
Enumerations | |
enum | DebugParallelMode { DEBUG_PARALLEL_OFF , DEBUG_PARALLEL_ON , DEBUG_PARALLEL_REGRESS } |
Variables | |
PGDLLIMPORT double | seq_page_cost |
PGDLLIMPORT double | random_page_cost |
PGDLLIMPORT double | cpu_tuple_cost |
PGDLLIMPORT double | cpu_index_tuple_cost |
PGDLLIMPORT double | cpu_operator_cost |
PGDLLIMPORT double | parallel_tuple_cost |
PGDLLIMPORT double | parallel_setup_cost |
PGDLLIMPORT double | recursive_worktable_factor |
PGDLLIMPORT int | effective_cache_size |
PGDLLIMPORT int | debug_parallel_query |
PGDLLIMPORT bool | parallel_leader_participation |
PGDLLIMPORT bool | enable_distinct_reordering |
#define HAVE_INDEXOPTINFO_TYPEDEF 1 |
Definition at line 41 of file optimizer.h.
#define HAVE_PLANNERINFO_TYPEDEF 1 |
Definition at line 35 of file optimizer.h.
#define HAVE_SPECIALJOININFO_TYPEDEF 1 |
Definition at line 45 of file optimizer.h.
#define PVC_INCLUDE_AGGREGATES 0x0001 /* include Aggrefs in output list */ |
Definition at line 187 of file optimizer.h.
#define PVC_INCLUDE_CONVERTROWTYPES |
Definition at line 193 of file optimizer.h.
#define PVC_INCLUDE_PLACEHOLDERS |
Definition at line 191 of file optimizer.h.
#define PVC_INCLUDE_WINDOWFUNCS 0x0004 /* include WindowFuncs in output list */ |
Definition at line 189 of file optimizer.h.
Definition at line 188 of file optimizer.h.
#define PVC_RECURSE_PLACEHOLDERS |
Definition at line 192 of file optimizer.h.
#define PVC_RECURSE_WINDOWFUNCS 0x0008 /* recurse into WindowFunc arguments */ |
Definition at line 190 of file optimizer.h.
typedef struct IndexOptInfo IndexOptInfo |
Definition at line 40 of file optimizer.h.
typedef struct PlannerInfo PlannerInfo |
Definition at line 34 of file optimizer.h.
typedef struct SpecialJoinInfo SpecialJoinInfo |
Definition at line 44 of file optimizer.h.
enum DebugParallelMode |
Enumerator | |
---|---|
DEBUG_PARALLEL_OFF | |
DEBUG_PARALLEL_ON | |
DEBUG_PARALLEL_REGRESS |
Definition at line 104 of file optimizer.h.
Definition at line 293 of file prepqual.c.
References Assert(), find_duplicate_ors(), and IsA.
Referenced by ConstraintImpliedByRelConstraint(), convert_EXISTS_to_ANY(), DoCopy(), get_proposed_default_constraint(), get_relation_constraints(), preprocess_expression(), and RelationGetIndexPredicate().
long clamp_cardinality_to_long | ( | Cardinality | x | ) |
Definition at line 265 of file costsize.c.
References x.
Referenced by buildSubPlanHash(), create_recursiveunion_plan(), create_setop_plan(), and make_agg().
double clamp_row_est | ( | double | nrows | ) |
Definition at line 213 of file costsize.c.
References MAXIMUM_ROWCOUNT.
Referenced by adjust_limit_rows_costs(), approx_tuple_count(), bernoulli_samplescangetsamplesize(), calc_joinrel_size_estimate(), compute_bitmap_pages(), compute_gather_rows(), cost_agg(), cost_append(), cost_bitmap_heap_scan(), cost_group(), cost_index(), cost_seqscan(), cost_subplan(), cost_subqueryscan(), create_bitmap_subplan(), create_memoize_path(), estimate_array_length(), estimate_hash_bucket_stats(), estimate_num_groups(), estimate_path_cost_size(), estimate_size(), expression_returns_set_rows(), final_cost_hashjoin(), final_cost_mergejoin(), final_cost_nestloop(), get_parameterized_baserel_size(), get_variable_numdistinct(), get_windowclause_startup_tuples(), initial_cost_mergejoin(), set_baserel_size_estimates(), set_cte_size_estimates(), set_foreign_size(), system_rows_samplescangetsamplesize(), system_samplescangetsamplesize(), system_time_samplescangetsamplesize(), and table_block_relation_estimate_size().
Definition at line 242 of file costsize.c.
References Assert(), and MaxAllocSize.
Referenced by add_placeholders_to_joinrel(), build_joinrel_tlist(), create_one_window_path(), get_rel_data_width(), set_pathtarget_cost_width(), and set_rel_width().
Selectivity clause_selectivity | ( | PlannerInfo * | root, |
Node * | clause, | ||
int | varRelid, | ||
JoinType | jointype, | ||
SpecialJoinInfo * | sjinfo | ||
) |
Definition at line 667 of file clausesel.c.
References clause_selectivity_ext(), and root.
Referenced by approx_tuple_count(), booltestsel(), consider_new_or_clause(), and get_foreign_key_join_selectivity().
Selectivity clause_selectivity_ext | ( | PlannerInfo * | root, |
Node * | clause, | ||
int | varRelid, | ||
JoinType | jointype, | ||
SpecialJoinInfo * | sjinfo, | ||
bool | use_extended_stats | ||
) |
Definition at line 684 of file clausesel.c.
References arg, generate_unaccent_rules::args, FuncExpr::args, OpExpr::args, bms_is_member(), booltestsel(), boolvarsel(), RestrictInfo::clause, clause_selectivity_ext(), clauselist_selectivity_ext(), clauselist_selectivity_or(), CurrentOfExpr::cvarno, DatumGetBool(), DEBUG4, elog, estimate_expression_value(), find_base_rel(), FuncExpr::funcid, function_selectivity(), get_notclausearg(), is_andclause(), is_funcclause(), is_notclause(), is_opclause(), is_orclause(), IsA, JOIN_INNER, join_selectivity(), nulltestsel(), OpExpr::opno, restriction_selectivity(), root, rowcomparesel(), s1, scalararraysel(), treat_as_join_clause(), RelOptInfo::tuples, and RangeQueryClause::var.
Referenced by clause_selectivity(), clause_selectivity_ext(), clauselist_selectivity_ext(), clauselist_selectivity_or(), and statext_mcv_clauselist_selectivity().
Selectivity clauselist_selectivity | ( | PlannerInfo * | root, |
List * | clauses, | ||
int | varRelid, | ||
JoinType | jointype, | ||
SpecialJoinInfo * | sjinfo | ||
) |
Definition at line 100 of file clausesel.c.
References clauselist_selectivity_ext(), and root.
Referenced by add_foreign_grouping_paths(), brincostestimate(), btcostestimate(), calc_joinrel_size_estimate(), compute_semi_anti_join_factors(), cost_agg(), cost_group(), cost_subqueryscan(), cost_tidrangescan(), estimate_path_cost_size(), estimate_size(), genericcostestimate(), get_parameterized_baserel_size(), gincostestimate(), postgresGetForeignJoinPaths(), postgresGetForeignRelSize(), and set_baserel_size_estimates().
Selectivity clauselist_selectivity_ext | ( | PlannerInfo * | root, |
List * | clauses, | ||
int | varRelid, | ||
JoinType | jointype, | ||
SpecialJoinInfo * | sjinfo, | ||
bool | use_extended_stats | ||
) |
Definition at line 117 of file clausesel.c.
References addRangeClause(), generate_unaccent_rules::args, OpExpr::args, bms_is_member(), RestrictInfo::clause, clause_selectivity_ext(), DEFAULT_INEQ_SEL, DEFAULT_RANGE_INEQ_SEL, find_single_rel_for_clauses(), get_oprrest(), RangeQueryClause::have_hibound, RangeQueryClause::have_lobound, RangeQueryClause::hibound, IS_NULL, is_opclause(), is_pseudo_constant_clause(), is_pseudo_constant_clause_relids(), IsA, lfirst, linitial, list_length(), RangeQueryClause::lobound, lsecond, RangeQueryClause::next, NIL, nulltestsel(), NumRelids(), OpExpr::opno, pfree(), root, RTE_RELATION, RelOptInfo::rtekind, s1, s2, statext_clauselist_selectivity(), RelOptInfo::statlist, and RangeQueryClause::var.
Referenced by clause_selectivity_ext(), clauselist_apply_dependencies(), clauselist_selectivity(), and statext_mcv_clauselist_selectivity().
bool contain_mutable_functions | ( | Node * | clause | ) |
Definition at line 369 of file clauses.c.
References contain_mutable_functions_walker().
Referenced by can_minmax_aggs(), check_index_predicates(), ComputePartitionAttrs(), contain_mutable_functions_after_planning(), create_bitmap_scan_plan(), create_indexscan_plan(), eval_const_expressions_mutator(), exec_save_simple_expr(), inline_function(), is_foreign_expr(), and relation_excluded_by_constraints().
bool contain_mutable_functions_after_planning | ( | Expr * | expr | ) |
Definition at line 489 of file clauses.c.
References contain_mutable_functions(), and expression_planner().
Referenced by CheckPredicate(), ComputeIndexAttrs(), and cookDefault().
bool contain_var_clause | ( | Node * | node | ) |
Definition at line 406 of file var.c.
References contain_var_clause_walker().
Referenced by contain_leaked_vars_walker(), cookDefault(), domainAddCheckConstraint(), interpret_function_parameter_list(), is_pseudo_constant_clause(), match_clause_to_ordering_op(), match_clause_to_partition_key(), test_opexpr_is_hashable(), transformJsonBehavior(), and transformPartitionBoundValue().
bool contain_vars_of_level | ( | Node * | node, |
int | levelsup | ||
) |
Definition at line 444 of file var.c.
References contain_vars_of_level_walker(), and query_or_expression_tree_walker.
Referenced by apply_child_basequals(), checkExprIsVarFree(), convert_EXISTS_sublink_to_join(), convert_EXISTS_to_ANY(), pull_up_simple_values(), pullup_replace_vars_callback(), rewriteRuleAction(), transformAExprIn(), transformJsonTable(), transformRangeFunction(), transformRangeTableFunc(), transformSetOperationTree(), and transformValuesClause().
bool contain_vars_returning_old_or_new | ( | Node * | node | ) |
Definition at line 511 of file var.c.
References contain_vars_returning_old_or_new_walker().
Referenced by make_modifytable().
bool contain_volatile_functions | ( | Node * | clause | ) |
Definition at line 537 of file clauses.c.
References contain_volatile_functions_walker().
Referenced by apply_child_basequals(), ATExecAddColumn(), check_hashjoinable(), check_mergejoinable(), check_output_expressions(), compute_semijoin_info(), contain_volatile_functions_after_planning(), convert_ANY_sublink_to_join(), convert_EXISTS_sublink_to_join(), convert_EXISTS_to_ANY(), CopyFrom(), distribute_qual_to_rels(), estimate_num_groups(), ExecInitWindowAgg(), expand_indexqual_rowcompare(), find_compatible_agg(), find_simplified_clause(), get_eclass_for_sort_expr(), get_memoize_path(), group_similar_or_args(), initialize_peragg(), inline_function(), inline_set_returning_function(), is_pseudo_constant_clause(), is_pseudo_constant_clause_relids(), is_pseudo_constant_for_index(), is_safe_restriction_clause_for(), is_simple_subquery(), is_simple_values(), IsBinaryTidClause(), IsTidEqualAnyClause(), make_sort_input_target(), mark_nullable_by_grouping(), match_clause_to_ordering_op(), match_clause_to_partition_key(), match_opclause_to_indexcol(), match_orclause_to_indexcol(), match_rowcompare_to_indexcol(), match_saopclause_to_indexcol(), paraminfo_get_equal_hashops(), qual_is_pushdown_safe(), remove_unused_subquery_outputs(), SS_process_ctes(), and subquery_planner().
bool contain_volatile_functions_after_planning | ( | Expr * | expr | ) |
Definition at line 658 of file clauses.c.
References contain_volatile_functions(), and expression_planner().
bool contain_volatile_functions_not_nextval | ( | Node * | clause | ) |
Definition at line 672 of file clauses.c.
References contain_volatile_functions_not_nextval_walker().
Referenced by BeginCopyFrom().
void convert_saop_to_hashed_saop | ( | Node * | node | ) |
Definition at line 2287 of file clauses.c.
References convert_saop_to_hashed_saop_walker().
Referenced by preprocess_expression().
int count_nonjunk_tlist_entries | ( | List * | tlist | ) |
Definition at line 186 of file tlist.c.
Referenced by get_update_query_targetlist_def(), transformJsonArrayQueryConstructor(), transformMultiAssignRef(), and transformSubLink().
Node * estimate_expression_value | ( | PlannerInfo * | root, |
Node * | node | ||
) |
Definition at line 2395 of file clauses.c.
References eval_const_expressions_context::active_fns, eval_const_expressions_context::boundParams, eval_const_expressions_context::case_val, eval_const_expressions_context::estimate, eval_const_expressions_mutator(), NIL, eval_const_expressions_context::root, and root.
Referenced by array_unnest_support(), bernoulli_samplescangetsamplesize(), clause_selectivity_ext(), generate_series_int4_support(), generate_series_int8_support(), generate_series_numeric_support(), generate_series_timestamp_support(), get_restriction_variable(), gincost_opexpr(), gincost_scalararrayopexpr(), preprocess_limit(), scalararraysel(), system_rows_samplescangetsamplesize(), system_samplescangetsamplesize(), and system_time_samplescangetsamplesize().
Node * eval_const_expressions | ( | PlannerInfo * | root, |
Node * | node | ||
) |
Definition at line 2254 of file clauses.c.
References eval_const_expressions_context::active_fns, eval_const_expressions_context::boundParams, eval_const_expressions_context::case_val, eval_const_expressions_context::estimate, eval_const_expressions_mutator(), NIL, eval_const_expressions_context::root, and root.
Referenced by apply_child_basequals(), ATExecAttachPartition(), ConstraintImpliedByRelConstraint(), convert_EXISTS_to_ANY(), DetachAddConstraintIfNeeded(), DoCopy(), expand_insert_targetlist(), expression_planner(), expression_planner_with_deps(), fetch_statentries_for_relation(), get_proposed_default_constraint(), get_relation_constraints(), get_relation_statistics(), preprocess_expression(), preprocess_function_rtes(), process_implied_equality(), RelationBuildPartitionKey(), RelationGetIndexExpressions(), RelationGetIndexPredicate(), and simplify_EXISTS_query().
Definition at line 4974 of file clauses.c.
References CreateExecutorState(), datumCopy(), EState::es_query_cxt, ExecEvalExprSwitchContext(), ExecInitExpr(), fix_opfuncids(), FreeExecutorState(), get_typlenbyval(), GetPerTupleExprContext, makeConst(), MemoryContextSwitchTo(), PG_DETOAST_DATUM_COPY, and PointerGetDatum().
Referenced by eval_const_expressions_mutator(), evaluate_function(), and transformPartitionBoundValue().
List * expand_function_arguments | ( | List * | args, |
bool | include_out_arguments, | ||
Oid | result_type, | ||
struct HeapTupleData * | func_tuple | ||
) |
Definition at line 6640 of file planner.c.
References eval_const_expressions(), and fix_opfuncids().
Referenced by ATExecAddColumn(), ATExecSetExpression(), ATPrepAlterColumnType(), BeginCopyFrom(), ComputePartitionAttrs(), contain_mutable_functions_after_planning(), contain_volatile_functions_after_planning(), ExecPrepareCheck(), ExecPrepareExpr(), ExecPrepareQual(), load_domaintype_info(), set_baserel_partition_constraint(), slot_fill_defaults(), and transformPartitionBoundValue().
Definition at line 6667 of file planner.c.
References eval_const_expressions(), extract_query_dependencies_walker(), fix_opfuncids(), PlannerGlobal::invalItems, MemSet, NIL, PlannerGlobal::relationOids, and root.
Referenced by GetCachedExpression().
void extract_query_dependencies | ( | Node * | query, |
List ** | relationOids, | ||
List ** | invalItems, | ||
bool * | hasRowSecurity | ||
) |
Definition at line 3630 of file setrefs.c.
References PlannerGlobal::dependsOnRole, extract_query_dependencies_walker(), PlannerGlobal::invalItems, MemSet, NIL, PlannerGlobal::relationOids, and root.
Referenced by CompleteCachedPlan(), and RevalidateCachedQuery().
Node * flatten_group_exprs | ( | PlannerInfo * | root, |
Query * | query, | ||
Node * | node | ||
) |
Definition at line 968 of file var.c.
References Assert(), flatten_group_exprs_mutator(), flatten_join_alias_vars_context::inserted_sublink, flatten_join_alias_vars_context::possible_sublink, flatten_join_alias_vars_context::query, flatten_join_alias_vars_context::root, root, and flatten_join_alias_vars_context::sublevels_up.
Referenced by get_query_def(), and subquery_planner().
Node * flatten_join_alias_vars | ( | PlannerInfo * | root, |
Query * | query, | ||
Node * | node | ||
) |
Definition at line 789 of file var.c.
References Assert(), flatten_join_alias_vars_mutator(), flatten_join_alias_vars_context::inserted_sublink, flatten_join_alias_vars_context::possible_sublink, flatten_join_alias_vars_context::query, flatten_join_alias_vars_context::root, root, and flatten_join_alias_vars_context::sublevels_up.
Referenced by finalize_grouping_exprs_walker(), parseCheckAggregates(), preprocess_expression(), pull_up_simple_subquery(), and subquery_planner().
Node * get_sortgroupclause_expr | ( | SortGroupClause * | sgClause, |
List * | targetList | ||
) |
Definition at line 379 of file tlist.c.
References TargetEntry::expr, and get_sortgroupclause_tle().
Referenced by get_sortgrouplist_exprs(), make_pathkeys_for_sortclauses_extended(), transformAggregateCall(), and transformWindowDefinitions().
TargetEntry * get_sortgroupclause_tle | ( | SortGroupClause * | sgClause, |
List * | targetList | ||
) |
Definition at line 367 of file tlist.c.
References get_sortgroupref_tle(), and SortGroupClause::tleSortGroupRef.
Referenced by build_pertrans_for_aggref(), create_groupingsets_plan(), create_limit_plan(), create_windowagg_plan(), extract_grouping_collations(), extract_grouping_cols(), get_sortgroupclause_expr(), make_recursive_union(), make_setop(), make_sort_from_sortclauses(), make_unique_from_sortclauses(), ordered_set_startup(), parseCheckAggregates(), query_is_distinct_for(), remove_useless_groupby_columns(), and transformDistinctClause().
Definition at line 392 of file tlist.c.
References get_sortgroupclause_expr(), lappend(), lfirst, and NIL.
Referenced by create_final_distinct_paths(), create_partial_distinct_paths(), estimate_path_cost_size(), get_number_of_groups(), get_windowclause_startup_tuples(), and group_by_has_partkey().
SortGroupClause * get_sortgroupref_clause | ( | Index | sortref, |
List * | clauses | ||
) |
Definition at line 422 of file tlist.c.
References elog, ERROR, lfirst, and SortGroupClause::tleSortGroupRef.
Referenced by preprocess_groupclause().
SortGroupClause * get_sortgroupref_clause_noerr | ( | Index | sortref, |
List * | clauses | ||
) |
Definition at line 443 of file tlist.c.
References lfirst, and SortGroupClause::tleSortGroupRef.
Referenced by find_em_for_rel_target(), foreign_grouping_ok(), group_keys_reorder_by_pathkeys(), make_group_input_target(), and make_partial_grouping_target().
TargetEntry * get_sortgroupref_tle | ( | Index | sortref, |
List * | targetList | ||
) |
Definition at line 345 of file tlist.c.
References elog, ERROR, lfirst, and TargetEntry::ressortgroupref.
Referenced by convert_subquery_pathkeys(), deparseSortGroupClause(), foreign_expr_walker(), get_rule_sortgroupclause(), get_sortgroupclause_tle(), make_unique_from_pathkeys(), prepare_sort_from_pathkeys(), and transformDistinctOnClause().
bool is_pseudo_constant_for_index | ( | PlannerInfo * | root, |
Node * | expr, | ||
IndexOptInfo * | index | ||
) |
Definition at line 4512 of file indxpath.c.
References bms_is_member(), contain_volatile_functions(), pull_varnos(), and root.
int locate_var_of_level | ( | Node * | node, |
int | levelsup | ||
) |
Definition at line 555 of file var.c.
References locate_var_of_level_walker(), query_or_expression_tree_walker, locate_var_of_level_context::sublevels_up, and locate_var_of_level_context::var_location.
Referenced by check_agg_arguments(), checkExprIsVarFree(), and transformSetOperationTree().
Definition at line 73 of file prepqual.c.
References AND_EXPR, NullTest::arg, BooleanTest::arg, OpExpr::args, ScalarArrayOpExpr::args, BoolExpr::args, BoolExpr::boolop, BooleanTest::booltesttype, DatumGetBool(), elog, ERROR, get_negator(), InvalidOid, IS_FALSE, IS_NOT_FALSE, IS_NOT_NULL, IS_NOT_TRUE, IS_NOT_UNKNOWN, IS_NULL, IS_TRUE, IS_UNKNOWN, lappend(), lfirst, linitial, OpExpr::location, ScalarArrayOpExpr::location, NullTest::location, BooleanTest::location, make_andclause(), make_notclause(), make_orclause(), makeBoolConst(), makeNode, negate_clause(), NIL, nodeTag, NOT_EXPR, NullTest::nulltesttype, OpExpr::opno, ScalarArrayOpExpr::opno, OR_EXPR, and ScalarArrayOpExpr::useOr.
Referenced by eval_const_expressions_mutator(), match_boolean_partition_clause(), negate_clause(), and simplify_boolean_equality().
Definition at line 6720 of file planner.c.
References AccessShareLock, addRTEPermissionInfo(), build_simple_rel(), CMD_SELECT, Query::commandType, cost_qual_eval(), cost_sort(), create_index_path(), create_seqscan_path(), CurrentMemoryContext, Path::disabled_nodes, enable_indexscan, ForwardScanDirection, get_relation_data_width(), RelOptInfo::indexlist, IndexOptInfo::indexoid, RangeTblEntry::inh, lfirst_node, list_make1, maintenance_work_mem, makeNode, NIL, RelOptInfo::pages, IndexPath::path, QualCost::per_tuple, RangeTblEntry::relid, RelOptInfo::reltarget, root, RelOptInfo::rows, Query::rtable, RTE_RELATION, RangeTblEntry::rtekind, setup_simple_rel_arrays(), QualCost::startup, Path::total_cost, RelOptInfo::tuples, and PathTarget::width.
Referenced by copy_table_data().
Definition at line 6842 of file planner.c.
References AccessShareLock, addRTEPermissionInfo(), build_simple_rel(), CMD_SELECT, Query::commandType, compute_parallel_worker(), CurrentMemoryContext, estimate_rel_size(), index_close(), index_open(), RangeTblEntry::inh, is_parallel_safe(), IsUnderPostmaster, list_make1, maintenance_work_mem, makeNode, max_parallel_maintenance_workers, Min, NoLock, RelationData::rd_rel, RelOptInfo::rel_parallel_workers, RelationGetIndexExpressions(), RelationGetIndexPredicate(), RangeTblEntry::relid, root, Query::rtable, RTE_RELATION, RangeTblEntry::rtekind, setup_simple_rel_arrays(), table_close(), and table_open().
Referenced by index_build().
struct PlannedStmt * planner | ( | Query * | parse, |
const char * | query_string, | ||
int | cursorOptions, | ||
struct ParamListInfoData * | boundParams | ||
) |
Definition at line 152 of file predtest.c.
References linitial, list_length(), NIL, and predicate_implied_by_recurse().
Referenced by add_predicate_to_index_quals(), build_paths_for_OR(), check_index_predicates(), choose_bitmap_and(), ConstraintImpliedByRelConstraint(), create_bitmap_scan_plan(), create_bitmap_subplan(), create_indexscan_plan(), infer_arbiter_indexes(), and test_predtest().
Definition at line 222 of file predtest.c.
References linitial, list_length(), NIL, and predicate_refuted_by_recurse().
Referenced by gen_partprune_steps_internal(), relation_excluded_by_constraints(), and test_predtest().
Definition at line 653 of file var.c.
References Assert(), pull_var_clause_context::flags, NIL, pull_var_clause_walker(), PVC_INCLUDE_AGGREGATES, PVC_INCLUDE_PLACEHOLDERS, PVC_INCLUDE_WINDOWFUNCS, PVC_RECURSE_AGGREGATES, PVC_RECURSE_PLACEHOLDERS, PVC_RECURSE_WINDOWFUNCS, and pull_var_clause_context::varlist.
Referenced by add_paths_with_pathkeys_for_rel(), AddRelationNewConstraints(), build_base_rel_tlists(), build_remote_returning(), build_tlist_to_deparse(), CreateTriggerFiringOn(), distribute_qual_to_rels(), estimate_num_groups(), find_computable_ec_member(), find_placeholders_in_expr(), fix_placeholder_input_needed_levels(), foreign_grouping_ok(), generate_base_implied_equalities_no_const(), make_group_input_target(), make_partial_grouping_target(), make_sort_input_target(), make_window_input_target(), preprocess_targetlist(), process_implied_equality(), qual_is_pushdown_safe(), rebuild_eclass_attr_needed(), rebuild_joinclause_attr_needed(), rebuild_placeholder_attr_needed(), semijoin_target_ok(), and StoreRelCheck().
Definition at line 296 of file var.c.
References pull_varattnos_walker(), pull_varattnos_context::varattnos, and pull_varattnos_context::varno.
Referenced by check_index_only(), check_selective_binary_conversion(), ComputePartitionAttrs(), create_foreignscan_plan(), CreateStatistics(), DefineIndex(), deparseReturningList(), ExecInitGenerated(), get_dependent_generated_columns(), has_partition_attrs(), postgresGetForeignRelSize(), RelationGetIndexAttrBitmap(), remove_unused_subquery_outputs(), and statext_is_compatible_clause().
Bitmapset * pull_varnos | ( | PlannerInfo * | root, |
Node * | node | ||
) |
Definition at line 114 of file var.c.
References pull_varnos_walker(), query_or_expression_tree_walker, pull_varnos_context::root, root, pull_varnos_context::sublevels_up, and pull_varnos_context::varnos.
Referenced by compute_semijoin_info(), convert_ANY_sublink_to_join(), convert_EXISTS_sublink_to_join(), cost_incremental_sort(), distribute_qual_to_rels(), examine_variable(), expand_indexqual_rowcompare(), extract_lateral_vars_from_PHVs(), find_placeholder_info(), get_eclass_for_sort_expr(), is_pseudo_constant_for_index(), IsTidEqualAnyClause(), join_is_removable(), make_outerjoininfo(), make_plain_restrictinfo(), match_rowcompare_to_indexcol(), match_saopclause_to_indexcol(), NumRelids(), pg_get_expr_worker(), process_implied_equality(), pullup_replace_vars_callback(), remove_leftjoinrel_from_query(), and subquery_planner().
Bitmapset * pull_varnos_of_level | ( | PlannerInfo * | root, |
Node * | node, | ||
int | levelsup | ||
) |
Definition at line 140 of file var.c.
References pull_varnos_walker(), query_or_expression_tree_walker, pull_varnos_context::root, root, pull_varnos_context::sublevels_up, and pull_varnos_context::varnos.
Referenced by add_nullingrels_if_needed(), convert_ANY_sublink_to_join(), is_simple_subquery(), jointree_contains_lateral_outer_refs(), and mark_nullable_by_grouping().
Definition at line 339 of file var.c.
References NIL, pull_vars_walker(), query_or_expression_tree_walker, pull_vars_context::sublevels_up, and pull_vars_context::vars.
Referenced by extract_lateral_references(), and extract_lateral_vars_from_PHVs().
|
extern |
Definition at line 133 of file costsize.c.
Referenced by genericcostestimate(), and gincostestimate().
|
extern |
Definition at line 134 of file costsize.c.
Referenced by add_function_cost(), brincostestimate(), btcostestimate(), cached_plan_cost(), cost_agg(), cost_bitmap_and_node(), cost_bitmap_or_node(), cost_bitmap_tree_node(), cost_gather_merge(), cost_group(), cost_material(), cost_memoize_rescan(), cost_merge_append(), cost_qual_eval_walker(), cost_rescan(), cost_subplan(), cost_tuplesort(), cost_valuesscan(), cost_windowagg(), create_mergejoin_plan(), create_setop_path(), create_unique_path(), create_upper_unique_path(), estimate_path_cost_size(), final_cost_mergejoin(), find_simplified_clause(), genericcostestimate(), gincostestimate(), gistcostestimate(), initial_cost_hashjoin(), inline_function(), make_sort_input_target(), order_qual_clauses(), spgcostestimate(), and test_support_func().
|
extern |
Definition at line 132 of file costsize.c.
Referenced by cost_agg(), cost_append(), cost_bitmap_heap_scan(), cost_ctescan(), cost_functionscan(), cost_incremental_sort(), cost_index(), cost_memoize_rescan(), cost_merge_append(), cost_namedtuplestorescan(), cost_recursive_union(), cost_rescan(), cost_resultscan(), cost_samplescan(), cost_seqscan(), cost_subqueryscan(), cost_tablefuncscan(), cost_tidrangescan(), cost_tidscan(), cost_valuesscan(), cost_windowagg(), create_group_result_path(), create_lockrows_path(), create_memoize_path(), create_minmaxagg_path(), create_projection_path(), create_set_projection_path(), estimate_costs(), estimate_path_cost_size(), final_cost_hashjoin(), final_cost_mergejoin(), final_cost_nestloop(), and initial_cost_hashjoin().
|
extern |
Definition at line 67 of file planner.c.
Referenced by ProcessParallelMessage(), query_planner(), and standard_planner().
|
extern |
Definition at line 139 of file costsize.c.
Referenced by gistBuildCallback(), gistInitBuffering(), and index_pages_fetched().
|
extern |
Definition at line 69 of file planner.c.
Referenced by get_useful_pathkeys_for_distinct().
|
extern |
Definition at line 68 of file planner.c.
Referenced by ExecGather(), ExecGatherMerge(), ExecInitGather(), and get_parallel_divisor().
|
extern |
Definition at line 136 of file costsize.c.
Referenced by cost_gather(), cost_gather_merge(), and standard_planner().
|
extern |
Definition at line 135 of file costsize.c.
Referenced by cost_gather(), cost_gather_merge(), and standard_planner().
|
extern |
Definition at line 131 of file costsize.c.
Referenced by cost_agg(), cost_tuplesort(), get_tablespace_page_costs(), and tablespace_reloptions().
|
extern |
Definition at line 137 of file costsize.c.
Referenced by set_cte_size_estimates().
|
extern |
Definition at line 130 of file costsize.c.
Referenced by cost_agg(), cost_material(), cost_rescan(), cost_tuplesort(), estimate_costs(), estimate_path_cost_size(), get_tablespace_page_costs(), initial_cost_hashjoin(), and tablespace_reloptions().