forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit05bef7b
committed
Check for pending trigger events on far end when dropping an FK constraint.
When dropping a foreign key constraint with ALTER TABLE DROP CONSTRAINT,we refuse the drop if there are any pending trigger events on the namedtable; this ensures that we won't remove the pg_trigger row that will beconsulted by those events. But we should make the same check for thereferenced relation, else we might remove a due-to-be-referenced pg_triggerrow for that relation too, resulting in "could not find trigger NNN" or"relation NNN has no triggers" errors at commit. Per bug #14431 fromBenjie Gillam. Back-patch to all supported branches.Report: <20161124114911.6530.31200@wrigleys.postgresql.org>1 parent8f67a6c commit05bef7b
File tree
3 files changed
+44
-0
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+44
-0
lines changedLines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7058 | 7058 |
| |
7059 | 7059 |
| |
7060 | 7060 |
| |
| 7061 | + | |
| 7062 | + | |
| 7063 | + | |
| 7064 | + | |
| 7065 | + | |
| 7066 | + | |
| 7067 | + | |
| 7068 | + | |
| 7069 | + | |
| 7070 | + | |
| 7071 | + | |
| 7072 | + | |
| 7073 | + | |
| 7074 | + | |
| 7075 | + | |
| 7076 | + | |
| 7077 | + | |
| 7078 | + | |
7061 | 7079 |
| |
7062 | 7080 |
| |
7063 | 7081 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1355 | 1355 |
| |
1356 | 1356 |
| |
1357 | 1357 |
| |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
1358 | 1371 |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1004 | 1004 |
| |
1005 | 1005 |
| |
1006 | 1006 |
| |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
1007 | 1020 |
|
0 commit comments
Comments
(0)