- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit6f5c8a8
committed
Remove bogus restriction from BEFORE UPDATE triggers
In trying to protect the user from inconsistent behavior, commit487e986 "Enable BEFORE row-level triggers for partitioned tables"tried to prevent BEFORE UPDATE FOR EACH ROW triggers from moving the rowfrom one partition to another. However, it turns out that therestriction is wrong in two ways: first, it fails spuriously, preventingvalid situations from working, as in bug #16794; and second, they don'tprotect from any misbehavior, because tuple routing would cope anyway.Fix by removing that restriction.We keep the same restriction on BEFORE INSERT FOR EACH ROW triggers,though. It is valid and useful there. In the future we could remove itby having tuple reroute work for inserts as it does for updates.Backpatch to 13.Author: Álvaro Herrera <alvherre@alvh.no-ip.org>Reported-by: Phillip Menke <pg@pmenke.de>Discussion:https://postgr.es/m/16794-350a655580fbb9ae@postgresql.org1 parent1d9351a commit6f5c8a8
File tree
4 files changed
+77
-22
lines changed- doc/src/sgml
- src
- backend/commands
- test/regress
- expected
- sql
4 files changed
+77
-22
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4027 | 4027 |
| |
4028 | 4028 |
| |
4029 | 4029 |
| |
4030 |
| - | |
4031 |
| - | |
| 4030 | + | |
| 4031 | + | |
4032 | 4032 |
| |
4033 | 4033 |
| |
4034 | 4034 |
| |
|
Lines changed: 0 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2799 | 2799 |
| |
2800 | 2800 |
| |
2801 | 2801 |
| |
2802 |
| - | |
2803 |
| - | |
2804 |
| - | |
2805 |
| - | |
2806 |
| - | |
2807 |
| - | |
2808 |
| - | |
2809 |
| - | |
2810 |
| - | |
2811 |
| - | |
2812 | 2802 |
| |
2813 | 2803 |
| |
2814 | 2804 |
| |
|
Lines changed: 48 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2359 | 2359 |
| |
2360 | 2360 |
| |
2361 | 2361 |
| |
2362 |
| - | |
2363 |
| - | |
| 2362 | + | |
| 2363 | + | |
2364 | 2364 |
| |
2365 | 2365 |
| |
2366 | 2366 |
| |
| |||
2371 | 2371 |
| |
2372 | 2372 |
| |
2373 | 2373 |
| |
2374 |
| - | |
2375 |
| - | |
| 2374 | + | |
| 2375 | + | |
2376 | 2376 |
| |
2377 | 2377 |
| |
2378 |
| - | |
| 2378 | + | |
2379 | 2379 |
| |
2380 | 2380 |
| |
2381 | 2381 |
| |
2382 | 2382 |
| |
2383 | 2383 |
| |
2384 | 2384 |
| |
2385 |
| - | |
2386 |
| - | |
2387 |
| - | |
2388 |
| - | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
2389 | 2389 |
| |
2390 | 2390 |
| |
| 2391 | + | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
| 2396 | + | |
| 2397 | + | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
| 2402 | + | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
2391 | 2430 |
| |
2392 | 2431 |
| |
2393 | 2432 |
| |
|
Lines changed: 27 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1633 | 1633 |
| |
1634 | 1634 |
| |
1635 | 1635 |
| |
1636 |
| - | |
| 1636 | + | |
1637 | 1637 |
| |
1638 | 1638 |
| |
1639 | 1639 |
| |
1640 | 1640 |
| |
1641 | 1641 |
| |
1642 | 1642 |
| |
1643 | 1643 |
| |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
1644 | 1670 |
| |
1645 | 1671 |
| |
1646 | 1672 |
| |
|
0 commit comments
Comments
(0)