PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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-2017, 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);
37 
38 /*
39  * prototypes for preptlist.c
40  */
41 extern List *preprocess_targetlist(PlannerInfo *root, List *tlist);
42 
44  int result_relation, List *range_table);
45 
46 extern PlanRowMark *get_plan_rowmark(List *rowmarks, Index rtindex);
47 
48 /*
49  * prototypes for prepunion.c
50  */
52 
53 extern void expand_inherited_tables(PlannerInfo *root);
54 
55 extern Node *adjust_appendrel_attrs(PlannerInfo *root, Node *node,
56  int nappinfos, AppendRelInfo **appinfos);
57 
59  Relids child_relids,
60  Relids top_parent_relids);
61 
63  Relids relids, int *nappinfos);
64 
66  SpecialJoinInfo *parent_sjinfo,
67  Relids left_relids, Relids right_relids);
69  Relids child_relids, Relids top_parent_relids);
70 
71 #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:1943
void pull_up_sublinks(PlannerInfo *root)
Definition: prepjointree.c:150
Definition: nodes.h:510
void reduce_outer_joins(PlannerInfo *root)
Expr * canonicalize_qual(Expr *qual)
Definition: prepqual.c:286
SpecialJoinInfo * build_child_join_sjinfo(PlannerInfo *root, SpecialJoinInfo *parent_sjinfo, Relids left_relids, Relids right_relids)
Definition: prepunion.c:2470
List * preprocess_onconflict_targetlist(List *tlist, int result_relation, List *range_table)
Definition: preptlist.c:206
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:2430
unsigned int Index
Definition: c.h:359
Relids get_relids_in_jointree(Node *jtnode, bool include_joins)
AppendRelInfo ** find_appinfos_by_relids(PlannerInfo *root, Relids relids, int *nappinfos)
Definition: prepunion.c:2514
void inline_set_returning_functions(PlannerInfo *root)
Definition: prepjointree.c:573
PlanRowMark * get_plan_rowmark(List *rowmarks, Index rtindex)
Definition: preptlist.c:401
void expand_inherited_tables(PlannerInfo *root)
Definition: prepunion.c:1342
RelOptInfo * plan_set_operations(PlannerInfo *root)
Definition: prepunion.c:143
List * preprocess_targetlist(PlannerInfo *root, List *tlist)
Definition: preptlist.c:64
Definition: pg_list.h:45
Relids adjust_child_relids_multilevel(PlannerInfo *root, Relids relids, Relids child_relids, Relids top_parent_relids)
Definition: prepunion.c:2278