Commit cfbecf8
committed
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.jp1 parent 870d896 commit cfbecf8
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2709 | 2709 | | |
2710 | 2710 | | |
2711 | 2711 | | |
2712 | | - | |
| 2712 | + | |
| 2713 | + | |
2713 | 2714 | | |
2714 | 2715 | | |
2715 | 2716 | | |
| |||
0 commit comments