1 | /*------------------------------------------------------------------------- |
2 | * |
3 | * restrictinfo.h |
4 | * prototypes for restrictinfo.c. |
5 | * |
6 | * |
7 | * Portions Copyright (c) 1996-2019, 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(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 RestrictInfo *commute_restrictinfo(RestrictInfo *rinfo, Oid comm_op); |
33 | extern bool restriction_is_or_clause(RestrictInfo *restrictinfo); |
34 | extern bool restriction_is_securely_promotable(RestrictInfo *restrictinfo, |
35 | RelOptInfo *rel); |
36 | extern List *get_actual_clauses(List *restrictinfo_list); |
37 | extern List *(List *restrictinfo_list, |
38 | bool pseudoconstant); |
39 | extern void (List *restrictinfo_list, |
40 | Relids joinrelids, |
41 | List **joinquals, |
42 | List **otherquals); |
43 | extern bool join_clause_is_movable_to(RestrictInfo *rinfo, RelOptInfo *baserel); |
44 | extern bool join_clause_is_movable_into(RestrictInfo *rinfo, |
45 | Relids currentrelids, |
46 | Relids current_and_outer); |
47 | |
48 | #endif /* RESTRICTINFO_H */ |
49 | |