]> granicus.if.org Git - postgresql/blob - src/include/optimizer/prep.h
Allow the planner to collapse explicit inner JOINs together, rather than
[postgresql] / src / include / optimizer / prep.h
1 /*-------------------------------------------------------------------------
2  *
3  * prep.h
4  *        prototypes for files in optimizer/prep/
5  *
6  *
7  * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * $Id: prep.h,v 1.35 2003/01/25 23:10:30 tgl Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef PREP_H
15 #define PREP_H
16
17 #include "nodes/parsenodes.h"
18 #include "nodes/plannodes.h"
19
20 /*
21  * prototypes for prepjointree.c
22  */
23 extern int      from_collapse_limit;
24 extern int      join_collapse_limit;
25
26 extern Node *pull_up_IN_clauses(Query *parse, Node *node);
27 extern Node *pull_up_subqueries(Query *parse, Node *jtnode,
28                                    bool below_outer_join);
29 extern Node *preprocess_jointree(Query *parse, Node *jtnode);
30 extern List *get_relids_in_jointree(Node *jtnode);
31 extern List *get_relids_for_join(Query *parse, int joinrelid);
32
33 /*
34  * prototypes for prepqual.c
35  */
36 extern List *canonicalize_qual(Expr *qual, bool removeAndFlag);
37 extern List *cnfify(Expr *qual, bool removeAndFlag);
38
39 /*
40  * prototypes for preptlist.c
41  */
42 extern List *preprocess_targetlist(List *tlist, int command_type,
43                                           Index result_relation, List *range_table);
44
45 /*
46  * prototypes for prepunion.c
47  */
48 extern Plan *plan_set_operations(Query *parse);
49
50 extern List *find_all_inheritors(Oid parentrel);
51
52 extern List *expand_inherted_rtentry(Query *parse, Index rti,
53                                                 bool dup_parent);
54
55 extern Node *adjust_inherited_attrs(Node *node,
56                                            Index old_rt_index, Oid old_relid,
57                                            Index new_rt_index, Oid new_relid);
58
59 extern bool tlist_same_datatypes(List *tlist, List *colTypes, bool junkOK);
60
61 #endif   /* PREP_H */