pgsql: Remove redundant setting of hashkey after insertion

Поиск
Список
Период
Сортировка
От John Naylor
Тема pgsql: Remove redundant setting of hashkey after insertion
Дата
Msg-id E1r8cQ9-007vzN-LU@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Remove redundant setting of hashkey after insertion

It's not necessary to fill the key field in most cases, since
hash_search has already done that. Some existing call sites have an
assert or comment that this contract has been fulfilled, but those
are quite old and that practice seems unnecessary here.

While at it, remove a nearby redundant assignment that a smart compiler
will elide anyway.

Zhao Junwang, with some adjustments by me

Reviewed by Nathan Bossart, with additional feedback from Tom Lane

Discussion: http://postgr.es/m/CAEG8a3%2BUPF%3DR2QGPgJMF2mKh8xPd1H2TmfH77zPuVUFdBpiGUA%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/095d109ccd76ca4c46c4ea2be30d63d70361c5f9

Modified Files
--------------
contrib/dblink/dblink.c                              |  1 -
src/backend/commands/async.c                         | 20 ++++++++------------
src/backend/commands/tablecmds.c                     |  3 ---
.../replication/logical/applyparallelworker.c        |  1 -
src/backend/replication/logical/relation.c           |  1 -
5 files changed, 8 insertions(+), 18 deletions(-)


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: meson: Improve/fix Python version selection
Следующее
От: Alexander Korotkov
Дата:
Сообщение: pgsql: Fix warning due non-standard inline declaration in 4ed8f0913bfdb