]> granicus.if.org Git - postgresql/blob - src/include/nodes/nodeFuncs.h
Add an "argisrow" field to NullTest nodes, following a plan made way back in
[postgresql] / src / include / nodes / nodeFuncs.h
1 /*-------------------------------------------------------------------------
2  *
3  * nodeFuncs.h
4  *              Various general-purpose manipulations of Node trees
5  *
6  * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * $PostgreSQL: pgsql/src/include/nodes/nodeFuncs.h,v 1.31 2009/06/11 14:49:11 momjian Exp $
10  *
11  *-------------------------------------------------------------------------
12  */
13 #ifndef NODEFUNCS_H
14 #define NODEFUNCS_H
15
16 #include "nodes/parsenodes.h"
17
18
19 /* flags bits for query_tree_walker and query_tree_mutator */
20 #define QTW_IGNORE_RT_SUBQUERIES        0x01            /* subqueries in rtable */
21 #define QTW_IGNORE_CTE_SUBQUERIES       0x02            /* subqueries in cteList */
22 #define QTW_IGNORE_RC_SUBQUERIES        0x03            /* both of above */
23 #define QTW_IGNORE_JOINALIASES          0x04            /* JOIN alias var lists */
24 #define QTW_EXAMINE_RTES                        0x08            /* examine RTEs */
25 #define QTW_DONT_COPY_QUERY                     0x10            /* do not copy top Query */
26
27
28 extern Oid      exprType(Node *expr);
29 extern int32 exprTypmod(Node *expr);
30 extern bool exprIsLengthCoercion(Node *expr, int32 *coercedTypmod);
31 extern bool expression_returns_set(Node *clause);
32
33 extern int      exprLocation(Node *expr);
34
35 extern bool expression_tree_walker(Node *node, bool (*walker) (),
36                                                                                            void *context);
37 extern Node *expression_tree_mutator(Node *node, Node *(*mutator) (),
38                                                                                                  void *context);
39
40 extern bool query_tree_walker(Query *query, bool (*walker) (),
41                                                                                   void *context, int flags);
42 extern Query *query_tree_mutator(Query *query, Node *(*mutator) (),
43                                                                                          void *context, int flags);
44
45 extern bool range_table_walker(List *rtable, bool (*walker) (),
46                                                                                    void *context, int flags);
47 extern List *range_table_mutator(List *rtable, Node *(*mutator) (),
48                                                                                          void *context, int flags);
49
50 extern bool query_or_expression_tree_walker(Node *node, bool (*walker) (),
51                                                                                                    void *context, int flags);
52 extern Node *query_or_expression_tree_mutator(Node *node, Node *(*mutator) (),
53                                                                                                    void *context, int flags);
54
55 extern bool raw_expression_tree_walker(Node *node, bool (*walker) (),
56                                                                                                    void *context);
57
58 #endif   /* NODEFUNCS_H */