Fix bugs in comparison functions for multirange_bsearch_match()
authorAlexander Korotkov <akorotkov@postgresql.org>
Tue, 29 Dec 2020 20:35:26 +0000 (23:35 +0300)
committerAlexander Korotkov <akorotkov@postgresql.org>
Tue, 29 Dec 2020 20:35:26 +0000 (23:35 +0300)
commita5b81b6f0006ea0b502780ce7f73d295a225842c
treeaa59780410492ad0515a0b1a5b959a9d9d8d3225
parent1b3433e25f81d6fc4f231887ab965e1ea1bcb47e
Fix bugs in comparison functions for multirange_bsearch_match()

Two functions multirange_range_overlaps_bsearch_comparison() and
multirange_range_contains_bsearch_comparison() contain bugs of returning -1
instead of 1.  This commit fixes these bugs and adds corresponding regression
tests.
src/backend/utils/adt/multirangetypes.c
src/test/regress/expected/multirangetypes.out
src/test/regress/sql/multirangetypes.sql