61 phv->
phid = ++(
root->glob->lastPHId);
92 if (phv->
phid <
root->placeholder_array_size)
93 phinfo =
root->placeholder_array[phv->
phid];
103 if (
root->placeholdersFrozen)
104 elog(
ERROR,
"too late to create a new PlaceHolderInfo");
149 if (phinfo->
phid >=
root->placeholder_array_size)
154 new_size =
root->placeholder_array_size ?
root->placeholder_array_size * 2 : 8;
155 while (phinfo->
phid >= new_size)
157 if (
root->placeholder_array)
158 root->placeholder_array =
161 root->placeholder_array =
163 root->placeholder_array_size = new_size;
165 root->placeholder_array[phinfo->
phid] = phinfo;
191 if (
root->glob->lastPHId != 0)
247 elog(
ERROR,
"unrecognized node type: %d",
304 foreach(lc,
root->placeholder_list)
331 foreach(lc,
root->placeholder_list)
360 foreach(lc,
root->placeholder_list)
408 foreach(lc,
root->placeholder_list)
497 if (
root->glob->lastPHId == 0)
bool bms_is_subset(const Bitmapset *a, const Bitmapset *b)
bool bms_is_member(int x, const Bitmapset *a)
Bitmapset * bms_difference(const Bitmapset *a, const Bitmapset *b)
Bitmapset * bms_add_members(Bitmapset *a, const Bitmapset *b)
Bitmapset * bms_int_members(Bitmapset *a, const Bitmapset *b)
Bitmapset * bms_copy(const Bitmapset *a)
bool bms_get_singleton_member(const Bitmapset *a, int *member)
bool bms_nonempty_difference(const Bitmapset *a, const Bitmapset *b)
#define Assert(condition)
void cost_qual_eval_node(QualCost *cost, Node *qual, PlannerInfo *root)
int32 clamp_width_est(int64 tuple_width)
#define palloc0_array(type, count)
void add_vars_to_targetlist(PlannerInfo *root, List *vars, Relids where_needed)
void add_vars_to_attr_needed(PlannerInfo *root, List *vars, Relids where_needed)
List * lappend(List *list, void *datum)
void list_free(List *list)
int32 get_typavgwidth(Oid typid, int32 typmod)
Oid exprType(const Node *expr)
int32 exprTypmod(const Node *expr)
#define query_tree_walker(q, w, c, f)
#define expression_tree_walker(n, w, c)
#define IsA(nodeptr, _type_)
#define PVC_RECURSE_AGGREGATES
#define PVC_RECURSE_WINDOWFUNCS
#define PVC_INCLUDE_PLACEHOLDERS
#define repalloc0_array(pointer, type, oldcount, count)
bool contain_placeholder_references_to(PlannerInfo *root, Node *clause, int relid)
PlaceHolderInfo * find_placeholder_info(PlannerInfo *root, PlaceHolderVar *phv)
void add_placeholders_to_joinrel(PlannerInfo *root, RelOptInfo *joinrel, RelOptInfo *outer_rel, RelOptInfo *inner_rel, SpecialJoinInfo *sjinfo)
void add_placeholders_to_base_rels(PlannerInfo *root)
struct contain_placeholder_references_context contain_placeholder_references_context
static bool contain_placeholder_references_walker(Node *node, contain_placeholder_references_context *context)
void fix_placeholder_input_needed_levels(PlannerInfo *root)
PlaceHolderVar * make_placeholder_expr(PlannerInfo *root, Expr *expr, Relids phrels)
static void find_placeholders_in_expr(PlannerInfo *root, Node *expr)
void rebuild_placeholder_attr_needed(PlannerInfo *root)
static void find_placeholders_recurse(PlannerInfo *root, Node *jtnode)
void find_placeholders_in_jointree(PlannerInfo *root)
RelOptInfo * find_base_rel(PlannerInfo *root, int relid)
struct PathTarget * reltarget
Relids direct_lateral_relids
List * pull_var_clause(Node *node, int flags)
Relids pull_varnos(PlannerInfo *root, Node *node)