postgresql/src/backend/access/index
Alexander Korotkov 8c8a267201 Fix freeing old values in index_store_float8_orderby_distances()
6cae9d2c10 has added an error in freeing old values in
index_store_float8_orderby_distances() function.  It looks for old value in
scan->xs_orderbynulls[i] after setting a new value there.
This commit fixes that.  Also it removes short-circuit in handling
distances == NULL situation.  Now distances == NULL will be treated the same
way as array with all null distances.  That is, previous values will be freed
if any.

Reported-by: Tom Lane, Nikita Glukhov
Discussion: https://postgr.es/m/CAPpHfdu2wcoAVAm3Ek66rP%3Duo_C-D84%2B%2Buf1VEcbyi_caBXWCA%40mail.gmail.com
Discussion: https://postgr.es/m/426580d3-a668-b9d1-7b8e-f74d1a6524e0%40postgrespro.ru
Backpatch-through: 12
2019-09-20 01:19:08 +03:00
..
Makefile Improve index AMs' opclass validation procedures. 2016-01-21 19:47:15 -05:00
amapi.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
amvalidate.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
genam.c Fix inconsistencies and typos in the tree 2019-07-22 10:01:50 +09:00
indexam.c Fix freeing old values in index_store_float8_orderby_distances() 2019-09-20 01:19:08 +03:00