agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix 64-bit shifting in dynahash.c
Date: Sun, 19 Apr 2026 11:33:14 +0000
Message-ID: <E1wEQOn-001hEh-2d@gemulon.postgresql.org> (raw)
Fix 64-bit shifting in dynahash.c
The switch from long to int64 in commit 13b935cd521 was incomplete.
It was shifting the constant 1L, which is not always 64 bit. Fix by
using an explicit int64 constant.
MSVC warning:
../src/backend/utils/hash/dynahash.c(1767): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
Also add the corresponding warning to the standard warning set on
MSVC, to help catch similar issues in the future.
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/1142ad86-e475-41b3-aeee-c6ad913064fa%40eisentraut.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9018c7d37bb464cd53567c0b553a6f49b50bec78
Modified Files
--------------
meson.build | 4 ++++
src/backend/utils/hash/dynahash.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
Message-ID: <E1wEQOn-001hEh-2d@gemulon.postgresql.org>
Permalink: ../E1wEQOn-001hEh-2d@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wEQOn-001hEh-2d@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix 64-bit shifting in dynahash.c
In-Reply-To: <E1wEQOn-001hEh-2d@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox