Re: Fixing a few minor misusages of bms_union() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fixing a few minor misusages of bms_union()
Date
Msg-id 1321393.1759505436@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fixing a few minor misusages of bms_union()  (Greg Burd <greg@burd.me>)
List pgsql-hackers
Greg Burd <greg@burd.me> writes:
> On Oct 3 2025, at 10:04 am, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> This change in substitute_phv_relids_walker is *not* safe according
>> to the routine's head comment:

> I'll have to remember to scroll up a bit more when reviewing and always
> read the header comments.  I missed that one entirely, apologies. When I
> read the bitmapset_del() below the bitmapset_union() I incorrectly
> assumed that it was okay to modify it in-place.  Maybe a short comment
> above that line would be useful?

After we've done the union(), we know we have a singly-referenced
bitmapset, so it's safe for the second change to be in-place.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: anonymous unions (C11)
Next
From: Andrew Dunstan
Date:
Subject: Re: split func.sgml to separated individual sgml files