Re: Add red-black tree missing comparison searches
Alexander Korotkov <aekorotkov@gmail.com>
From: Alexander Korotkov <aekorotkov@gmail.com>
To: Steve Chavez <steve@supabase.io>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2022-07-07T10:43:55Z
Lists: pgsql-hackers
Attachments
- 0001-Use-C99-designator-in-the-rbtree-sentinel-definit-v3.patch (application/octet-stream) patch v3-0001
- 0002-Add-missing-inequality-searches-to-rbtree-v3.patch (application/octet-stream) patch v3-0002
On Thu, Jul 7, 2022 at 2:16 AM Steve Chavez <steve@supabase.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! ------ Regards, Alexander Korotkov
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add missing inequality searches to rbtree
- e57519a4637a 16.0 landed
-
Use C99 designator in the rbtree sentinel definition
- 8d51d7f403c2 16.0 landed