Fix assertion failure in check_new_partition_bound().

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 970c05057593c2f5919a69b43fd917c4fa86f51c
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2020-10-30T21:00:59Z
Releases: 14.0
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: https://postgr.es/m/CAAJ_b97WCO=EyVA7fKzc86kKfojHXLU04_zs7-7+yVzm=-1QkQ@mail.gmail.com

Files

Discussion