PostgreSQL Source Code git master
|
#include "postgres.h"
#include "nodes/nodeFuncs.h"
#include "nodes/plannodes.h"
#include "optimizer/paramassign.h"
#include "optimizer/placeholder.h"
#include "rewrite/rewriteManip.h"
Go to the source code of this file.
|
static |
Definition at line 150 of file paramassign.c.
References Assert(), copyObject, exprType(), if(), IncrementVarSublevelsUp(), IsA, PlannerParamItem::item, lappend(), lappend_oid(), lfirst, list_length(), makeNode, PlannerParamItem::paramId, PlaceHolderVar::phid, PlaceHolderVar::phlevelsup, and root.
Referenced by replace_outer_placeholdervar().
|
static |
Definition at line 66 of file paramassign.c.
References bms_equal(), copyObject, if(), IsA, PlannerParamItem::item, lappend(), lappend_oid(), lfirst, list_length(), makeNode, PlannerParamItem::paramId, root, Var::varattno, Var::varlevelsup, Var::varno, and Var::varreturningtype.
Referenced by replace_outer_var().
int assign_special_exec_param | ( | PlannerInfo * | root | ) |
Definition at line 711 of file paramassign.c.
References InvalidOid, lappend_oid(), list_length(), and root.
Referenced by create_gather_merge_plan(), create_gather_plan(), grouping_planner(), SS_process_ctes(), and subquery_planner().
Param * generate_new_exec_param | ( | PlannerInfo * | root, |
Oid | paramtype, | ||
int32 | paramtypmod, | ||
Oid | paramcollation | ||
) |
Definition at line 684 of file paramassign.c.
References lappend_oid(), list_length(), Param::location, makeNode, PARAM_EXEC, Param::paramid, Param::paramkind, Param::paramtype, and root.
Referenced by build_subplan(), convert_EXISTS_to_ANY(), generate_subquery_params(), replace_nestloop_param_placeholdervar(), replace_nestloop_param_var(), and SS_make_initplan_output_param().
List * identify_current_nestloop_params | ( | PlannerInfo * | root, |
Relids | leftrelids | ||
) |
Definition at line 629 of file paramassign.c.
References bms_intersect(), bms_is_member(), bms_is_subset(), find_placeholder_info(), foreach_delete_current, IsA, lappend(), lfirst, NIL, NestLoopParam::paramval, PlaceHolderInfo::ph_eval_at, PlaceHolderVar::phnullingrels, root, and Var::varno.
Referenced by create_nestloop_plan().
void process_subquery_nestloop_params | ( | PlannerInfo * | root, |
List * | subplan_params | ||
) |
Definition at line 527 of file paramassign.c.
References Assert(), bms_is_member(), bms_is_subset(), copyObject, elog, equal(), ERROR, find_placeholder_info(), if(), IsA, PlannerParamItem::item, lappend(), lfirst, lfirst_node, makeNode, PlannerParamItem::paramId, root, and Var::varno.
Referenced by create_subqueryscan_plan().
Param * replace_nestloop_param_placeholdervar | ( | PlannerInfo * | root, |
PlaceHolderVar * | phv | ||
) |
Definition at line 463 of file paramassign.c.
References copyObject, equal(), exprCollation(), exprType(), exprTypmod(), generate_new_exec_param(), lappend(), lfirst, Param::location, makeNode, PARAM_EXEC, Param::paramid, Param::paramkind, NestLoopParam::paramno, Param::paramtype, NestLoopParam::paramval, and root.
Referenced by replace_nestloop_params_mutator().
Param * replace_nestloop_param_var | ( | PlannerInfo * | root, |
Var * | var | ||
) |
Definition at line 414 of file paramassign.c.
References copyObject, equal(), generate_new_exec_param(), lappend(), lfirst, Var::location, Param::location, makeNode, PARAM_EXEC, Param::paramid, Param::paramkind, NestLoopParam::paramno, Param::paramtype, NestLoopParam::paramval, and root.
Referenced by replace_nestloop_params_mutator().
Param * replace_outer_agg | ( | PlannerInfo * | root, |
Aggref * | agg | ||
) |
Definition at line 225 of file paramassign.c.
References Assert(), copyObject, IncrementVarSublevelsUp(), PlannerParamItem::item, lappend(), lappend_oid(), list_length(), Param::location, Aggref::location, makeNode, PARAM_EXEC, PlannerParamItem::paramId, Param::paramid, Param::paramkind, Param::paramtype, and root.
Referenced by replace_correlation_vars_mutator().
Param * replace_outer_grouping | ( | PlannerInfo * | root, |
GroupingFunc * | grp | ||
) |
Definition at line 271 of file paramassign.c.
References GroupingFunc::agglevelsup, Assert(), copyObject, exprType(), IncrementVarSublevelsUp(), InvalidOid, PlannerParamItem::item, lappend(), lappend_oid(), list_length(), Param::location, GroupingFunc::location, makeNode, PARAM_EXEC, PlannerParamItem::paramId, Param::paramid, Param::paramkind, Param::paramtype, and root.
Referenced by replace_correlation_vars_mutator().
Param * replace_outer_merge_support | ( | PlannerInfo * | root, |
MergeSupportFunc * | msf | ||
) |
Definition at line 318 of file paramassign.c.
References Assert(), CMD_MERGE, copyObject, elog, ERROR, exprType(), InvalidOid, PlannerParamItem::item, lappend(), lappend_oid(), list_length(), Param::location, MergeSupportFunc::location, makeNode, PARAM_EXEC, PlannerParamItem::paramId, Param::paramid, Param::paramkind, Param::paramtype, and root.
Referenced by replace_correlation_vars_mutator().
Param * replace_outer_placeholdervar | ( | PlannerInfo * | root, |
PlaceHolderVar * | phv | ||
) |
Definition at line 198 of file paramassign.c.
References Assert(), assign_param_for_placeholdervar(), exprCollation(), exprType(), exprTypmod(), i, Param::location, makeNode, PARAM_EXEC, Param::paramid, Param::paramkind, Param::paramtype, PlaceHolderVar::phlevelsup, and root.
Referenced by replace_correlation_vars_mutator().
Param * replace_outer_returning | ( | PlannerInfo * | root, |
ReturningExpr * | rexpr | ||
) |
Definition at line 368 of file paramassign.c.
References Assert(), copyObject, exprCollation(), exprLocation(), exprType(), exprTypmod(), IncrementVarSublevelsUp(), PlannerParamItem::item, lappend(), lappend_oid(), list_length(), Param::location, makeNode, PARAM_EXEC, PlannerParamItem::paramId, Param::paramid, Param::paramkind, Param::paramtype, ReturningExpr::retexpr, ReturningExpr::retlevelsup, and root.
Referenced by replace_correlation_vars_mutator().
Param * replace_outer_var | ( | PlannerInfo * | root, |
Var * | var | ||
) |
Definition at line 121 of file paramassign.c.
References Assert(), assign_param_for_var(), i, Var::location, Param::location, makeNode, PARAM_EXEC, Param::paramid, Param::paramkind, Param::paramtype, root, and Var::varlevelsup.
Referenced by replace_correlation_vars_mutator().