Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v4IUy-00CTsd-Lf for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Oct 2025 12:33:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1v4IUw-007h6d-DA for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Oct 2025 12:33:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v4IUv-007h6V-U3 for pgsql-hackers@lists.postgresql.org; Thu, 02 Oct 2025 12:33:26 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1v4IUu-0001L6-1c for pgsql-hackers@lists.postgresql.org; Thu, 02 Oct 2025 12:33:26 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id EB1354237AF for ; Thu, 02 Oct 2025 14:33:22 +0200 (CEST) Received: from s980.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id D204F4241AF; Thu, 02 Oct 2025 14:33:22 +0200 (CEST) Received: from s473.loopia.se (unknown [172.22.191.6]) by s980.loopia.se (Postfix) with ESMTP id CBFA72201635; Thu, 02 Oct 2025 14:33:22 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.2 X-Spam-Level: X-Spam-Status: No, score=-1.2 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Authentication-Results: s473.loopia.se (amavisd-new); dkim=pass (2048-bit key) header.d=yesql.se Received: from s981.loopia.se ([172.22.191.5]) by s473.loopia.se (s473.loopia.se [172.22.190.13]) (amavisd-new, port 10024) with UTF8LMTP id gdVz1doYajLK; Thu, 2 Oct 2025 14:33:22 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.236 Received: from smtpclient.apple (customer-89-255-232-236.stosn.net [89.255.232.236]) (Authenticated sender: daniel@yesql.se) by s981.loopia.se (Postfix) with ESMTPSA id 2AB1222B1792; Thu, 02 Oct 2025 14:33:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yesql.se; s=loopiadkim1707475645; t=1759408402; bh=8Xe6ixij8DPxBVLA2DqzLyTjgc6VRDS0vpiGCEN9C20=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=SH0KHQrJ/fJXK7K208z96eEQ5mODpOoQw1nJHIx1BXvsXeIDtzKO/S12Go2y1ExHh zpGOFJMu0UCBI76LBKS1ql3lkVzqPaEhkr+/v45MkFfgqnF75BEyuLxwjFKGc5gKEC 3xHeqaERORG+nTM6ifzvMdzJDiIo/umqygLy+9qe1TqEcoaU+z0VaLzrxTkVfu1wk0 cwRjUvQBSTvE/GSLJxlF7Fzg2KISD4/K8nhaa20EekNaQIqz+ZhVY/LELoR5TrifQT fIJthyW/IPV/CxjzUR644b7JaJX3VQqoc8BgrHzBdTu38A1L+UCJO4Xrfh2bNssUxs 5iPiBiIBdrDTQ== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.2\)) Subject: Re: [PATCH] Add tests for Bitmapset From: Daniel Gustafsson In-Reply-To: Date: Thu, 2 Oct 2025 14:33:09 +0200 Cc: Michael Paquier , Greg Burd , PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: References: <76DBEF5D-EA47-4C30-8D28-97B3B88E2E2D@greg.burd.me> <978D21E8-9D3B-40EA-A4B1-F87BABE7868C@yesql.se> To: David Rowley X-Mailer: Apple Mail (2.3776.700.51.11.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 2 Oct 2025, at 14:11, David Rowley wrote: >=20 > On Thu, 2 Oct 2025 at 23:00, Daniel Gustafsson = wrote: >> Doing post-commit review I didn't see any sharp edges, but found one = more of >> these so will push this shortly: >=20 > Any chance you could also delete the "/* memory cleanup seems more > tricky than it's worth here */" line? That comment seemed relevant > when we were actually doing bms_free() in the functions. Now that > we're not, it's a bit out of place. Sure I can take care of that while in there. 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: diff --git a/src/test/modules/test_bitmapset/test_bitmapset.c = b/src/test/modules/test_bitmapset/test_bitmapset.c index 0d6c2e7aa1b..acaa93d2f11 100644 --- a/src/test/modules/test_bitmapset/test_bitmapset.c +++ b/src/test/modules/test_bitmapset/test_bitmapset.c @@ -201,9 +201,6 @@ test_bms_make_singleton(PG_FUNCTION_ARGS) Bitmapset *bms; int32 member; - if (PG_ARGISNULL(0)) - PG_RETURN_NULL(); /* invalid input */ - member =3D PG_GETARG_INT32(0); bms =3D bms_make_singleton(member); I'll include all of these three tiny improvements in a commit later = today. -- Daniel Gustafsson