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-0005T6-6h@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
------
REL_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/ee5b595493e1609903d55709853f5276ba85c81d
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-0005T6-6h@gemulon.postgresql.org>
References: <E1eNJs8-0005T6-6h@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