From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Apply identity sequence values on COPY
Date: Fri, 08 Dec 2017 14:43:28 +0000
Message-ID: <E1eNJs8-0005T5-6d@gemulon.postgresql.org> (raw)
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/2d2d06b7e27e3177d5bef0061801c75946871db3
Modified Files
--------------
src/backend/commands/copy.c | 16 ++++++++++++++--
src/test/regress/expected/identity.out | 13 +++++++++++++
src/test/regress/sql/identity.sql | 17 +++++++++++++++++
3 files changed, 44 insertions(+), 2 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: peter_e@gmx.net
Subject: Re: pgsql: Apply identity sequence values on COPY
In-Reply-To: <E1eNJs8-0005T5-6d@gemulon.postgresql.org>
References: <E1eNJs8-0005T5-6d@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox