aboutsummaryrefslogtreecommitdiff
path: root/src/include/nodes/parsenodes.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-01-15 22:36:35 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2010-01-15 22:36:35 +0000
commit08f8d478ebc37e42f3ced07d17dae83d6a9a3810 (patch)
treeaedef12bd96c3a789c72ae38e3cfab39801d4556 /src/include/nodes/parsenodes.h
parent00b5ccebdd0d2925a2e5db0fdf067ea4b7bae799 (diff)
downloadpostgresql-08f8d478ebc37e42f3ced07d17dae83d6a9a3810.tar.gz
postgresql-08f8d478ebc37e42f3ced07d17dae83d6a9a3810.zip
Do parse analysis of an EXPLAIN's contained statement during the normal
parse analysis phase, rather than at execution time. This makes parameter handling work the same as it does in ordinary plannable queries, and in particular fixes the incompatibility that Pavel pointed out with plpgsql's new handling of variable references. plancache.c gets a little bit grottier, but the alternatives seem worse.
Diffstat (limited to 'src/include/nodes/parsenodes.h')
-rw-r--r--src/include/nodes/parsenodes.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 9a0bb8eec3f..a03597c9f37 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -13,7 +13,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.423 2010/01/06 05:31:14 itagaki Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.424 2010/01/15 22:36:35 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -2260,12 +2260,16 @@ typedef struct VacuumStmt
/* ----------------------
* Explain Statement
+ *
+ * The "query" field is either a raw parse tree (SelectStmt, InsertStmt, etc)
+ * or a Query node if parse analysis has been done. Note that rewriting and
+ * planning of the query are always postponed until execution of EXPLAIN.
* ----------------------
*/
typedef struct ExplainStmt
{
NodeTag type;
- Node *query; /* the query (as a raw parse tree) */
+ Node *query; /* the query (see comments above) */
List *options; /* list of DefElem nodes */
} ExplainStmt;