pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Enforce child constraints during COPY TO a partitioned table. 2+ messages / 1 participants [nested] [flat]
* pgsql: Enforce child constraints during COPY TO a partitioned table. @ 2018-04-06 15:55 Robert Haas <rhaas@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Robert Haas @ 2018-04-06 15:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/29ab1e24a6a77bf112eba97b2873dab5a19c6cf1 Modified Files -------------- src/backend/commands/copy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Enforce child constraints during COPY TO a partitioned table. @ 2018-04-06 15:55 Robert Haas <rhaas@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Robert Haas @ 2018-04-06 15:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2018-04-06 15:55 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2018-04-06 15:55 pgsql: Enforce child constraints during COPY TO a partitioned table. Robert Haas <rhaas@postgresql.org> 2018-04-06 15:55 pgsql: Enforce child constraints during COPY TO a partitioned table. Robert Haas <rhaas@postgresql.org>
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