14 #ifndef REWRITEMANIP_H
15 #define REWRITEMANIP_H
24 typedef Node *(*replace_rte_variables_callback) (
Var *var,
45 List *src_rtable,
List *src_perminfos);
50 int min_sublevels_up);
52 int delta_sublevels_up,
int min_sublevels_up);
76 int target_varno,
int sublevels_up,
79 bool *outer_hasSubLinks);
84 int target_varno,
int sublevels_up,
85 const struct AttrMap *attno_map,
86 Oid to_rowtype,
bool *found_whole_row);
89 int target_varno,
int sublevels_up,
94 bool *outer_hasSubLinks);
bool contain_windowfuncs(Node *node)
Node * ReplaceVarsFromTargetList(Node *node, int target_varno, int sublevels_up, RangeTblEntry *target_rte, List *targetlist, ReplaceVarsNoMatchOption nomatch_option, int nomatch_varno, bool *outer_hasSubLinks)
void IncrementVarSublevelsUp_rtable(List *rtable, int delta_sublevels_up, int min_sublevels_up)
void ChangeVarNodes(Node *node, int rt_index, int new_index, int sublevels_up)
Node * replace_rte_variables_mutator(Node *node, replace_rte_variables_context *context)
void OffsetVarNodes(Node *node, int offset, int sublevels_up)
bool checkExprHasSubLink(Node *node)
Query * getInsertSelectQuery(Query *parsetree, Query ***subquery_ptr)
void CombineRangeTables(List **dst_rtable, List **dst_perminfos, List *src_rtable, List *src_perminfos)
void AddQual(Query *parsetree, Node *qual)
Node * remove_nulling_relids(Node *node, const Bitmapset *removable_relids, const Bitmapset *except_relids)
Node * replace_rte_variables(Node *node, int target_varno, int sublevels_up, replace_rte_variables_callback callback, void *callback_arg, bool *outer_hasSubLinks)
int locate_agg_of_level(Node *node, int levelsup)
Node *(* replace_rte_variables_callback)(Var *var, replace_rte_variables_context *context)
bool rangeTableEntry_used(Node *node, int rt_index, int sublevels_up)
Node * map_variable_attnos(Node *node, int target_varno, int sublevels_up, const struct AttrMap *attno_map, Oid to_rowtype, bool *found_whole_row)
bool contain_aggs_of_level(Node *node, int levelsup)
int locate_windowfunc(Node *node)
void AddInvertedQual(Query *parsetree, Node *qual)
Node * add_nulling_relids(Node *node, const Bitmapset *target_relids, const Bitmapset *added_relids)
@ REPLACEVARS_SUBSTITUTE_NULL
@ REPLACEVARS_CHANGE_VARNO
@ REPLACEVARS_REPORT_ERROR
void IncrementVarSublevelsUp(Node *node, int delta_sublevels_up, int min_sublevels_up)
replace_rte_variables_callback callback
static void callback(struct sockaddr *addr, struct sockaddr *mask, void *unused)