diff options
| author | Alvaro Herrera | 2019-01-18 17:49:40 +0000 |
|---|---|---|
| committer | Alvaro Herrera | 2019-01-18 17:57:49 +0000 |
| commit | 4dff8935fbab64aef38470424cc57dbda9efa1cf (patch) | |
| tree | 30945215314c799aff9a25573a3fda6a6e4c906d /configure.in | |
| parent | fca6cabed17c4960224408d44e3d384b560b78f5 (diff) | |
Fix creation of duplicate foreign keys on partitions
When creating a foreign key in a partitioned table, if some partitions
already have equivalent constraints, we wastefully create duplicates of
the constraints instead of attaching to the existing ones. That's
inconsistent with the de-duplication that is applied when a table is
attached as a partition. To fix, reuse the FK-cloning code instead of
having a separate code path.
Backpatch to Postgres 11. This is a subtle behavior change, but surely
a welcome one since there's no use in having duplicate foreign keys.
Discovered by Álvaro Herrera while thinking about a different problem
reported by Jesper Pedersen (bug #15587).
Author: Álvaro Herrera
Discussion: https://postgr.es/m/201901151935.zfadrzvyof4k@alvherre.pgsql
Diffstat (limited to 'configure.in')
0 files changed, 0 insertions, 0 deletions
