diff options
author | Dean Rasheed <dean.a.rasheed@gmail.com> | 2024-02-29 11:49:30 +0000 |
---|---|---|
committer | Dean Rasheed <dean.a.rasheed@gmail.com> | 2024-02-29 11:49:30 +0000 |
commit | 362de947cd7e8c826d9b3c5dc2590348263ed3c1 (patch) | |
tree | ceb73d27dc144c15d26cacae7600aa707125c471 /src/backend/executor/execMain.c | |
parent | 6fd144e3a9664ea545d10008c48dceb6c4e9d38a (diff) | |
download | postgresql-362de947cd7e8c826d9b3c5dc2590348263ed3c1.tar.gz postgresql-362de947cd7e8c826d9b3c5dc2590348263ed3c1.zip |
Remove field UpdateContext->updated in nodeModifyTable.c
This field has been redundant ever since it was added by commit
25e777cf8e, which split up ExecUpdate() and ExecDelete() into reusable
pieces. The only place that reads it is ExecMergeMatched(), if the
result from ExecUpdateAct() is TM_Ok. However, all paths through
ExecUpdateAct() that return TM_Ok also set this field to true, so the
return status by itself is sufficient to tell if the update happened.
Removing this field is a modest simplification, and it brings the
UPDATE path in ExecMergeMatched() more into line with ExecUpdate(),
ensuring that ExecUpdateEpilogue() is always called if ExecUpdateAct()
returns TM_Ok, reducing the chance of bugs.
Dean Rasheed, reviewed by Alvaro Herrera.
Discussion: https://postgr.es/m/CAEZATCWGGmigGBzLHkJm5Ccv2mMxXmwi3%2Buq0yhwDHm-tsvSLg%40mail.gmail.com
Diffstat (limited to 'src/backend/executor/execMain.c')
0 files changed, 0 insertions, 0 deletions