~ubuntu-branches/ubuntu/trusty/postgresql-9.3/trusty-proposed

« back to all changes in this revision

Viewing changes to doc/src/sgml/man7/CREATE_TABLE_AS.7

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2016-03-31 11:04:53 UTC
  • mfrom: (1.1.11) (18.1.4 trusty-security)
  • Revision ID: package-import@ubuntu.com-20160331110453-h6xfs9f11suj3mze
Tags: 9.3.12-0ubuntu0.14.04
* New upstream bug fix release. (LP: #1564268)
  - See http://www.postgresql.org/about/news/1656/ for details.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
'\" t
2
2
.\"     Title: CREATE TABLE AS
3
3
.\"    Author: The PostgreSQL Global Development Group
4
 
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5
 
.\"      Date: 2015
6
 
.\"    Manual: PostgreSQL 9.3.9 Documentation
7
 
.\"    Source: PostgreSQL 9.3.9
 
4
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
 
5
.\"      Date: 2016
 
6
.\"    Manual: PostgreSQL 9.3.12 Documentation
 
7
.\"    Source: PostgreSQL 9.3.12
8
8
.\"  Language: English
9
9
.\"
10
 
.TH "CREATE TABLE AS" "7" "2015" "PostgreSQL 9.3.9" "PostgreSQL 9.3.9 Documentation"
 
10
.TH "CREATE TABLE AS" "7" "2016" "PostgreSQL 9.3.12" "PostgreSQL 9.3.12 Documentation"
11
11
.\" -----------------------------------------------------------------
12
12
.\" * Define some portability stuff
13
13
.\" -----------------------------------------------------------------
43
43
.fi
44
44
.SH "DESCRIPTION"
45
45
.PP
46
 
 
47
46
\fBCREATE TABLE AS\fR
48
47
creates a table and fills it with data computed by a
49
48
\fBSELECT\fR
51
50
\fBSELECT\fR
52
51
(except that you can override the column names by giving an explicit list of new column names)\&.
53
52
.PP
54
 
 
55
53
\fBCREATE TABLE AS\fR
56
54
bears some resemblance to creating a view, but it is really quite different: it creates a new table and evaluates the query just once to fill the new table initially\&. The new table will not track subsequent changes to the source tables of the query\&. In contrast, a view re\-evaluates its defining
57
55
\fBSELECT\fR
248
246
.\}
249
247
.SH "COMPATIBILITY"
250
248
.PP
251
 
 
252
249
\fBCREATE TABLE AS\fR
253
250
conforms to the
254
251
SQL