forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf61e601
committed
Avoid failure when altering state of partitioned foreign-key triggers.
Beginning in v15, if you apply ALTER TABLE ENABLE/DISABLE TRIGGER toa partitioned table, it also affects the partitions' cloned versionsof the affected trigger(s). The initial implementation of thislocated the clones by name, but that fails on foreign-key triggerswhich have names incorporating their own OIDs. We can fix that, andalso make the behavior more bulletproof in the face of user-initiatedtrigger renames, by identifying the cloned triggers by tgparentid.Following the lead of earlier commits in this area, I took care notto break ABI in the v15 branch, even though I rather doubt thereare any external callers of EnableDisableTrigger.While here, update the documentation, which was not touched whenthe semantics were changed.Per bug #17817 from Alan Hodgson. Back-patch to v15; older versionsdo not have this behavior.Discussion:https://postgr.es/m/17817-31dfb7c2100d9f3d@postgresql.org1 parent9d41ecf commitf61e601
File tree
6 files changed
+98
-20
lines changed- doc/src/sgml/ref
- src
- backend/commands
- include/commands
- test/regress
- expected
- sql
6 files changed
+98
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
572 | 572 | | |
573 | 573 | | |
574 | 574 | | |
575 | | - | |
| 575 | + | |
576 | 576 | | |
577 | | - | |
| 577 | + | |
578 | 578 | | |
579 | 579 | | |
580 | | - | |
| 580 | + | |
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
602 | | - | |
| 602 | + | |
603 | 603 | | |
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
610 | 616 | | |
611 | 617 | | |
612 | 618 | | |
| |||
1234 | 1240 | | |
1235 | 1241 | | |
1236 | 1242 | | |
1237 | | - | |
| 1243 | + | |
1238 | 1244 | | |
1239 | 1245 | | |
1240 | 1246 | | |
| |||
1246 | 1252 | | |
1247 | 1253 | | |
1248 | 1254 | | |
1249 | | - | |
| 1255 | + | |
1250 | 1256 | | |
1251 | 1257 | | |
1252 | 1258 | | |
| |||
1499 | 1505 | | |
1500 | 1506 | | |
1501 | 1507 | | |
1502 | | - | |
| 1508 | + | |
1503 | 1509 | | |
1504 | 1510 | | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
1505 | 1514 | | |
1506 | 1515 | | |
1507 | 1516 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14768 | 14768 | | |
14769 | 14769 | | |
14770 | 14770 | | |
14771 | | - | |
14772 | | - | |
| 14771 | + | |
| 14772 | + | |
| 14773 | + | |
14773 | 14774 | | |
14774 | 14775 | | |
14775 | 14776 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1754 | 1754 | | |
1755 | 1755 | | |
1756 | 1756 | | |
1757 | | - | |
| 1757 | + | |
| 1758 | + | |
1758 | 1759 | | |
1759 | 1760 | | |
1760 | 1761 | | |
| |||
1766 | 1767 | | |
1767 | 1768 | | |
1768 | 1769 | | |
1769 | | - | |
1770 | | - | |
1771 | | - | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
1772 | 1773 | | |
1773 | 1774 | | |
1774 | 1775 | | |
| |||
1805 | 1806 | | |
1806 | 1807 | | |
1807 | 1808 | | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
1808 | 1812 | | |
1809 | 1813 | | |
1810 | 1814 | | |
| |||
1855 | 1859 | | |
1856 | 1860 | | |
1857 | 1861 | | |
1858 | | - | |
1859 | | - | |
1860 | | - | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
1861 | 1866 | | |
1862 | 1867 | | |
1863 | 1868 | | |
| |||
1886 | 1891 | | |
1887 | 1892 | | |
1888 | 1893 | | |
1889 | | - | |
1890 | | - | |
| 1894 | + | |
| 1895 | + | |
1891 | 1896 | | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
1892 | 1907 | | |
1893 | 1908 | | |
1894 | 1909 | | |
1895 | 1910 | | |
1896 | 1911 | | |
1897 | | - | |
1898 | | - | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
1899 | 1915 | | |
1900 | 1916 | | |
1901 | 1917 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
173 | 176 | | |
174 | 177 | | |
175 | 178 | | |
| |||
| 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
Comments
(0)