forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit80ef25b
committed
Choose FK name correctly during partition attachment
During ALTER TABLE ATTACH PARTITION, if the name of a parent's foreignkey constraint is already used on the partition, the code tries tochoose another one before the FK attributes list has been populated,so the resulting constraint name was "<relname>__fkey" instead of"<relname>_<attrs>_fkey". Repair, and add a test case.Backpatch to 12. In 11, the code to attach a partition was not smartenough to cope with conflicting constraint names, so the problem doesn'texist there.Author: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>Discussion:https://postgr.es/m/20220901184156.738ebee5@karst1 parentccbb54c commit80ef25b
File tree
3 files changed
+52
-10
lines changed- src
- backend/commands
- test/regress
- input
- output
3 files changed
+52
-10
lines changedLines changed: 10 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9631 | 9631 |
| |
9632 | 9632 |
| |
9633 | 9633 |
| |
9634 |
| - | |
9635 |
| - | |
9636 |
| - | |
9637 |
| - | |
9638 |
| - | |
9639 |
| - | |
9640 |
| - | |
9641 |
| - | |
9642 |
| - | |
9643 |
| - | |
9644 | 9634 |
| |
9645 | 9635 |
| |
9646 | 9636 |
| |
| |||
9655 | 9645 |
| |
9656 | 9646 |
| |
9657 | 9647 |
| |
| 9648 | + | |
| 9649 | + | |
| 9650 | + | |
| 9651 | + | |
| 9652 | + | |
| 9653 | + | |
| 9654 | + | |
| 9655 | + | |
| 9656 | + | |
| 9657 | + | |
9658 | 9658 |
| |
9659 | 9659 |
| |
9660 | 9660 |
| |
|
Lines changed: 19 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
410 | 410 |
| |
411 | 411 |
| |
412 | 412 |
| |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
413 | 432 |
| |
414 | 433 |
| |
415 | 434 |
| |
|
Lines changed: 23 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
575 | 575 |
| |
576 | 576 |
| |
577 | 577 |
| |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
578 | 601 |
| |
579 | 602 |
| |
580 | 603 |
| |
|
0 commit comments
Comments
(0)