aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2014-01-25 14:32:48 -0500
committerBruce Momjian <bruce@momjian.us>2014-01-25 14:33:27 -0500
commite2989fcab6150da5b4296eb1481284ad2825892e (patch)
tree2c67cb93d617756c9462e13547c20bc69bbc45bf
parent71c6a8e375b138af8aa46d80226ea9e98f2b94bc (diff)
downloadpostgresql-e2989fcab6150da5b4296eb1481284ad2825892e.tar.gz
postgresql-e2989fcab6150da5b4296eb1481284ad2825892e.zip
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().
-rw-r--r--doc/src/sgml/ref/create_table.sgml5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml
index a422edd2313..e0b8a4ecaf6 100644
--- a/doc/src/sgml/ref/create_table.sgml
+++ b/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>