Header And Logo

PostgreSQL
| The world's most advanced open source database.

restrictinfo.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * restrictinfo.h
00004  *    prototypes for restrictinfo.c.
00005  *
00006  *
00007  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00008  * Portions Copyright (c) 1994, Regents of the University of California
00009  *
00010  * src/include/optimizer/restrictinfo.h
00011  *
00012  *-------------------------------------------------------------------------
00013  */
00014 #ifndef RESTRICTINFO_H
00015 #define RESTRICTINFO_H
00016 
00017 #include "nodes/relation.h"
00018 
00019 
00020 /* Convenience macro for the common case of a valid-everywhere qual */
00021 #define make_simple_restrictinfo(clause)  \
00022     make_restrictinfo(clause, true, false, false, NULL, NULL, NULL)
00023 
00024 extern RestrictInfo *make_restrictinfo(Expr *clause,
00025                   bool is_pushed_down,
00026                   bool outerjoin_delayed,
00027                   bool pseudoconstant,
00028                   Relids required_relids,
00029                   Relids outer_relids,
00030                   Relids nullable_relids);
00031 extern List *make_restrictinfo_from_bitmapqual(Path *bitmapqual,
00032                                   bool is_pushed_down,
00033                                   bool include_predicates);
00034 extern List *make_restrictinfos_from_actual_clauses(PlannerInfo *root,
00035                                        List *clause_list);
00036 extern bool restriction_is_or_clause(RestrictInfo *restrictinfo);
00037 extern List *get_actual_clauses(List *restrictinfo_list);
00038 extern List *get_all_actual_clauses(List *restrictinfo_list);
00039 extern List *extract_actual_clauses(List *restrictinfo_list,
00040                        bool pseudoconstant);
00041 extern void extract_actual_join_clauses(List *restrictinfo_list,
00042                             List **joinquals,
00043                             List **otherquals);
00044 extern bool join_clause_is_movable_to(RestrictInfo *rinfo, Index baserelid);
00045 extern bool join_clause_is_movable_into(RestrictInfo *rinfo,
00046                             Relids currentrelids,
00047                             Relids current_and_outer);
00048 
00049 #endif   /* RESTRICTINFO_H */