PostgreSQL Source Code
git master
|
Go to the source code of this file.
Param* assign_nestloop_param_placeholdervar | ( | PlannerInfo * | root, |
PlaceHolderVar * | phv | ||
) |
Definition at line 283 of file subselect.c.
References Assert, assign_param_for_placeholdervar(), exprCollation(), exprType(), exprTypmod(), i, Param::location, makeNode, PARAM_EXEC, Param::paramcollid, Param::paramid, Param::paramkind, Param::paramtype, Param::paramtypmod, PlaceHolderVar::phexpr, and PlaceHolderVar::phlevelsup.
Referenced by replace_nestloop_params_mutator().
Param* assign_nestloop_param_var | ( | PlannerInfo * | root, |
Var * | var | ||
) |
Definition at line 177 of file subselect.c.
References Assert, assign_param_for_var(), i, Var::location, Param::location, makeNode, PARAM_EXEC, Param::paramcollid, Param::paramid, Param::paramkind, Param::paramtype, Param::paramtypmod, Var::varcollid, Var::varlevelsup, Var::vartype, and Var::vartypmod.
Referenced by replace_nestloop_params_mutator().
JoinExpr* convert_ANY_sublink_to_join | ( | PlannerInfo * | root, |
SubLink * | sublink, | ||
Relids | available_rels | ||
) |
Definition at line 1317 of file subselect.c.
References addRangeTableEntryForSubquery(), JoinExpr::alias, ANY_SUBLINK, Assert, bms_is_empty(), bms_is_subset(), contain_vars_of_level(), contain_volatile_functions(), convert_testexpr(), generate_subquery_vars(), JoinExpr::isNatural, JOIN_SEMI, JoinExpr::jointype, lappend(), JoinExpr::larg, list_length(), make_parsestate(), makeAlias(), makeNode, NIL, parse(), PlannerInfo::parse, pull_varnos(), JoinExpr::quals, JoinExpr::rarg, Query::rtable, JoinExpr::rtindex, SubLink::subLinkType, SubLink::subselect, SubLink::testexpr, and JoinExpr::usingClause.
Referenced by pull_up_sublinks_qual_recurse().
JoinExpr* convert_EXISTS_sublink_to_join | ( | PlannerInfo * | root, |
SubLink * | sublink, | ||
bool | under_not, | ||
Relids | available_rels | ||
) |
Definition at line 1422 of file subselect.c.
References JoinExpr::alias, Assert, bms_add_member(), bms_first_member(), bms_free(), bms_is_empty(), bms_is_subset(), contain_vars_of_level(), contain_volatile_functions(), copyObject, Query::cteList, EXISTS_SUBLINK, FromExpr::fromlist, IncrementVarSublevelsUp(), JoinExpr::isNatural, JOIN_ANTI, JOIN_SEMI, Query::jointree, JoinExpr::jointype, JoinExpr::larg, linitial, list_concat(), list_length(), makeNode, NIL, OffsetVarNodes(), parse(), PlannerInfo::parse, pull_varnos(), JoinExpr::quals, FromExpr::quals, JoinExpr::rarg, Query::rtable, JoinExpr::rtindex, simplify_EXISTS_query(), SubLink::subLinkType, SubLink::subselect, and JoinExpr::usingClause.
Referenced by pull_up_sublinks_qual_recurse().
int SS_assign_special_param | ( | PlannerInfo * | root | ) |
Definition at line 429 of file subselect.c.
References PlannerInfo::glob, InvalidOid, lappend_oid(), list_length(), and PlannerGlobal::paramExecTypes.
Referenced by create_gather_merge_plan(), create_gather_plan(), grouping_planner(), inheritance_planner(), SS_process_ctes(), and subquery_planner().
void SS_attach_initplans | ( | PlannerInfo * | root, |
Plan * | plan | ||
) |
Definition at line 2227 of file subselect.c.
References PlannerInfo::init_plans, and Plan::initPlan.
Referenced by create_plan().
void SS_charge_for_initplans | ( | PlannerInfo * | root, |
RelOptInfo * | final_rel | ||
) |
Definition at line 2170 of file subselect.c.
References RelOptInfo::consider_parallel, PlannerInfo::init_plans, lfirst, NIL, Path::parallel_safe, RelOptInfo::partial_pathlist, RelOptInfo::pathlist, SubPlan::per_call_cost, SubPlan::startup_cost, Path::startup_cost, and Path::total_cost.
Referenced by build_minmax_path(), and subquery_planner().
void SS_finalize_plan | ( | PlannerInfo * | root, |
Plan * | plan | ||
) |
Definition at line 2242 of file subselect.c.
References finalize_plan(), and PlannerInfo::outer_params.
Referenced by standard_planner().
void SS_identify_outer_params | ( | PlannerInfo * | root | ) |
Definition at line 2108 of file subselect.c.
References bms_add_member(), PlannerInfo::glob, PlannerInfo::init_plans, lfirst, lfirst_int, NIL, PlannerInfo::outer_params, PlannerGlobal::paramExecTypes, PlannerParamItem::paramId, PlannerInfo::parent_root, PlannerInfo::plan_params, SubPlan::setParam, and PlannerInfo::wt_param_id.
Referenced by build_minmax_path(), and subquery_planner().
void SS_make_initplan_from_plan | ( | PlannerInfo * | root, |
PlannerInfo * | subroot, | ||
Plan * | plan, | ||
Param * | prm | ||
) |
Definition at line 2997 of file subselect.c.
References cost_subplan(), EXPR_SUBLINK, SubPlan::firstColCollation, SubPlan::firstColType, SubPlan::firstColTypmod, get_first_col_type(), PlannerInfo::glob, PlannerInfo::init_plans, lappend(), list_length(), list_make1_int, makeNode, Param::paramid, SubPlan::plan_id, SubPlan::plan_name, psprintf(), SubPlan::setParam, SubPlan::subLinkType, PlannerGlobal::subplans, and PlannerGlobal::subroots.
Referenced by create_minmaxagg_plan().
Param* SS_make_initplan_output_param | ( | PlannerInfo * | root, |
Oid | resulttype, | ||
int32 | resulttypmod, | ||
Oid | resultcollation | ||
) |
Definition at line 2982 of file subselect.c.
References generate_new_param().
Referenced by preprocess_minmax_aggregates().
void SS_process_ctes | ( | PlannerInfo * | root | ) |
Definition at line 1158 of file subselect.c.
References SubPlan::args, Assert, RelOptInfo::cheapest_total_path, CMD_SELECT, copyObject, cost_subplan(), create_plan(), PlannerInfo::cte_plan_ids, CTE_SUBLINK, Query::cteList, CommonTableExpr::ctename, CommonTableExpr::ctequery, CommonTableExpr::cterecursive, CommonTableExpr::cterefcount, elog, ERROR, fetch_upper_rel(), SubPlan::firstColCollation, SubPlan::firstColType, SubPlan::firstColTypmod, get_first_col_type(), PlannerInfo::glob, PlannerInfo::init_plans, lappend(), lappend_int(), lfirst, list_length(), list_make1_int, makeNode, NIL, SubPlan::parallel_safe, SubPlan::paramIds, SubPlan::parParam, PlannerInfo::parse, SubPlan::plan_id, SubPlan::plan_name, PlannerInfo::plan_params, psprintf(), SubPlan::setParam, splan, SS_assign_special_param(), SubPlan::subLinkType, PlannerGlobal::subplans, subquery_planner(), PlannerGlobal::subroots, SubPlan::testexpr, SubPlan::unknownEqFalse, UPPERREL_FINAL, and SubPlan::useHashTable.
Referenced by subquery_planner().
Node* SS_process_sublinks | ( | PlannerInfo * | root, |
Node * | expr, | ||
bool | isQual | ||
) |
Definition at line 1961 of file subselect.c.
References process_sublinks_context::isTopQual, process_sublinks_mutator(), convert_testexpr_context::root, and process_sublinks_context::root.
Referenced by build_subplan(), and preprocess_expression().
Node* SS_replace_correlation_vars | ( | PlannerInfo * | root, |
Node * | expr | ||
) |
Definition at line 1916 of file subselect.c.
References replace_correlation_vars_mutator().
Referenced by preprocess_expression().