pgsql: Remove redundant setting of hashkey after insertion - Mailing list pgsql-committers

From John Naylor
Subject pgsql: Remove redundant setting of hashkey after insertion
Date
Msg-id E1r8cQ9-007vzN-LU@gemulon.postgresql.org
Whole thread Raw
List 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 by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: meson: Improve/fix Python version selection
Next
From: Alexander Korotkov
Date:
Subject: pgsql: Fix warning due non-standard inline declaration in 4ed8f0913bfdb