forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0a6aaf0
committed
Fix another issue with ENABLE/DISABLE TRIGGER on partitioned tables.
In v13 and v14, the ENABLE/DISABLE TRIGGER USER variant malfunctionedon cloned triggers, failing to find the clones because it thought theywere system triggers. Other variants of ENABLE/DISABLE TRIGGER wouldimproperly apply a superuserness check. Fix by adjusting the is-it-a-system-trigger check to match reality in those branches. (As faras I can find, this is the only place that got it wrong.)There's no such bug in v15/HEAD, because we revised the catalogrepresentation of system triggers to be what this code was expecting.However, add the test case to these branches anyway, because this areais visibly pretty fragile. Also remove an obsoleted comment.The recent v15/HEAD commit6949b92 fixed a nearby bug. I now seethat my commit message for that was inaccurate: the behavior ofrecursing to clone triggers is older than v15, but it didn't applyto the case in v13/v14 because in those branches parent partitionedtables have no pg_trigger entries for foreign-key triggers. But addthe test case from that commit to v13/v14, just to show what ishappening there.Per bug #17886 from DzmitryH.Discussion:https://postgr.es/m/17886-5406d5d828aa4aa3@postgresql.org1 parent72e7872 commit0a6aaf0
File tree
3 files changed
+61
-1
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+61
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1589 | 1589 |
| |
1590 | 1590 |
| |
1591 | 1591 |
| |
1592 |
| - | |
| 1592 | + | |
1593 | 1593 |
| |
1594 | 1594 |
| |
1595 | 1595 |
| |
|
Lines changed: 39 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2692 | 2692 |
| |
2693 | 2693 |
| |
2694 | 2694 |
| |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
2695 | 2734 |
| |
2696 | 2735 |
| |
2697 | 2736 |
| |
|
Lines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1848 | 1848 |
| |
1849 | 1849 |
| |
1850 | 1850 |
| |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
1851 | 1872 |
| |
1852 | 1873 |
| |
1853 | 1874 |
| |
|
0 commit comments
Comments
(0)