diff options
author | Dean Rasheed <dean.a.rasheed@gmail.com> | 2023-11-09 11:28:25 +0000 |
---|---|---|
committer | Dean Rasheed <dean.a.rasheed@gmail.com> | 2023-11-09 11:28:25 +0000 |
commit | c0bfdaf2b773d9e0de343c768dfbb89c250ae439 (patch) | |
tree | a8cf2f7ef92626cf3bf28120c35e6cc8a122fb62 /src/backend/jit/llvm/llvmjit_expr.c | |
parent | 456d697bae081ae77ff222375cf0704316041f88 (diff) | |
download | postgresql-c0bfdaf2b773d9e0de343c768dfbb89c250ae439.tar.gz postgresql-c0bfdaf2b773d9e0de343c768dfbb89c250ae439.zip |
Fix AFTER ROW trigger execution in MERGE cross-partition update.
When executing a MERGE UPDATE action, if the UPDATE is turned into a
cross-partition DELETE then INSERT, do not attempt to invoke AFTER
UPDATE ROW triggers, or any of the other post-update actions in
ExecUpdateEpilogue().
For consistency with a plain UPDATE command, such triggers should not
be fired (and typically fail anyway), and similarly, other post-update
actions, such as WCO/RLS checks should not be executed, and might also
lead to unexpected failures.
Therefore, as with ExecUpdate(), make ExecMergeMatched() return
immediately if ExecUpdateAct() reports that a cross-partition update
was done, to be sure that no further processing is done for that
tuple.
Back-patch to v15, where MERGE was introduced.
Discussion: https://postgr.es/m/CAEZATCWjBgagyNZs02vgDF0DvASYj-iHTFtXG2-nP3orZhmtcw%40mail.gmail.com
Diffstat (limited to 'src/backend/jit/llvm/llvmjit_expr.c')
0 files changed, 0 insertions, 0 deletions