Permalink
Browse files

docs: mention CREATE TABLE LIKE linkage using INCLUDING DEFAULTS

Mention that CREATE TABLE LIKE INCLUDING DEFAULTS creates a link between
the original and new tables if a default function modifies the database,
like nextval().
  • Loading branch information...
1 parent 71c6a8e commit e2989fcab6150da5b4296eb1481284ad2825892e @bmomjian bmomjian committed Jan 25, 2014
Showing with 4 additions and 1 deletion.
  1. +4 −1 doc/src/sgml/ref/create_table.sgml
@@ -329,7 +329,10 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI
</para>
<para>
Default expressions for the copied column definitions will only be
- copied if <literal>INCLUDING DEFAULTS</literal> is specified. The
+ copied if <literal>INCLUDING DEFAULTS</literal> is specified.
+ Defaults that call database-modification functions, like
+ <function>nextval</>, create a linkage between the original and
+ new tables. The
default behavior is to exclude default expressions, resulting in the
copied columns in the new table having null defaults.
</para>

0 comments on commit e2989fc

Please sign in to comment.