Fix assertion failure in check_new_partition_bound().
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 30 Oct 2020 21:00:59 +0000 (17:00 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 30 Oct 2020 21:00:59 +0000 (17:00 -0400)
commit970c05057593c2f5919a69b43fd917c4fa86f51c
tree2471f25b1e617b24cf3bdd59cc9db7a6f1b714d6
parent6f0bc5e1daf09686c526aa161da5336f7c94f4eb
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
src/backend/partitioning/partbounds.c
src/test/regress/expected/create_table.out
src/test/regress/sql/create_table.sql