1
1
<!--
2
- $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table_as.sgml,v 1.4 2000/12/25 23:15:26 petere Exp $
2
+ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table_as.sgml,v 1.5 2001/03/03 22:11:40 tgl Exp $
3
3
Postgres documentation
4
4
-->
5
5
@@ -20,10 +20,10 @@ Postgres documentation
20
20
</refnamediv>
21
21
<refsynopsisdiv>
22
22
<refsynopsisdivinfo>
23
- <date>1999-07-20 </date>
23
+ <date>2001-03-03 </date>
24
24
</refsynopsisdivinfo>
25
25
<synopsis>
26
- CREATE TABLE <replaceable>table</replaceable> [ (<replaceable>column</replaceable> [, ...] ) ]
26
+ CREATE [ TEMPORARY | TEMP ] TABLE <replaceable>table</replaceable> [ (<replaceable>column</replaceable> [, ...] ) ]
27
27
AS <replaceable>select_clause</replaceable>
28
28
</synopsis>
29
29
@@ -37,6 +37,20 @@ CREATE TABLE <replaceable>table</replaceable> [ (<replaceable>column</replaceabl
37
37
<para>
38
38
39
39
<variablelist>
40
+ <varlistentry>
41
+ <term>TEMPORARY or TEMP</term>
42
+ <listitem>
43
+ <para>
44
+ If specified, the table is created only for this session, and is
45
+ automatically dropped on session exit.
46
+ Existing permanent tables with the same name are not visible
47
+ (in this session) while the temporary table exists.
48
+ Any indexes created on a temporary table are automatically
49
+ temporary as well.
50
+ </para>
51
+ </listitem>
52
+ </varlistentry>
53
+
40
54
<varlistentry>
41
55
<term><replaceable>table</replaceable></term>
42
56
<listitem>
@@ -51,7 +65,9 @@ CREATE TABLE <replaceable>table</replaceable> [ (<replaceable>column</replaceabl
51
65
<listitem>
52
66
<para>
53
67
The name of a column. Multiple column names can be specified using
54
- a comma-delimited list of column names.
68
+ a comma-delimited list of column names. If column names are not
69
+ provided, they are taken from the output column names of the
70
+ SELECT query.
55
71
</para>
56
72
</listitem>
57
73
</varlistentry>
@@ -94,7 +110,7 @@ CREATE TABLE <replaceable>table</replaceable> [ (<replaceable>column</replaceabl
94
110
<para>
95
111
<command>CREATE TABLE AS</command> enables a table to be created
96
112
from the contents of an existing table.
97
- It is functionality equivalent to
113
+ It is functionally equivalent to
98
114
<xref linkend="sql-selectinto" endterm="sql-selectinto-title">,
99
115
but with perhaps a more direct syntax.
100
116
</para>
0 commit comments