pgsql: Protect GIST logic that assumes penalty values can't be negative

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Protect GIST logic that assumes penalty values can't be negative
Дата
Msg-id E1QRWta-0000Qr-1O@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Protect GIST logic that assumes penalty values can't be negative.

Apparently sane-looking penalty code might return small negative values,
for example because of roundoff error.  This will confuse places like
gistchoose().  Prevent problems by clamping negative penalty values to
zero.  (Just to be really sure, I also made it force NaNs to zero.)
Back-patch to all supported branches.

Alexander Korotkov

Branch
------
REL8_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/08779dc699634858d4940158f5de12e1c7ff1448

Modified Files
--------------
doc/src/sgml/gist.sgml             |    2 ++
src/backend/access/gist/gistutil.c |   14 +++++++++++---
2 files changed, 13 insertions(+), 3 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Protect GIST logic that assumes penalty values can't be negative
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Protect GIST logic that assumes penalty values can't be negative