Add missing inequality searches to rbtree
Alexander Korotkov <akorotkov@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/lib/rbtree.c | modified | +62 −0 |
| src/include/lib/rbtree.h | modified | +2 −0 |
| src/test/modules/test_rbtree/test_rbtree.c | modified | +102 −0 |
Discussion
- Add red-black tree missing comparison searches 9 messages · 2022-06-30 → 2022-07-08