pgsql: Fix assertion failure in check_new_partition_bound().

Started by Tom Laneover 5 years ago1 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

Fix assertion failure in check_new_partition_bound().

Commit 6b2c4e59d was overly confident about not being able to see
a negative cmpval result from partition_range_bsearch(). Adjust
the code to cope with that.

Report and patch by Amul Sul; some additional cosmetic changes by me

Discussion: /messages/by-id/CAAJ_b97WCO=EyVA7fKzc86kKfojHXLU04_zs7-7+yVzm=-1QkQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/970c05057593c2f5919a69b43fd917c4fa86f51c

Modified Files
--------------
src/backend/partitioning/partbounds.c | 40 +++++++++++++++---------------
src/test/regress/expected/create_table.out | 4 +++
src/test/regress/sql/create_table.sql | 1 +
3 files changed, 25 insertions(+), 20 deletions(-)