PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
var.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * var.h
4  * prototypes for optimizer/util/var.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/var.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef VAR_H
15 #define VAR_H
16 
17 #include "nodes/relation.h"
18 
19 /* Bits that can be OR'd into the flags argument of pull_var_clause() */
20 #define PVC_INCLUDE_AGGREGATES 0x0001 /* include Aggrefs in output list */
21 #define PVC_RECURSE_AGGREGATES 0x0002 /* recurse into Aggref arguments */
22 #define PVC_INCLUDE_WINDOWFUNCS 0x0004 /* include WindowFuncs in output list */
23 #define PVC_RECURSE_WINDOWFUNCS 0x0008 /* recurse into WindowFunc arguments */
24 #define PVC_INCLUDE_PLACEHOLDERS 0x0010 /* include PlaceHolderVars in
25  * output list */
26 #define PVC_RECURSE_PLACEHOLDERS 0x0020 /* recurse into PlaceHolderVar
27  * arguments */
28 
29 
30 extern Relids pull_varnos(Node *node);
31 extern Relids pull_varnos_of_level(Node *node, int levelsup);
32 extern void pull_varattnos(Node *node, Index varno, Bitmapset **varattnos);
33 extern List *pull_vars_of_level(Node *node, int levelsup);
34 extern bool contain_var_clause(Node *node);
35 extern bool contain_vars_of_level(Node *node, int levelsup);
36 extern int locate_var_of_level(Node *node, int levelsup);
37 extern List *pull_var_clause(Node *node, int flags);
38 extern Node *flatten_join_alias_vars(PlannerInfo *root, Node *node);
39 
40 #endif /* VAR_H */
List * pull_var_clause(Node *node, int flags)
Definition: var.c:535
Relids pull_varnos_of_level(Node *node, int levelsup)
Definition: var.c:120
Definition: nodes.h:509
List * pull_vars_of_level(Node *node, int levelsup)
Definition: var.c:263
void pull_varattnos(Node *node, Index varno, Bitmapset **varattnos)
Definition: var.c:219
unsigned int Index
Definition: c.h:365
bool contain_vars_of_level(Node *node, int levelsup)
Definition: var.c:369
bool contain_var_clause(Node *node)
Definition: var.c:331
int locate_var_of_level(Node *node, int levelsup)
Definition: var.c:437
Definition: pg_list.h:45
Relids pull_varnos(Node *node)
Definition: var.c:95
Node * flatten_join_alias_vars(PlannerInfo *root, Node *node)
Definition: var.c:670