From: John Naylor <john.naylor@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use bitwise rotate functions in more places
Date: Sun, 20 Feb 2022 06:25:32 +0000
Message-ID: <E1nLff2-00037F-De@gemulon.postgresql.org> (raw)
Use bitwise rotate functions in more places
There were a number of places in the code that used bespoke bit-twiddling
expressions to do bitwise rotation. While we've had pg_rotate_right32()
for a while now, we hadn't gotten around to standardizing on that. Do so
now. Since many potential call sites look more natural with the "left"
equivalent, add that function too.
Reviewed by Tom Lane and Yugo Nagata
Discussion:
https://www.postgresql.org/message-id/CAFBsxsH7c1LC0CGZ0ADCBXLHU5-%3DKNXx-r7tHYPAW51b2HK4Qw%40mail.g...
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4b35408f1ed59dd590f683ae0f015bbaf3b84d3d
Modified Files
--------------
src/backend/executor/execGrouping.c | 4 ++--
src/backend/executor/nodeHash.c | 4 ++--
src/backend/executor/nodeMemoize.c | 8 ++++----
src/backend/utils/adt/jsonb_util.c | 3 ++-
src/backend/utils/adt/multirangetypes.c | 3 ++-
src/backend/utils/adt/rangetypes.c | 3 ++-
src/backend/utils/cache/catcache.c | 14 ++++----------
src/common/hashfn.c | 4 ++--
src/include/port/pg_bitutils.h | 10 ++++++++--
9 files changed, 28 insertions(+), 25 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: john.naylor@postgresql.org
Subject: Re: pgsql: Use bitwise rotate functions in more places
In-Reply-To: <E1nLff2-00037F-De@gemulon.postgresql.org>
References: <E1nLff2-00037F-De@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox