pgsql: Fix handling of NULL distances in KNN-GiST

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема pgsql: Fix handling of NULL distances in KNN-GiST
Дата
Msg-id E1i72u0-0001Sl-E3@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix handling of NULL distances in KNN-GiST

In order to implement NULL LAST semantic GiST previously assumed distance to
the NULL value to be Inf.  However, our distance functions can return Inf and
NaN for non-null values.  In such cases, NULL LAST semantic appears to be
broken.  This commit fixes that by introducing separate array of null flags for
distances.

Backpatch to all supported versions.

Discussion: https://postgr.es/m/CAPpHfdsNvNdA0DBS%2BwMpFrgwT6C3-q50sFVGLSiuWnV3FqOJuQ%40mail.gmail.com
Author: Alexander Korotkov
Backpatch-through: 9.4

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1df4123048c49dda878bbe3b49616b0ff3b3dbe5

Modified Files
--------------
src/backend/access/gist/gistget.c  | 70 +++++++++++++++++++++++++-------------
src/backend/access/gist/gistscan.c | 31 +++++++++++++----
src/include/access/gist_private.h  | 25 ++++++++++++--
3 files changed, 93 insertions(+), 33 deletions(-)


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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: pgsql: Fix handling of NULL distances in KNN-GiST
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix RelationIdGetRelation calls that weren't bothering witherro