Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5163b94

Browse files
committed
Allow EXPLAIN on CREATE TABLE AS.
1 parent e5da8e1 commit 5163b94

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

doc/src/sgml/ref/explain.sgml

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/explain.sgml,v 1.42 2008/04/18 01:42:17 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/explain.sgml,v 1.43 2008/10/27 08:47:13 petere Exp $
33
PostgreSQL documentation
44
-->
55

@@ -78,7 +78,8 @@ EXPLAIN [ ANALYZE ] [ VERBOSE ] <replaceable class="parameter">statement</replac
7878
statement will happen as usual. If you wish to use
7979
<command>EXPLAIN ANALYZE</command> on an
8080
<command>INSERT</command>, <command>UPDATE</command>,
81-
<command>DELETE</command>, or <command>EXECUTE</command> statement
81+
<command>DELETE</command>, <command>CREATE TABLE AS</command>,
82+
or <command>EXECUTE</command> statement
8283
without letting the command affect your data, use this approach:
8384
<programlisting>
8485
BEGIN;
@@ -116,8 +117,9 @@ ROLLBACK;
116117
<listitem>
117118
<para>
118119
Any <command>SELECT</>, <command>INSERT</>, <command>UPDATE</>,
119-
<command>DELETE</>, <command>VALUES</>, <command>EXECUTE</>, or
120-
<command>DECLARE</> statement, whose execution plan you wish to see.
120+
<command>DELETE</>, <command>VALUES</>, <command>EXECUTE</>,
121+
<command>DECLARE</>, or <command>CREATE TABLE AS</command>
122+
statement, whose execution plan you wish to see.
121123
</para>
122124
</listitem>
123125
</varlistentry>

src/backend/parser/gram.y

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.628 2008/10/22 11:00:34 petere Exp $
14+
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.629 2008/10/27 08:47:14 petere Exp $
1515
*
1616
* HISTORY
1717
* AUTHOR DATE MAJOR EVENT
@@ -5898,6 +5898,7 @@ ExplainableStmt:
58985898
| UpdateStmt
58995899
| DeleteStmt
59005900
| DeclareCursorStmt
5901+
| CreateAsStmt
59015902
| ExecuteStmt /* by default all are $$=$1 */
59025903
;
59035904

0 commit comments

Comments
 (0)