diff options
Diffstat (limited to 'src/include/nodes/parsenodes.h')
-rw-r--r-- | src/include/nodes/parsenodes.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index cde4acebc21..ee0d2210134 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: parsenodes.h,v 1.208 2002/09/22 19:42:52 tgl Exp $ + * $Id: parsenodes.h,v 1.209 2002/10/14 22:14:35 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -17,6 +17,17 @@ #include "nodes/primnodes.h" +/* Possible sources of a Query */ +typedef enum QuerySource +{ + QSRC_ORIGINAL, /* original parsetree (explicit query) */ + QSRC_PARSER, /* added by parse analysis */ + QSRC_INSTEAD_RULE, /* added by unconditional INSTEAD rule */ + QSRC_QUAL_INSTEAD_RULE, /* added by conditional INSTEAD rule */ + QSRC_NON_INSTEAD_RULE /* added by non-INSTEAD rule */ +} QuerySource; + + /***************************************************************************** * Query Tree *****************************************************************************/ @@ -37,6 +48,8 @@ typedef struct Query CmdType commandType; /* select|insert|update|delete|utility */ + QuerySource querySource; /* where did I come from? */ + Node *utilityStmt; /* non-null if this is a non-optimizable * statement */ @@ -49,8 +62,6 @@ typedef struct Query bool hasAggs; /* has aggregates in tlist or havingQual */ bool hasSubLinks; /* has subquery SubLink */ - bool originalQuery; /* marks original query through rewriting */ - List *rtable; /* list of range table entries */ FromExpr *jointree; /* table join tree (FROM and WHERE * clauses) */ |