Commit 6949b92
committed
Avoid failure when altering state of partitioned foreign-key triggers.
Beginning in v15, if you apply ALTER TABLE ENABLE/DISABLE TRIGGER to
a partitioned table, it also affects the partitions' cloned versions
of the affected trigger(s). The initial implementation of this
located the clones by name, but that fails on foreign-key triggers
which have names incorporating their own OIDs. We can fix that, and
also make the behavior more bulletproof in the face of user-initiated
trigger renames, by identifying the cloned triggers by tgparentid.
Following the lead of earlier commits in this area, I took care not
to break ABI in the v15 branch, even though I rather doubt there
are any external callers of EnableDisableTrigger.
While here, update the documentation, which was not touched when
the semantics were changed.
Per bug #17817 from Alan Hodgson. Back-patch to v15; older versions
do not have this behavior.
Discussion: https://postgr.es/m/17817-31dfb7c2100d9f3d@postgresql.org1 parent f62975b commit 6949b92
File tree
6 files changed
+76
-12
lines changed- doc/src/sgml/ref
- src
- backend/commands
- include/commands
- test/regress
- expected
- sql
6 files changed
+76
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
579 | | - | |
| 579 | + | |
580 | 580 | | |
581 | | - | |
| 581 | + | |
582 | 582 | | |
583 | 583 | | |
584 | | - | |
| 584 | + | |
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
| |||
603 | 603 | | |
604 | 604 | | |
605 | 605 | | |
606 | | - | |
| 606 | + | |
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
614 | 620 | | |
615 | 621 | | |
616 | 622 | | |
| |||
1239 | 1245 | | |
1240 | 1246 | | |
1241 | 1247 | | |
1242 | | - | |
| 1248 | + | |
1243 | 1249 | | |
1244 | 1250 | | |
1245 | 1251 | | |
| |||
1251 | 1257 | | |
1252 | 1258 | | |
1253 | 1259 | | |
1254 | | - | |
| 1260 | + | |
1255 | 1261 | | |
1256 | 1262 | | |
1257 | 1263 | | |
| |||
1504 | 1510 | | |
1505 | 1511 | | |
1506 | 1512 | | |
1507 | | - | |
| 1513 | + | |
1508 | 1514 | | |
1509 | 1515 | | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
1510 | 1519 | | |
1511 | 1520 | | |
1512 | 1521 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14726 | 14726 | | |
14727 | 14727 | | |
14728 | 14728 | | |
14729 | | - | |
| 14729 | + | |
| 14730 | + | |
14730 | 14731 | | |
14731 | 14732 | | |
14732 | 14733 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1715 | 1715 | | |
1716 | 1716 | | |
1717 | 1717 | | |
1718 | | - | |
| 1718 | + | |
| 1719 | + | |
1719 | 1720 | | |
1720 | 1721 | | |
1721 | 1722 | | |
| |||
1727 | 1728 | | |
1728 | 1729 | | |
1729 | 1730 | | |
1730 | | - | |
| 1731 | + | |
1731 | 1732 | | |
1732 | 1733 | | |
1733 | 1734 | | |
| |||
1766 | 1767 | | |
1767 | 1768 | | |
1768 | 1769 | | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
1769 | 1773 | | |
1770 | 1774 | | |
1771 | 1775 | | |
| |||
1816 | 1820 | | |
1817 | 1821 | | |
1818 | 1822 | | |
1819 | | - | |
| 1823 | + | |
| 1824 | + | |
1820 | 1825 | | |
1821 | 1826 | | |
1822 | 1827 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2718 | 2718 | | |
2719 | 2719 | | |
2720 | 2720 | | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
2721 | 2755 | | |
2722 | 2756 | | |
2723 | 2757 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1883 | 1883 | | |
1884 | 1884 | | |
1885 | 1885 | | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
1886 | 1901 | | |
1887 | 1902 | | |
1888 | 1903 | | |
| |||
0 commit comments