Re: [PATCH] Add tests for Bitmapset

From: Greg Burd <greg(at)burd(dot)me>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>, David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Add tests for Bitmapset
Date: 2025-10-03 12:13:44
Message-ID: 3E15C43D-8FDB-454F-A3E3-182210680C58@getmailspring.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Oct 3 2025, at 4:25 am, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:

>> On 3 Oct 2025, at 01:36, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
>>
>> On Fri, 3 Oct 2025 at 01:33, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>>> Another nitpick would be to remove the test for NULL in test_bms_make_singleton
>>> since that is a STRICT function, making the test for NULL
>>> superfluous code:
>>
>> I see test_random_operations() is also strict. Is it worth getting rid
>> of the SQL NULL checks on the inputs there too? Aka, the attached.
>
> Indeed, but reading the code I wonder if STRICT was a mistake and the intention
> was to allow NULL input?

Yes, it was an oversight after I re-worked the random function.

> That being said, the function is never called with
> NULL so that's mostly academic thinking. +1 for removing the NULL
> checks and simplifying the code.

I agree, and thank you both for the attention to detail and interest in
this test suite.

>
> --
> Daniel Gustafsson

best.

-greg

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2025-10-03 12:17:58 Re: Problem in 'ORDER BY' of a column using a created collation?
Previous Message Joe Conway 2025-10-03 12:11:10 Re: Support getrandom() for pg_strong_random() source