From b147418a88ec5f1706dcbb8a9656661aee950359 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 27 Oct 2008 08:47:14 +0000 Subject: [PATCH] Allow EXPLAIN on CREATE TABLE AS. --- doc/src/sgml/ref/explain.sgml | 8 +++++--- src/backend/parser/gram.y | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/ref/explain.sgml b/doc/src/sgml/ref/explain.sgml index 4465686646..6590e9639e 100644 --- a/doc/src/sgml/ref/explain.sgml +++ b/doc/src/sgml/ref/explain.sgml @@ -78,7 +78,8 @@ EXPLAIN [ ANALYZE ] [ VERBOSE ] statementEXPLAIN ANALYZE on an INSERT, UPDATE, - DELETE, or EXECUTE statement + DELETE, CREATE TABLE AS, + or EXECUTE statement without letting the command affect your data, use this approach: BEGIN; @@ -116,8 +117,9 @@ ROLLBACK; Any SELECT, INSERT, UPDATE, - DELETE, VALUES, EXECUTE, or - DECLARE statement, whose execution plan you wish to see. + DELETE, VALUES, EXECUTE, + DECLARE, or CREATE TABLE AS + statement, whose execution plan you wish to see. diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 14e072e6ee..932654937d 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -5898,6 +5898,7 @@ ExplainableStmt: | UpdateStmt | DeleteStmt | DeclareCursorStmt + | CreateAsStmt | ExecuteStmt /* by default all are $$=$1 */ ; -- 2.39.5