On Tue, Dec 6, 2022 at 12:57 PM Tom Lane <
tgl@sss.pgh.pa.us> wrote:
> > Well, they've already escaped to tidbitmap.c as a copy. How do you feel
> > about going that route?
>
> Not terribly pleased with that either, I must admit.
Okay, I won't pursue that further.
> If we do put RIGHTMOST_ONE functionality into pg_bitutils.h,
> I'd envision it as pg_bitutils.h exporting both 32-bit and
> 64-bit versions of that, and then bitmapset.c choosing the
> appropriate one just like it chooses bmw_rightmost_one_pos.
Here's a quick go at that. I've not attempted to use it for what I need, but it looks like it fits the bill.
--
John Naylor
EDB:
http://www.enterprisedb.com