OSDN Git Service

Subselects in FROM clause, per ISO syntax: FROM (SELECT ...) [AS] alias.
[pg-rex/syncrep.git] / src / include / parser / parse_node.h
1 /*-------------------------------------------------------------------------
2  *
3  * parse_node.h
4  *
5  *
6  * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * $Id: parse_node.h,v 1.22 2000/09/29 18:21:40 tgl Exp $
10  *
11  *-------------------------------------------------------------------------
12  */
13 #ifndef PARSE_NODE_H
14 #define PARSE_NODE_H
15
16 #include "nodes/parsenodes.h"
17 #include "utils/rel.h"
18
19 /*
20  * State information used during parse analysis
21  */
22 typedef struct ParseState
23 {
24         struct ParseState *parentParseState; /* stack link */
25         List       *p_rtable;           /* range table so far */
26         List       *p_joinlist;         /* join items so far (will become
27                                                                  * FromExpr node's fromlist) */
28         int                     p_last_resno;   /* last targetlist resno assigned */
29         bool            p_hasAggs;
30         bool            p_hasSubLinks;
31         bool            p_is_insert;
32         bool            p_is_update;
33         Relation        p_target_relation;
34         RangeTblEntry *p_target_rangetblentry;
35 } ParseState;
36
37 extern ParseState *make_parsestate(ParseState *parentParseState);
38 extern Expr *make_op(char *opname, Node *ltree, Node *rtree);
39 extern Node *make_operand(char *opname, Node *tree,
40                          Oid orig_typeId, Oid target_typeId);
41 extern Var *make_var(ParseState *pstate, RangeTblEntry *rte, int attrno);
42 extern ArrayRef *transformArraySubscripts(ParseState *pstate,
43                                                  Node *arrayBase,
44                                                  List *indirection,
45                                                  bool forceSlice,
46                                                  Node *assignFrom);
47 extern Const *make_const(Value *value);
48
49 #endif   /* PARSE_NODE_H */