Add missing CommandCounterIncrement
Álvaro Herrera <alvherre@alvh.no-ip.org>
Add missing CommandCounterIncrement For commit b663b9436e75 I thought this was useless, but turns out not to be for the case where a partitioned table has two identical foreign key constraints which can both be matched by the same constraint in a partition during attach. This CCI makes the match search for the second constraint in the parent ignore the constraint in the child that has already been matched by the first constraint in the parent. Reported-by: Alexander Lakhin <exclusion@gmail.com> Discussion: https://postgr.es/m/c599253c-1ccd-4161-80fc-c9065e037a09@gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/tablecmds.c | modified | +10 −10 |
| src/test/regress/expected/foreign_key.out | modified | +10 −0 |
| src/test/regress/sql/foreign_key.sql | modified | +11 −0 |
Discussion
- Allow NOT VALID foreign key constraints on partitioned tables. 14 messages · 2025-01-02 → 2025-01-28