pgsql: Use bitwise rotate functions in more places

From: John Naylor <john(dot)naylor(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use bitwise rotate functions in more places
Date: 2022-02-20 06:25:32
Message-ID: E1nLff2-00037F-De@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.gmail.com

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2022-02-20 14:45:05 Re: pgsql: Add support for building with ZSTD.
Previous Message Michael Paquier 2022-02-19 06:18:57 Re: pgsql: Add support for building with ZSTD.