pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Enforce child constraints during COPY TO a partitioned table.
Date: Fri, 06 Apr 2018 15:55:56 +0000
Message-ID: <E1f4TiW-0004Hy-NY@gemulon.postgresql.org> (raw)

Enforce child constraints during COPY TO a partitioned table.

The previous coding inadvertently checked the constraints for the
partitioned table rather than the target partition, which could
lead to data in a partition that fails to satisfy some constraint
on that partition.  This problem seems to date back to when
table partitioning was introduced; prior to that, there was only
one target table for a COPY, so the problem didn't occur, and the
code just didn't get updated.

Etsuro Fujita, reviewed by Amit Langote and Ashutosh Bapat

Discussion: https://postgr.es/message-id/5ABA4074.1090500%40lab.ntt.co.jp

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cfbecf8100ecb83c07c2017f843b0642580416bf

Modified Files
--------------
src/backend/commands/copy.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



view thread (2+ messages)

Message-ID: <E1f4TiW-0004Hy-NY@gemulon.postgresql.org>
Permalink:  ../E1f4TiW-0004Hy-NY@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1f4TiW-0004Hy-NY@gemulon.postgresql.org

 · 

reply

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: rhaas@postgresql.org
  Subject: Re: pgsql: Enforce child constraints during COPY TO a partitioned table.
  In-Reply-To: <E1f4TiW-0004Hy-NY@gemulon.postgresql.org>
  References: <E1f4TiW-0004Hy-NY@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