11<!--
2- $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table_as.sgml,v 1.13 2003/05/04 00:03:55 tgl Exp $
2+ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table_as.sgml,v 1.14 2003/07/01 00:04:31 petere Exp $
33PostgreSQL documentation
44-->
55
@@ -26,11 +26,12 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE <replaceable>table_name
2626
2727 <para>
2828 <command>CREATE TABLE AS</command> creates a table and fills it
29- with data computed by a <command>SELECT</command> command. The
30- table columns have the names and data types associated with the
31- output columns of the <command>SELECT</command> (except that you
32- can override the column names by giving an explicit list of new
33- column names).
29+ with data computed by a <command>SELECT</command> command or an
30+ <command>EXECUTE</command> that runs a prepared
31+ <command>SELECT</command> command. The table columns have the
32+ names and data types associated with the output columns of the
33+ <command>SELECT</command> (except that you can override the column
34+ names by giving an explicit list of new column names).
3435 </para>
3536
3637 <para>
@@ -73,7 +74,9 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE <replaceable>table_name
7374 <para>
7475 The name of a column in the new table. If column names are not
7576 provided, they are taken from the output column names of the
76- query.
77+ query. If the table is created out of an
78+ <command>EXECUTE</command> command, a column name list can
79+ currently not be specified.
7780 </para>
7881 </listitem>
7982 </varlistentry>
@@ -82,10 +85,12 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE <replaceable>table_name
8285 <term><replaceable>query</replaceable></term>
8386 <listitem>
8487 <para>
85- A query statement (that is, a <command>SELECT</command>
86- command). Refer to
87- <xref linkend="sql-select" endterm="sql-select-title">
88- for a description of the allowed syntax.
88+ A query statement (that is, a <command>SELECT</command> command
89+ or an <command>EXECUTE</command> command that runs a prepared
90+ <command>SELECT</command> command). Refer to <xref
91+ linkend="sql-select" endterm="sql-select-title"> or <xref
92+ linkend="sql-execute" endterm="sql-execute-title">,
93+ respectively, for a description of the allowed syntax.
8994 </para>
9095 </listitem>
9196 </varlistentry>
@@ -96,9 +101,11 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE <replaceable>table_name
96101 <title>Diagnostics</title>
97102
98103 <para>
99- Refer to <xref linkend="sql-createtable" endterm="sql-createtable-title"> and
100- <xref linkend="sql-select" endterm="sql-select-title">
101- for a summary of possible output messages.
104+ Refer to <xref linkend="sql-createtable"
105+ endterm="sql-createtable-title">, <xref linkend="sql-select"
106+ endterm="sql-select-title">, and <xref linkend="sql-execute"
107+ endterm="sql-execute-title"> for a summary of possible output
108+ messages.
102109 </para>
103110 </refsect1>
104111
@@ -131,6 +138,7 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE <replaceable>table_name
131138 <simplelist type="inline">
132139 <member><xref linkend="sql-createtable" endterm="sql-createtable-title"></member>
133140 <member><xref linkend="sql-createview" endterm="sql-createview-title"></member>
141+ <member><xref linkend="sql-execute" endterm="sql-execute-title"></member>
134142 <member><xref linkend="sql-select" endterm="sql-select-title"></member>
135143 <member><xref linkend="sql-selectinto" endterm="sql-selectinto-title"></member>
136144 </simplelist>