]> granicus.if.org Git - postgresql/blob - src/include/optimizer/restrictinfo.h
Teach planner about some cases where a restriction clause can be
[postgresql] / src / include / optimizer / restrictinfo.h
1 /*-------------------------------------------------------------------------
2  *
3  * restrictinfo.h
4  *        prototypes for restrictinfo.c.
5  *
6  *
7  * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * $PostgreSQL: pgsql/src/include/optimizer/restrictinfo.h,v 1.32 2005/07/02 23:00:42 tgl Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef RESTRICTINFO_H
15 #define RESTRICTINFO_H
16
17 #include "nodes/relation.h"
18
19
20 extern RestrictInfo *make_restrictinfo(Expr *clause,
21                                                                            bool is_pushed_down,
22                                                                            Relids required_relids);
23 extern List *make_restrictinfo_from_bitmapqual(Path *bitmapqual,
24                                                                                            bool is_pushed_down);
25 extern bool restriction_is_or_clause(RestrictInfo *restrictinfo);
26 extern List *get_actual_clauses(List *restrictinfo_list);
27 extern void get_actual_join_clauses(List *restrictinfo_list,
28                                                 List **joinquals, List **otherquals);
29 extern List *remove_redundant_join_clauses(PlannerInfo *root,
30                                                           List *restrictinfo_list,
31                                                           bool isouterjoin);
32 extern List *select_nonredundant_join_clauses(PlannerInfo *root,
33                                                                  List *restrictinfo_list,
34                                                                  List *reference_list,
35                                                                  bool isouterjoin);
36
37 #endif   /* RESTRICTINFO_H */