Skip to content

Commit de87d47

Browse files
committed
Clarify documentation that primary key and unique constraints are copied
for CREATE TABLE LIKE ... INCLUDING INDEXES. Per report from david.sahagian@emc.com
1 parent 9e9a5b7 commit de87d47

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

doc/src/sgml/ref/create_table.sgml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -336,16 +336,13 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI
336336
</para>
337337
<para>
338338
Not-null constraints are always copied to the new table.
339-
<literal>CHECK</literal> constraints will only be copied if
340-
<literal>INCLUDING CONSTRAINTS</literal> is specified; other types of
341-
constraints will never be copied. Also, no distinction is made between
342-
column constraints and table constraints &mdash; when constraints are
343-
requested, all check constraints are copied.
344-
</para>
345-
<para>
346-
Any indexes on the original table will not be created on the new
347-
table, unless the <literal>INCLUDING INDEXES</literal> clause is
348-
specified.
339+
<literal>CHECK</literal> constraints will be copied only if
340+
<literal>INCLUDING CONSTRAINTS</literal> is specified.
341+
Indexes, <literal>PRIMARY KEY</>, and <literal>UNIQUE</> constraints
342+
on the original table will be created on the new table only if the
343+
<literal>INCLUDING INDEXES</literal> clause is specified.
344+
No distinction is made between column constraints and table
345+
constraints.
349346
</para>
350347
<para><literal>STORAGE</> settings for the copied column definitions will only
351348
be copied if <literal>INCLUDING STORAGE</literal> is specified. The

0 commit comments

Comments
 (0)