From: | John Naylor <john(dot)naylor(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Remove redundant setting of hashkey after insertion |
Date: | 2023-11-30 08:29:18 |
Message-ID: | E1r8cQ9-007vzN-LU@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2023-11-30 09:36:25 | pgsql: Fix warning due non-standard inline declaration in 4ed8f0913bfdb |
Previous Message | Peter Eisentraut | 2023-11-30 06:29:16 | pgsql: meson: Improve/fix Python version selection |