Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ov0cd-0005Uu-MG for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Nov 2022 18:25:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ov0cc-0007sq-Jl for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Nov 2022 18:25:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ov0cc-0007sh-Aq for pgsql-hackers@lists.postgresql.org; Tue, 15 Nov 2022 18:25:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ov0ca-0001h7-4k for pgsql-hackers@lists.postgresql.org; Tue, 15 Nov 2022 18:25:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 2AFIPG8d1175542; Tue, 15 Nov 2022 13:25:16 -0500 From: Tom Lane To: Amit Langote cc: Richard Guo , Alvaro Herrera , David Rowley , Greg Stark , Julien Rouhaud , PostgreSQL Hackers Subject: Re: List of Bitmapset (was Re: ExecRTCheckPerms() and many prunable partitions) In-reply-to: References: <892228.1668437838@sss.pgh.pa.us> Comments: In-reply-to Amit Langote message dated "Tue, 15 Nov 2022 11:04:28 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1175540.1668536716.1@sss.pgh.pa.us> Date: Tue, 15 Nov 2022 13:25:16 -0500 Message-ID: <1175541.1668536716@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Amit Langote writes: > On Mon, Nov 14, 2022 at 11:57 PM Tom Lane wrote: >> + * The new member is identified by the zero-based index of the List >> + * element it should go into, and the bit number to be set therein. > The comment sounds a bit ambiguous, especially the ", and the bit > number to be set therein." part. If you meant to describe the > arguments, how about mentioning their names too, as in: Done that way in the patch I just posted. >> + /* forboth will stop at the end of the shorter list, which is fine */ > Isn't this comment unnecessary given that the while loop makes both > lists be the same length? No, the while loop ensures that a is at least as long as b. It could have started out longer, though. regards, tom lane