PostgreSQL Source Code  git master
prep.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * prep.h
4  * prototypes for files in optimizer/prep/
5  *
6  *
7  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/optimizer/prep.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef PREP_H
15 #define PREP_H
16 
17 #include "nodes/plannodes.h"
18 #include "nodes/relation.h"
19 
20 
21 /*
22  * prototypes for prepjointree.c
23  */
24 extern void pull_up_sublinks(PlannerInfo *root);
26 extern void pull_up_subqueries(PlannerInfo *root);
27 extern void flatten_simple_union_all(PlannerInfo *root);
28 extern void reduce_outer_joins(PlannerInfo *root);
29 extern Relids get_relids_in_jointree(Node *jtnode, bool include_joins);
30 extern Relids get_relids_for_join(PlannerInfo *root, int joinrelid);
31 
32 /*
33  * prototypes for prepqual.c
34  */
35 extern Node *negate_clause(Node *node);
36 extern Expr *canonicalize_qual(Expr *qual, bool is_check);
37 
38 /*
39  * prototypes for preptlist.c
40  */
42 
43 extern PlanRowMark *get_plan_rowmark(List *rowmarks, Index rtindex);
44 
45 /*
46  * prototypes for prepunion.c
47  */
49 
50 extern void expand_inherited_tables(PlannerInfo *root);
51 
52 extern Node *adjust_appendrel_attrs(PlannerInfo *root, Node *node,
53  int nappinfos, AppendRelInfo **appinfos);
54 
56  Relids child_relids,
57  Relids top_parent_relids);
58 
60  Relids relids, int *nappinfos);
61 
63  SpecialJoinInfo *parent_sjinfo,
64  Relids left_relids, Relids right_relids);
66  Relids child_relids, Relids top_parent_relids);
67 
68 #endif /* PREP_H */
void flatten_simple_union_all(PlannerInfo *root)
void pull_up_subqueries(PlannerInfo *root)
Definition: prepjointree.c:607
Relids get_relids_for_join(PlannerInfo *root, int joinrelid)
Node * adjust_appendrel_attrs(PlannerInfo *root, Node *node, int nappinfos, AppendRelInfo **appinfos)
Definition: prepunion.c:2047
void pull_up_sublinks(PlannerInfo *root)
Definition: prepjointree.c:150
Definition: nodes.h:517
void reduce_outer_joins(PlannerInfo *root)
SpecialJoinInfo * build_child_join_sjinfo(PlannerInfo *root, SpecialJoinInfo *parent_sjinfo, Relids left_relids, Relids right_relids)
Definition: prepunion.c:2574
Node * negate_clause(Node *node)
Definition: prepqual.c:73
Node * adjust_appendrel_attrs_multilevel(PlannerInfo *root, Node *node, Relids child_relids, Relids top_parent_relids)
Definition: prepunion.c:2534
unsigned int Index
Definition: c.h:442
Relids get_relids_in_jointree(Node *jtnode, bool include_joins)
AppendRelInfo ** find_appinfos_by_relids(PlannerInfo *root, Relids relids, int *nappinfos)
Definition: prepunion.c:2618
void inline_set_returning_functions(PlannerInfo *root)
Definition: prepjointree.c:573
Expr * canonicalize_qual(Expr *qual, bool is_check)
Definition: prepqual.c:291
List * preprocess_targetlist(PlannerInfo *root)
Definition: preptlist.c:70
PlanRowMark * get_plan_rowmark(List *rowmarks, Index rtindex)
Definition: preptlist.c:424
void expand_inherited_tables(PlannerInfo *root)
Definition: prepunion.c:1466
RelOptInfo * plan_set_operations(PlannerInfo *root)
Definition: prepunion.c:142
Definition: pg_list.h:45
Relids adjust_child_relids_multilevel(PlannerInfo *root, Relids relids, Relids child_relids, Relids top_parent_relids)
Definition: prepunion.c:2382