public inbox for [email protected]  
help / color / mirror / Atom feed
From: Greg Burd <[email protected]>
To: David Rowley <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Chao Li <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Add bms_offset_members() function for bitshifting Bitmapsets
Date: Mon, 20 Apr 2026 10:55:09 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAApHDvqOgtX2MqaPmPmPET7=ySszzuoP3MLSUbWZit_V30VBLg@mail.gmail.com>
References: <CAApHDvq=eEdw2Qp+aSzSOtTSe+h0fnVQ55CcTNqBkLDYiRZmxw@mail.gmail.com>
	<[email protected]>
	<CAApHDvoALVPgVSCuGdAfNUbxx_NacnAd0nuj8Hi=_-61AEqzaQ@mail.gmail.com>
	<[email protected]>
	<CAApHDvq4_WDfTaWX6nHU8TV+no+aD1zjLphza685Ek7=xgGzew@mail.gmail.com>
	<[email protected]>
	<CAApHDvp=fhr8ksuGyXkwYPXQpYvJ38YMhHvx6JmdD39cAvNRhw@mail.gmail.com>
	<CAApHDvrp6JwOVH3VwMB=YL3p97F5_0hKJc7J8zHRKuyhKru1dA@mail.gmail.com>
	<[email protected]>
	<CAApHDvqOgtX2MqaPmPmPET7=ySszzuoP3MLSUbWZit_V30VBLg@mail.gmail.com>


On Sun, Apr 19, 2026, at 7:52 PM, David Rowley wrote:
> On Mon, 20 Apr 2026 at 07:22, Greg Burd <[email protected]> wrote:
>> I applied, tested, and reviewed these changes.  Thanks for doing this, only a few small things jumped out.
>
> Many thanks. I took all of those suggestions.

Happy to help.

>> SELECT test_bms_offset_members('(b 1)', -2147483648);
>
> I made that one use member 0 instead of 1.  That'll mean "new_highest"
> goes to INT_MIN rather than INT_MIN + 1.

Perfect, that covers the gap nicely.

Were you planning on writing the optimized non-copy version as well?  I don't think it is strictly necessary, more a curiosity.

bms_offset_members() -> new bms, might repalloc() replaces existing loops you've found
bms_shift_members() -> bms is modified in place and fits your new use case a bit better

best.

-greg


> David
>
> Attachments:
> * v3-0001-Introduce-bms_offset_members-function.patch





view thread (15+ messages)  latest in thread

reply

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Add bms_offset_members() function for bitshifting Bitmapsets
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox