pgsql: Remove field UpdateContext->updated in nodeModifyTable.c

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема pgsql: Remove field UpdateContext->updated in nodeModifyTable.c
Дата
Msg-id E1rfexI-001Nzv-Mo@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/362de947cd7e8c826d9b3c5dc2590348263ed3c1

Modified Files
--------------
src/backend/executor/nodeModifyTable.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: pgsql: Fix integer underflow in shared memory debugging
Следующее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Add missing RangeTblEntry field to jumble