summaryrefslogtreecommitdiff
path: root/src/backend/tcop/utility.c
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/backend/tcop/utility.c
parent00b5ccebdd0d2925a2e5db0fdf067ea4b7bae799 (diff)
downloadpostgresql-08f8d478ebc37e42f3ced07d17dae83d6a9a3810.tar.gz
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/backend/tcop/utility.c')
-rw-r--r--src/backend/tcop/utility.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index acacbec094..96b0aa735f 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.328 2010/01/06 03:04:01 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.329 2010/01/15 22:36:34 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -2438,6 +2438,7 @@ GetCommandLogLevel(Node *parsetree)
if (strcmp(opt->defname, "analyze") == 0)
analyze = defGetBoolean(opt);
+ /* don't "break", as explain.c will use the last value */
}
if (analyze)
return GetCommandLogLevel(stmt->query);