PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
restrictinfo.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * restrictinfo.h
4  * prototypes for restrictinfo.c.
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/restrictinfo.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef RESTRICTINFO_H
15 #define RESTRICTINFO_H
16 
17 #include "nodes/relation.h"
18 
19 
20 /* Convenience macro for the common case of a valid-everywhere qual */
21 #define make_simple_restrictinfo(clause) \
22  make_restrictinfo(clause, true, false, false, 0, NULL, NULL, NULL)
23 
24 extern RestrictInfo *make_restrictinfo(Expr *clause,
25  bool is_pushed_down,
26  bool outerjoin_delayed,
27  bool pseudoconstant,
28  Index security_level,
29  Relids required_relids,
30  Relids outer_relids,
31  Relids nullable_relids);
32 extern bool restriction_is_or_clause(RestrictInfo *restrictinfo);
33 extern bool restriction_is_securely_promotable(RestrictInfo *restrictinfo,
34  RelOptInfo *rel);
35 extern List *get_actual_clauses(List *restrictinfo_list);
36 extern List *extract_actual_clauses(List *restrictinfo_list,
37  bool pseudoconstant);
38 extern void extract_actual_join_clauses(List *restrictinfo_list,
39  List **joinquals,
40  List **otherquals);
41 extern bool join_clause_is_movable_to(RestrictInfo *rinfo, RelOptInfo *baserel);
42 extern bool join_clause_is_movable_into(RestrictInfo *rinfo,
43  Relids currentrelids,
44  Relids current_and_outer);
45 
46 #endif /* RESTRICTINFO_H */
bool join_clause_is_movable_to(RestrictInfo *rinfo, RelOptInfo *baserel)
Definition: restrictinfo.c:437
bool join_clause_is_movable_into(RestrictInfo *rinfo, Relids currentrelids, Relids current_and_outer)
Definition: restrictinfo.c:510
void extract_actual_join_clauses(List *restrictinfo_list, List **joinquals, List **otherquals)
Definition: restrictinfo.c:383
bool restriction_is_or_clause(RestrictInfo *restrictinfo)
Definition: restrictinfo.c:295
unsigned int Index
Definition: c.h:359
RestrictInfo * make_restrictinfo(Expr *clause, bool is_pushed_down, bool outerjoin_delayed, bool pseudoconstant, Index security_level, Relids required_relids, Relids outer_relids, Relids nullable_relids)
Definition: restrictinfo.c:57
List * get_actual_clauses(List *restrictinfo_list)
Definition: restrictinfo.c:333
Definition: pg_list.h:45
bool restriction_is_securely_promotable(RestrictInfo *restrictinfo, RelOptInfo *rel)
Definition: restrictinfo.c:310
List * extract_actual_clauses(List *restrictinfo_list, bool pseudoconstant)
Definition: restrictinfo.c:356