PostgreSQL Source Code  git master
clauses.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * clauses.h
4  * prototypes for clauses.c.
5  *
6  *
7  * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/optimizer/clauses.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef CLAUSES_H
15 #define CLAUSES_H
16 
17 #include "nodes/pathnodes.h"
18 
19 typedef struct
20 {
21  int numWindowFuncs; /* total number of WindowFuncs found */
22  Index maxWinRef; /* windowFuncs[] is indexed 0 .. maxWinRef */
23  List **windowFuncs; /* lists of WindowFuncs for each winref */
25 
26 extern bool contain_agg_clause(Node *clause);
27 
28 extern bool contain_window_function(Node *clause);
29 extern WindowFuncLists *find_window_functions(Node *clause, Index maxWinRef);
30 
31 extern double expression_returns_set_rows(PlannerInfo *root, Node *clause);
32 
33 extern bool contain_subplans(Node *clause);
34 
35 extern char max_parallel_hazard(Query *parse);
36 extern bool is_parallel_safe(PlannerInfo *root, Node *node);
37 extern bool contain_nonstrict_functions(Node *clause);
38 extern bool contain_exec_param(Node *clause, List *param_ids);
39 extern bool contain_leaked_vars(Node *clause);
40 
41 extern Relids find_nonnullable_rels(Node *clause);
42 extern List *find_nonnullable_vars(Node *clause);
43 extern List *find_forced_null_vars(Node *node);
44 extern Var *find_forced_null_var(Node *node);
45 
46 extern bool is_pseudo_constant_clause(Node *clause);
47 extern bool is_pseudo_constant_clause_relids(Node *clause, Relids relids);
48 
49 extern int NumRelids(PlannerInfo *root, Node *clause);
50 
51 extern void CommuteOpExpr(OpExpr *clause);
52 
54  RangeTblEntry *rte);
55 
56 extern Bitmapset *pull_paramids(Expr *expr);
57 
58 #endif /* CLAUSES_H */
unsigned int Index
Definition: c.h:550
WindowFuncLists * find_window_functions(Node *clause, Index maxWinRef)
Definition: clauses.c:227
bool contain_agg_clause(Node *clause)
Definition: clauses.c:177
int NumRelids(PlannerInfo *root, Node *clause)
Definition: clauses.c:2010
bool is_pseudo_constant_clause(Node *clause)
Definition: clauses.c:1968
bool contain_window_function(Node *clause)
Definition: clauses.c:214
bool is_pseudo_constant_clause_relids(Node *clause, Relids relids)
Definition: clauses.c:1988
Var * find_forced_null_var(Node *node)
Definition: clauses.c:1857
List * find_forced_null_vars(Node *node)
Definition: clauses.c:1796
Query * inline_set_returning_function(PlannerInfo *root, RangeTblEntry *rte)
Definition: clauses.c:4899
bool contain_leaked_vars(Node *clause)
Definition: clauses.c:1144
Bitmapset * pull_paramids(Expr *expr)
Definition: clauses.c:5245
Relids find_nonnullable_rels(Node *clause)
Definition: clauses.c:1336
List * find_nonnullable_vars(Node *clause)
Definition: clauses.c:1587
char max_parallel_hazard(Query *parse)
Definition: clauses.c:615
bool is_parallel_safe(PlannerInfo *root, Node *node)
Definition: clauses.c:634
bool contain_nonstrict_functions(Node *clause)
Definition: clauses.c:874
bool contain_subplans(Node *clause)
Definition: clauses.c:330
void CommuteOpExpr(OpExpr *clause)
Definition: clauses.c:2025
double expression_returns_set_rows(PlannerInfo *root, Node *clause)
Definition: clauses.c:289
bool contain_exec_param(Node *clause, List *param_ids)
Definition: clauses.c:1018
static struct subre * parse(struct vars *v, int stopper, int type, struct state *init, struct state *final)
Definition: regcomp.c:717
Definition: pg_list.h:52
Definition: nodes.h:118
Definition: primnodes.h:205
List ** windowFuncs
Definition: clauses.h:23
Index maxWinRef
Definition: clauses.h:22
int numWindowFuncs
Definition: clauses.h:21