Re: List of Bitmapset (was Re: ExecRTCheckPerms() and many prunable partitions) - Mailing list pgsql-hackers

From Amit Langote
Subject Re: List of Bitmapset (was Re: ExecRTCheckPerms() and many prunable partitions)
Date
Msg-id CA+HiwqGTCc_4p3XTjaYPGkCEehaC7Xi48Aq-5ZYg-d11GHzd7A@mail.gmail.com
Whole thread Raw
In response to Re: List of Bitmapset (was Re: ExecRTCheckPerms() and many prunable partitions)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Nov 16, 2022 at 3:25 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Amit Langote <amitlangote09@gmail.com> writes:
> >  On Mon, Nov 14, 2022 at 11:57 PM Tom Lane <tgl@sss.pgh.pa.us> 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.

Thanks.

> >> +   /* 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.

Oops, I missed that case.

The latest version looks pretty good to me.

-- 
Thanks, Amit Langote
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: Documentation for building with meson
Next
From: Japin Li
Date:
Subject: Re: closing file in adjust_data_dir