From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix bitshiftright()'s zero-padding some more.
Date: Fri, 04 Oct 2019 14:34:55 +0000
Message-ID: <E1iGOfX-0006hS-DL@gemulon.postgresql.org> (raw)
Fix bitshiftright()'s zero-padding some more.
Commit 5ac0d9360 failed to entirely fix bitshiftright's habit of
leaving one-bits in the pad space that should be all zeroes,
because in a moment of sheer brain fade I'd concluded that only
the code path used for not-a-multiple-of-8 shift distances needed
to be fixed. Of course, a multiple-of-8 shift distance can also
cause the problem, so we need to forcibly zero the extra bits
in both cases.
Per bug #16037 from Alexander Lakhin. As before, back-patch to all
supported branches.
Discussion: https://postgr.es/m/16037-1d1ebca564db54f4@postgresql.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/61aa9f544a91f2908e4c7cd549907cdc5b6f1c82
Modified Files
--------------
src/backend/utils/adt/varbit.c | 6 ++--
src/test/regress/expected/bit.out | 66 +++++++++++++++++++++++++++++++++++++++
src/test/regress/sql/bit.sql | 6 ++++
3 files changed, 76 insertions(+), 2 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: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Fix bitshiftright()'s zero-padding some more.
In-Reply-To: <E1iGOfX-0006hS-DL@gemulon.postgresql.org>
References: <E1iGOfX-0006hS-DL@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