1996-08-27 21:59:28 -04:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
|
*
|
1999-02-13 18:22:53 -05:00
|
|
|
* nodeFuncs.h
|
2008-08-25 18:42:34 -04:00
|
|
|
* Various general-purpose manipulations of Node trees
|
1996-08-27 21:59:28 -04:00
|
|
|
*
|
2008-01-01 14:46:01 -05:00
|
|
|
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
2000-01-26 00:58:53 -05:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-08-27 21:59:28 -04:00
|
|
|
*
|
2008-08-28 19:09:48 -04:00
|
|
|
* $PostgreSQL: pgsql/src/include/nodes/nodeFuncs.h,v 1.28 2008/08/28 23:09:48 tgl Exp $
|
1996-08-27 21:59:28 -04:00
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
#ifndef NODEFUNCS_H
|
|
|
|
|
#define NODEFUNCS_H
|
|
|
|
|
|
2008-08-25 18:42:34 -04:00
|
|
|
#include "nodes/parsenodes.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* flags bits for query_tree_walker and query_tree_mutator */
|
|
|
|
|
#define QTW_IGNORE_RT_SUBQUERIES 0x01 /* subqueries in rtable */
|
|
|
|
|
#define QTW_IGNORE_JOINALIASES 0x02 /* JOIN alias var lists */
|
|
|
|
|
#define QTW_DONT_COPY_QUERY 0x04 /* do not copy top Query */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern Oid exprType(Node *expr);
|
|
|
|
|
extern int32 exprTypmod(Node *expr);
|
|
|
|
|
extern bool exprIsLengthCoercion(Node *expr, int32 *coercedTypmod);
|
|
|
|
|
extern bool expression_returns_set(Node *clause);
|
|
|
|
|
|
2008-08-28 19:09:48 -04:00
|
|
|
extern int exprLocation(Node *expr);
|
|
|
|
|
|
2008-08-25 18:42:34 -04:00
|
|
|
extern bool expression_tree_walker(Node *node, bool (*walker) (),
|
|
|
|
|
void *context);
|
|
|
|
|
extern Node *expression_tree_mutator(Node *node, Node *(*mutator) (),
|
|
|
|
|
void *context);
|
|
|
|
|
|
|
|
|
|
extern bool query_tree_walker(Query *query, bool (*walker) (),
|
|
|
|
|
void *context, int flags);
|
|
|
|
|
extern Query *query_tree_mutator(Query *query, Node *(*mutator) (),
|
|
|
|
|
void *context, int flags);
|
|
|
|
|
|
|
|
|
|
extern bool range_table_walker(List *rtable, bool (*walker) (),
|
|
|
|
|
void *context, int flags);
|
|
|
|
|
extern List *range_table_mutator(List *rtable, Node *(*mutator) (),
|
|
|
|
|
void *context, int flags);
|
1997-11-25 17:07:18 -05:00
|
|
|
|
2008-08-25 18:42:34 -04:00
|
|
|
extern bool query_or_expression_tree_walker(Node *node, bool (*walker) (),
|
|
|
|
|
void *context, int flags);
|
|
|
|
|
extern Node *query_or_expression_tree_mutator(Node *node, Node *(*mutator) (),
|
|
|
|
|
void *context, int flags);
|
2001-10-28 01:26:15 -05:00
|
|
|
|
2001-11-05 12:46:40 -05:00
|
|
|
#endif /* NODEFUNCS_H */
|