forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc0bfdaf
committed
Fix AFTER ROW trigger execution in MERGE cross-partition update.
When executing a MERGE UPDATE action, if the UPDATE is turned into across-partition DELETE then INSERT, do not attempt to invoke AFTERUPDATE ROW triggers, or any of the other post-update actions inExecUpdateEpilogue().For consistency with a plain UPDATE command, such triggers should notbe fired (and typically fail anyway), and similarly, other post-updateactions, such as WCO/RLS checks should not be executed, and might alsolead to unexpected failures.Therefore, as with ExecUpdate(), make ExecMergeMatched() returnimmediately if ExecUpdateAct() reports that a cross-partition updatewas done, to be sure that no further processing is done for thattuple.Back-patch to v15, where MERGE was introduced.Discussion:https://postgr.es/m/CAEZATCWjBgagyNZs02vgDF0DvASYj-iHTFtXG2-nP3orZhmtcw%40mail.gmail.com1 parent456d697 commitc0bfdaf
File tree
3 files changed
+97
-0
lines changed- src
- backend/executor
- test/regress
- expected
- sql
3 files changed
+97
-0
lines changedLines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2880 | 2880 |
| |
2881 | 2881 |
| |
2882 | 2882 |
| |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
| 2889 | + | |
| 2890 | + | |
| 2891 | + | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
| 2897 | + | |
| 2898 | + | |
2883 | 2899 |
| |
2884 | 2900 |
| |
2885 | 2901 |
| |
|
Lines changed: 45 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2309 | 2309 |
| |
2310 | 2310 |
| |
2311 | 2311 |
| |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
| 2320 | + | |
| 2321 | + | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
| 2325 | + | |
| 2326 | + | |
| 2327 | + | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
| 2331 | + | |
| 2332 | + | |
| 2333 | + | |
| 2334 | + | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
| 2340 | + | |
| 2341 | + | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
| 2349 | + | |
| 2350 | + | |
| 2351 | + | |
| 2352 | + | |
| 2353 | + | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
2312 | 2357 |
| |
2313 | 2358 |
| |
2314 | 2359 |
| |
|
Lines changed: 36 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1583 | 1583 |
| |
1584 | 1584 |
| |
1585 | 1585 |
| |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
1586 | 1622 |
| |
1587 | 1623 |
| |
1588 | 1624 |
| |
|
0 commit comments
Comments
(0)