]> granicus.if.org Git - postgresql/commit
Apply identity sequence values on COPY
authorPeter Eisentraut <peter_e@gmx.net>
Fri, 8 Dec 2017 14:18:18 +0000 (09:18 -0500)
committerPeter Eisentraut <peter_e@gmx.net>
Fri, 8 Dec 2017 14:39:55 +0000 (09:39 -0500)
commitee5b595493e1609903d55709853f5276ba85c81d
tree59dee38ffcb3eb0958cdbc66615653490e9f07df
parenta8ef4e81e6f2b7ab77aa57b986742feba57d9d86
Apply identity sequence values on COPY

A COPY into a table should apply identity sequence values just like it
does for ordinary defaults.  This was previously forgotten, leading to
null values being inserted, which in turn would fail because identity
columns have not-null constraints.

Author: Michael Paquier <michael.paquier@gmail.com>
Reported-by: Steven Winfield <steven.winfield@cantabcapital.com>
Bug: #14952
src/backend/commands/copy.c
src/test/regress/expected/identity.out
src/test/regress/sql/identity.sql