|
7 | 7 | * Portions Copyright (c) 1994-5, Regents of the University of California |
8 | 8 | * |
9 | 9 | * IDENTIFICATION |
10 | | - * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.104 2003/03/10 03:53:49 tgl Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.105 2003/04/03 22:35:48 tgl Exp $ |
11 | 11 | * |
12 | 12 | *------------------------------------------------------------------------- |
13 | 13 | */ |
@@ -193,6 +193,14 @@ ExplainOnePlan(QueryDesc *queryDesc, ExplainStmt *stmt, |
193 | 193 | ExplainState*es; |
194 | 194 | StringInfostr; |
195 | 195 |
|
| 196 | +/* |
| 197 | + * If we are not going to execute, suppress any SELECT INTO marker. |
| 198 | + * Without this, ExecutorStart will create the INTO target table, |
| 199 | + * which we don't want. |
| 200 | + */ |
| 201 | +if (!stmt->analyze) |
| 202 | +queryDesc->parsetree->into=NULL; |
| 203 | + |
196 | 204 | gettimeofday(&starttime,NULL); |
197 | 205 |
|
198 | 206 | /* call ExecutorStart to prepare the plan for execution */ |
|