forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitedfca4b
committed
Subject: Bug in SQLForeignKeys()
Query used for checking foreign key triggersreturns too many results when there're more than one foreignkey in a table. It happens because only table's oid is used tolink between pg_trigger with INSERT check and pg_trigger withUPDATE/DELETE check.I think there should be enough to add following conditionsinto WHERE clause of that query: AND pt.tgconstrname = pg_trigger.tgconstrname AND pt.tgconstrname = pg_trigger_1.tgconstrname/Constantin1 parent3de8407 commitedfca4b
2 files changed
+6
-2
lines changedLines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2368 | 2368 |
| |
2369 | 2369 |
| |
2370 | 2370 |
| |
2371 |
| - | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
2372 | 2374 |
| |
2373 | 2375 |
| |
2374 | 2376 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
217 | 217 |
| |
218 | 218 |
| |
219 | 219 |
| |
220 |
| - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
221 | 223 |
| |
222 | 224 |
| |
223 | 225 |
| |
|
0 commit comments
Comments
(0)