PostgreSQL Source Code  git master
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-2021, 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/pathnodes.h"
18 
19 
20 /* Convenience macro for the common case of a valid-everywhere qual */
21 #define make_simple_restrictinfo(root, clause) \
22  make_restrictinfo(root, clause, true, false, false, 0, NULL, NULL, NULL)
23 
25  Expr *clause,
26  bool is_pushed_down,
27  bool outerjoin_delayed,
28  bool pseudoconstant,
29  Index security_level,
30  Relids required_relids,
31  Relids outer_relids,
32  Relids nullable_relids);
33 extern RestrictInfo *commute_restrictinfo(RestrictInfo *rinfo, Oid comm_op);
34 extern bool restriction_is_or_clause(RestrictInfo *restrictinfo);
35 extern bool restriction_is_securely_promotable(RestrictInfo *restrictinfo,
36  RelOptInfo *rel);
37 extern List *get_actual_clauses(List *restrictinfo_list);
38 extern List *extract_actual_clauses(List *restrictinfo_list,
39  bool pseudoconstant);
40 extern void extract_actual_join_clauses(List *restrictinfo_list,
41  Relids joinrelids,
42  List **joinquals,
43  List **otherquals);
44 extern bool join_clause_is_movable_to(RestrictInfo *rinfo, RelOptInfo *baserel);
45 extern bool join_clause_is_movable_into(RestrictInfo *rinfo,
46  Relids currentrelids,
47  Relids current_and_outer);
48 
49 #endif /* RESTRICTINFO_H */
bool join_clause_is_movable_to(RestrictInfo *rinfo, RelOptInfo *baserel)
Definition: restrictinfo.c:525
bool join_clause_is_movable_into(RestrictInfo *rinfo, Relids currentrelids, Relids current_and_outer)
Definition: restrictinfo.c:598
RestrictInfo * commute_restrictinfo(RestrictInfo *rinfo, Oid comm_op)
Definition: restrictinfo.c:326
unsigned int Oid
Definition: postgres_ext.h:31
void extract_actual_join_clauses(List *restrictinfo_list, Relids joinrelids, List **joinquals, List **otherquals)
Definition: restrictinfo.c:470
bool restriction_is_or_clause(RestrictInfo *restrictinfo)
Definition: restrictinfo.c:382
unsigned int Index
Definition: c.h:549
RestrictInfo * make_restrictinfo(PlannerInfo *root, 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:61
List * get_actual_clauses(List *restrictinfo_list)
Definition: restrictinfo.c:420
Definition: pg_list.h:50
bool restriction_is_securely_promotable(RestrictInfo *restrictinfo, RelOptInfo *rel)
Definition: restrictinfo.c:397
List * extract_actual_clauses(List *restrictinfo_list, bool pseudoconstant)
Definition: restrictinfo.c:443