pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Apply identity sequence values on COPY
2+ messages / 1 participants
[nested] [flat]

* pgsql: Apply identity sequence values on COPY
@ 2017-12-08 14:43 Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2017-12-08 14:43 UTC (permalink / raw)
  To: pgsql-committers

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Apply identity sequence values on COPY
@ 2017-12-08 14:43 Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2017-12-08 14:43 UTC (permalink / raw)
  To: pgsql-committers

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2017-12-08 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-12-08 14:43 pgsql: Apply identity sequence values on COPY Peter Eisentraut <peter_e@gmx.net>
2017-12-08 14:43 pgsql: Apply identity sequence values on COPY Peter Eisentraut <peter_e@gmx.net>

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