postgresql/src
Alexander Korotkov e6af7b367c 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
2019-09-08 21:17:37 +03:00
..
backend Fix handling of NULL distances in KNN-GiST 2019-09-08 21:17:37 +03:00
bin Message style fixes 2019-09-06 22:53:16 +02:00
common In pg_log_generic(), be more paranoid about preserving errno. 2019-07-06 11:25:48 -04:00
fe_utils Update stale comments, and fix comment typos. 2019-06-08 10:12:26 -07:00
include Fix handling of NULL distances in KNN-GiST 2019-09-08 21:17:37 +03:00
interfaces Message style fixes 2019-09-06 22:53:16 +02:00
makefiles Define WIN32_STACK_RLIMIT throughout win32 and cygwin builds. 2019-04-09 08:25:39 -07:00
pl Fix plpgsql to re-look-up composite type names at need. 2019-08-15 15:21:47 -04:00
port Improve what pg_strsignal prints if we haven't got strsignal(3). 2019-08-27 17:24:30 -04:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test Fix handling of NULL distances in KNN-GiST 2019-09-08 21:17:37 +03:00
timezone Tweak our special-case logic for the IANA "Factory" timezone. 2019-07-26 13:07:08 -04:00
tools Avoid using INFO elevel for what are fundamentally debug messages. 2019-09-07 19:03:11 -04:00
tutorial Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Consistently test for in-use shared memory. 2019-04-12 22:36:38 -07:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk Move logging.h and logging.c from src/fe_utils/ to src/common/. 2019-05-14 14:20:10 -04:00