Commit 7b14e20
committed
Fix MERGE command tag for actions blocked by BEFORE ROW triggers.
This ensures that the row count in the command tag for a MERGE is
correctly computed in the case where UPDATEs or DELETEs are skipped
due to a BEFORE ROW trigger returning NULL (the INSERT case was
already handled correctly by ExecMergeNotMatched() calling
ExecInsert()).
Back-patch to v15, where MERGE was introduced.
Discussion: https://postgr.es/m/CAEZATCU8XEmR0JWKDtyb7iZ%3DqCffxS9uyJt0iOZ4TV4RT%2Bow1w%40mail.gmail.com1 parent 9321c79 commit 7b14e20
File tree
3 files changed
+34
-4
lines changed- src
- backend/executor
- test/regress
- expected
- sql
3 files changed
+34
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2883 | 2883 | | |
2884 | 2884 | | |
2885 | 2885 | | |
2886 | | - | |
2887 | | - | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
2888 | 2889 | | |
2889 | 2890 | | |
2890 | 2891 | | |
| |||
2901 | 2902 | | |
2902 | 2903 | | |
2903 | 2904 | | |
2904 | | - | |
2905 | | - | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
2906 | 2908 | | |
2907 | 2909 | | |
2908 | 2910 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
942 | 942 | | |
943 | 943 | | |
944 | 944 | | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
945 | 949 | | |
946 | 950 | | |
947 | 951 | | |
948 | 952 | | |
949 | 953 | | |
950 | 954 | | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
951 | 964 | | |
952 | 965 | | |
953 | 966 | | |
| |||
957 | 970 | | |
958 | 971 | | |
959 | 972 | | |
| 973 | + | |
| 974 | + | |
960 | 975 | | |
961 | 976 | | |
962 | 977 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
636 | 636 | | |
637 | 637 | | |
638 | 638 | | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
639 | 643 | | |
640 | 644 | | |
641 | 645 | | |
642 | 646 | | |
643 | 647 | | |
644 | 648 | | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
645 | 658 | | |
646 | 659 | | |
647 | 660 | | |
| |||
0 commit comments