From aee52a6de3fa4b7c796a02df039f6995cb4b6981 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 3 Mar 2001 22:11:40 +0000 Subject: [PATCH] Document TEMP option. --- doc/src/sgml/ref/create_table_as.sgml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/doc/src/sgml/ref/create_table_as.sgml b/doc/src/sgml/ref/create_table_as.sgml index b3ba280271..a93989586a 100644 --- a/doc/src/sgml/ref/create_table_as.sgml +++ b/doc/src/sgml/ref/create_table_as.sgml @@ -1,5 +1,5 @@ @@ -20,10 +20,10 @@ Postgres documentation - 1999-07-20 + 2001-03-03 -CREATE TABLE table [ (column [, ...] ) ] +CREATE [ TEMPORARY | TEMP ] TABLE table [ (column [, ...] ) ] AS select_clause @@ -37,6 +37,20 @@ CREATE TABLE table [ (column + + TEMPORARY or TEMP + + + If specified, the table is created only for this session, and is + automatically dropped on session exit. + Existing permanent tables with the same name are not visible + (in this session) while the temporary table exists. + Any indexes created on a temporary table are automatically + temporary as well. + + + + table @@ -51,7 +65,9 @@ CREATE TABLE table [ (column The name of a column. Multiple column names can be specified using - a comma-delimited list of column names. + a comma-delimited list of column names. If column names are not + provided, they are taken from the output column names of the + SELECT query. @@ -94,7 +110,7 @@ CREATE TABLE table [ (column CREATE TABLE AS enables a table to be created from the contents of an existing table. - It is functionality equivalent to + It is functionally equivalent to , but with perhaps a more direct syntax.