From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add missing inequality searches to rbtree
Date: Fri, 08 Jul 2022 19:00:27 +0000
Message-ID: <E1o9tDG-001q2T-Dk@gemulon.postgresql.org> (raw)
Add missing inequality searches to rbtree
PostgreSQL contains the implementation of the red-black tree. The red-black
tree is the ordered data structure, and one of its advantages is the ability
to do inequality searches. This commit adds rbt_find_less() and
rbt_find_great() functions implementing these searches. While these searches
aren't yet used in the core code, they might be useful for extensions.
Discussion: https://postgr.es/m/CAGRrpzYE8-7GCoaPjOiL9T_HY605MRax-2jgTtLq236uksZ1Sw%40mail.gmail.com
Author: Steve Chavez, Alexander Korotkov
Reviewed-by: Alexander Korotkov
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/e57519a4637a8d88ae993ac1273d2b59d03a0f75
Modified Files
--------------
src/backend/lib/rbtree.c | 62 ++++++++++++++++++
src/include/lib/rbtree.h | 2 +
src/test/modules/test_rbtree/test_rbtree.c | 102 +++++++++++++++++++++++++++++
3 files changed, 166 insertions(+)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: akorotkov@postgresql.org
Subject: Re: pgsql: Add missing inequality searches to rbtree
In-Reply-To: <E1o9tDG-001q2T-Dk@gemulon.postgresql.org>
References: <E1o9tDG-001q2T-Dk@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox