1
1
<!--
2
- $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.37 2000/12/25 23:15:26 petere Exp $
2
+ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.38 2000/12/30 19:00:11 petere Exp $
3
3
Postgres documentation
4
4
-->
5
5
@@ -23,15 +23,17 @@ Postgres documentation
23
23
<date>2000-03-25</date>
24
24
</refsynopsisdivinfo>
25
25
<synopsis>
26
- CREATE [ TEMPORARY | TEMP ] TABLE <replaceable class="PARAMETER">table</replaceable> (
26
+ CREATE [ TEMPORARY | TEMP ] TABLE <replaceable class="PARAMETER">table</replaceable>
27
+ [ UNDER <replaceable>inherited_table</replaceable> [, ...] ]
28
+ (
27
29
<replaceable class="PARAMETER">column</replaceable> <replaceable class="PARAMETER">type</replaceable>
28
30
[ NULL | NOT NULL ] [ UNIQUE ] [ DEFAULT <replaceable class="PARAMETER">value</replaceable> ]
29
31
[<replaceable>column_constraint_clause</replaceable> | PRIMARY KEY } [ ... ] ]
30
32
[, ... ]
31
33
[, PRIMARY KEY ( <replaceable class="PARAMETER">column</replaceable> [, ...] ) ]
32
34
[, CHECK ( <replaceable class="PARAMETER">condition</replaceable> ) ]
33
35
[, <replaceable>table_constraint_clause</replaceable> ]
34
- ) [ UNDER <replaceable>inherited_table</replaceable> [, ...] ]
36
+ )
35
37
</synopsis>
36
38
37
39
<refsect2 id="R2-SQL-CREATETABLE-1">
@@ -58,7 +60,7 @@ CREATE [ TEMPORARY | TEMP ] TABLE <replaceable class="PARAMETER">table</replacea
58
60
<term><replaceable class="PARAMETER">table</replaceable></term>
59
61
<listitem>
60
62
<para>
61
- The name ofa new class or table to be created.
63
+ The name ofthe new table to be created.
62
64
</para>
63
65
</listitem>
64
66
</varlistentry>
@@ -205,7 +207,7 @@ ERROR: DEFAULT: type mismatched
205
207
</title>
206
208
207
209
<para>
208
- <command>CREATE TABLE</command> will enter a newclass or table
210
+ <command>CREATE TABLE</command> will enter a new table
209
211
into the current data base. The table will be "owned" by the user issuing the
210
212
command.
211
213
</para>
@@ -230,18 +232,18 @@ ERROR: DEFAULT: type mismatched
230
232
231
233
<para>
232
234
The optional UNDER
233
- clause specifies a collection ofclass names from which thisclass
235
+ clause specifies a collection oftable names from which thistable
234
236
automatically inherits all fields. If any inherited field name
235
237
appears more than once, Postgres reports an error. Postgres automatically
236
- allows the createdclass to inherit functions onclasses above it in
238
+ allows the createdtable to inherit functions ontables above it in
237
239
the inheritance hierarchy. Inheritance of functions is done according
238
240
to the conventions of the Common Lisp Object System (CLOS).
239
241
</para>
240
242
241
243
<para>
242
- Each new tableor class <replaceable class="PARAMETER">table</replaceable>
243
- is automatically created as a type. Therefore, one or moreinstances
244
- from theclass are automatically a type and can be used in
244
+ Each new table <replaceable class="PARAMETER">table</replaceable>
245
+ is automatically created as a type. Therefore, one or morerows
246
+ from thetable are automatically a type and can be used in
245
247
<xref linkend="sql-altertable" endterm="sql-altertable-title">
246
248
or other <command>CREATE TABLE</command> statements.
247
249
</para>
@@ -1831,16 +1833,6 @@ CREATE TABLE distributors (
1831
1833
</programlisting>
1832
1834
</para>
1833
1835
1834
- <refsect2 id="R2-SQL-CREATETABLE-3">
1835
- <title>
1836
- Notes
1837
- </title>
1838
- <para>
1839
- CREATE TABLE/UNDER is defined by SQL3. Multiple inheritance is a
1840
- <productname>Postgres</productname> language extension.
1841
- </para>
1842
- </refsect2>
1843
-
1844
1836
</refsect1>
1845
1837
1846
1838
<refsect1 id="R1-SQL-CREATETABLE-3">