Re: pgsql: Add assert checking to pg_leftmost_one_pos32() and friends - Mailing list pgsql-committers

From John Naylor
Subject Re: pgsql: Add assert checking to pg_leftmost_one_pos32() and friends
Date
Msg-id CAFBsxsHUkGVdntDyp87+3BAjYLjFC2VYpT3FoMZwH6RNKRi1PA@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Add assert checking to pg_leftmost_one_pos32() and friends  (John Naylor <john.naylor@enterprisedb.com>)
List pgsql-committers

On Tue, Feb 21, 2023 at 11:59 AM John Naylor <john.naylor@enterprisedb.com> wrote:
>
> On Mon, Feb 20, 2023 at 10:17 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >
> > John Naylor <john.naylor@postgresql.org> writes:
> > > Add assert checking to pg_leftmost_one_pos32() and friends
> >
> > I can see that this was worth writing for testing purposes, but
> > is it really worth carrying permanently?  Even in a debug build,
> > the ratio of cycles expended to chances of finding a problem seems
> > mighty poor, and you've done a lot of damage to the readability
> > of these functions too.
>
> That's a fair point, and it's doubtful we'll need to add another platform anytime soon. I'll work on removing the asserts.

The attached is closer to the previous coding and passes CI. I'll indent and push this tomorrow after giving it another look, unless there is further review.

--
John Naylor
EDB: http://www.enterprisedb.com
Attachment

pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Fix handling of escape sequences in postgres_fdw.application_nam
Next
From: Thomas Munro
Date:
Subject: pgsql: Remove obsolete coding for early macOS.