Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf1fb9e0

Browse files
committed
Prevent EXPLAIN (without ANALYZE) SELECT ... INTO from creating an INTO
table. Needed due to recent change that makes us call ExecutorStarteven when not planning to carry out the query.
1 parent14e6823 commitf1fb9e0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

‎src/backend/commands/explain.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994-5, Regents of the University of California
88
*
99
* 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 $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -193,6 +193,14 @@ ExplainOnePlan(QueryDesc *queryDesc, ExplainStmt *stmt,
193193
ExplainState*es;
194194
StringInfostr;
195195

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+
196204
gettimeofday(&starttime,NULL);
197205

198206
/* call ExecutorStart to prepare the plan for execution */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp