Re: Add red-black tree missing comparison searches

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Steve Chavez <steve(at)supabase(dot)io>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add red-black tree missing comparison searches
Date: 2022-07-08 19:01:24
Message-ID: CAPpHfdukKZFehZX8sGJCEzPxNdvDu7GQ8SFZV1zi0hLrhT8HaA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 7, 2022 at 1:43 PM Alexander Korotkov <aekorotkov(at)gmail(dot)com> wrote:
> On Thu, Jul 7, 2022 at 2:16 AM Steve Chavez <steve(at)supabase(dot)io> wrote:
> > Thanks Alexander!
> >
> > wrt to the new patch. I think the following comment is misleading since keyDeleted can be true or false:
> >
> > + /* switch equal_match to false so we only find greater matches now */
> > + node = (IntRBTreeNode *) rbt_find_great(tree, (RBTNode *) &searchNode,
> > + keyDeleted);
> >
> > Maybe it should be the same used for searching lesser keys:
> >
> > + /*
> > + * Find the next key. If the current key is deleted, we can pass
> > + * equal_match == true and still find the next one.
> > + */
>
> Thank you for catching this.
> The revised version of patch is attached!

Pushed!

------
Regards,
Alexander Korotkov

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-07-08 19:30:30 Re: Aggregate leads to superfluous projection from the scan
Previous Message Ibrar Ahmed 2022-07-08 18:41:34 Re: Aggregate leads to superfluous projection from the scan