]> 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:18:18 +0000 (09:18 -0500)
commit2d2d06b7e27e3177d5bef0061801c75946871db3
treead8f6397d6cb757ddac83cddae54faadc85377f6
parent0a3edbb3302173f8ac465570b6273392aa6e20b1
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