forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commiteafde14
Fix GetForeignKey*Triggers for self-referential FKs
Because of inadequate filtering, the check triggers were confusing thesearch for action triggers in GetForeignKeyActionTriggers and vice-versain GetForeignKeyCheckTriggers; this confusion results in seeminglyrandom assertion failures, and can have real impact in non-assertingbuilds depending on catalog order. Change these functions so that theycorrectly ignore triggers that are not relevant to each side.To reduce the odds of further problems, do not break out of thesearching loop in assertion builds. This break is likely to hide bugs;without it, we would have detected this bug immediately.This problem was introduced byf456634, so backpatch to 15 wherethat commit first appeared.Author: Amit Langote <amitlangote09@gmail.com>Discussion:https://postgr.es/m/20220908172029.sejft2ppckbo6oh5@awork3.anarazel.deDiscussion:https://postgr.es/m/4104619.1662663056@sss.pgh.pa.us1 parent385bf14 commiteafde14
1 file changed
+12
-0
lines changedLines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10581 | 10581 |
| |
10582 | 10582 |
| |
10583 | 10583 |
| |
| 10584 | + | |
| 10585 | + | |
| 10586 | + | |
10584 | 10587 |
| |
10585 | 10588 |
| |
10586 | 10589 |
| |
| |||
10591 | 10594 |
| |
10592 | 10595 |
| |
10593 | 10596 |
| |
| 10597 | + | |
| 10598 | + | |
10594 | 10599 |
| |
10595 | 10600 |
| |
| 10601 | + | |
10596 | 10602 |
| |
10597 | 10603 |
| |
10598 | 10604 |
| |
| |||
10636 | 10642 |
| |
10637 | 10643 |
| |
10638 | 10644 |
| |
| 10645 | + | |
| 10646 | + | |
| 10647 | + | |
10639 | 10648 |
| |
10640 | 10649 |
| |
10641 | 10650 |
| |
| |||
10646 | 10655 |
| |
10647 | 10656 |
| |
10648 | 10657 |
| |
| 10658 | + | |
| 10659 | + | |
10649 | 10660 |
| |
10650 | 10661 |
| |
| 10662 | + | |
10651 | 10663 |
| |
10652 | 10664 |
| |
10653 | 10665 |
| |
|
0 commit comments
Comments
(0)