diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-10-14 22:14:35 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-10-14 22:14:35 +0000 |
commit | d508b057ac0834eb6ea83b10ba9fd6c439b454a4 (patch) | |
tree | c100e9e56c25d3f6f57cd2be986b294258665a36 /src/include/nodes/parsenodes.h | |
parent | ea3728ee5b60ee479caa865590d14f71f612dcdb (diff) | |
download | postgresql-d508b057ac0834eb6ea83b10ba9fd6c439b454a4.tar.gz postgresql-d508b057ac0834eb6ea83b10ba9fd6c439b454a4.zip |
Adjust handling of command status strings in the presence of rules,
as per recent pghackers discussions. initdb forced due to change in
fields of stored Query nodes.
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) */ |