Add red-black tree missing comparison searches

Поиск
Список
Период
Сортировка
От Steve Chavez
Тема Add red-black tree missing comparison searches
Дата
Msg-id CAGRrpzYE8-7GCoaPjOiL9T_HY605MRax-2jgTtLq236uksZ1Sw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Add red-black tree missing comparison searches  (Greg Stark <stark@mit.edu>)
Re: Add red-black tree missing comparison searches  (Alexander Korotkov <aekorotkov@gmail.com>)
Список pgsql-hackers
Hello hackers,

Currently the red-black tree implementation only has an equality search. Other extensions might need other comparison searches, like less-or-equal or greater-or-equal. For example OrioleDB defines a greater-or-equal search on its postgres fork:


So I thought this might be valuable to have in core. I've added less-or-equal and greater-or-equal searches functions plus tests in the test_rbtree module. I can add the remaining less/great searches if this is deemed worth it.

Also I refactored the sentinel used in the rbtree.c to use C99 designators.

Thanks in advance for any feedback!

--
Steve Chavez
Engineering at https://supabase.com/
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: vignesh C
Дата:
Сообщение: Re: Handle infinite recursion in logical replication setup
Следующее
От: Justin Pryzby
Дата:
Сообщение: Re: PATCH: Add Table Access Method option to pgbench