postgresql/src/include/access
Alexander Korotkov 2da8e56db3 Improve handling of NULLs in KNN-GiST and KNN-SP-GiST
This commit improves subject in two ways:

 * It removes ugliness of 02f90879e7, which stores distance values and null
   flags in two separate arrays after GISTSearchItem struct.  Instead we pack
   both distance value and null flag in IndexOrderByDistance struct.  Alignment
   overhead should be negligible, because we typically deal with at most few
   "col op const" expressions in ORDER BY clause.
 * It fixes handling of "col op NULL" expression in KNN-SP-GiST.  Now, these
   expression are not passed to support functions, which can't deal with them.
   Instead, NULL result is implicitly assumed.  It future we may decide to
   teach support functions to deal with NULL arguments, but current solution is
   bugfix suitable for backpatch.

Reported-by: Nikita Glukhov
Discussion: https://postgr.es/m/826f57ee-afc7-8977-c44c-6111d18b02ec%40postgrespro.ru
Author: Nikita Glukhov
Reviewed-by: Alexander Korotkov
Backpatch-through: 9.4
2019-09-19 21:50:00 +03:00
..
amapi.h Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
amvalidate.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
attnum.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
brin.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
brin_internal.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
brin_page.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
brin_pageops.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
brin_revmap.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
brin_tuple.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
brin_xlog.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
bufmask.h For wal_consistency_checking, mask page checksum as well as page LSN. 2017-09-22 14:33:18 -04:00
clog.h Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
commit_ts.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
genam.h Improve handling of NULLs in KNN-GiST and KNN-SP-GiST 2019-09-19 21:50:00 +03:00
generic_xlog.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
gin.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
gin_private.h Rename rbtree.c functions to use "rbt" prefix not "rb" prefix. 2018-11-06 13:25:24 -05:00
ginblock.h Prevent GIN deleted pages from being reclaimed too early 2018-12-13 06:41:04 +03:00
ginxlog.h Fix WAL format incompatibility introduced by backpatching of 52ac6cd2d0 2019-03-24 15:41:32 +03:00
gist.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
gist_private.h Improve handling of NULLs in KNN-GiST and KNN-SP-GiST 2019-09-19 21:50:00 +03:00
gistscan.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
gistxlog.h Split index xlog headers from other private index headers. 2017-02-14 15:37:59 -05:00
hash.h Fix the overrun in hash index metapage for smaller block sizes. 2018-09-06 10:19:51 +05:30
hash_xlog.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
heapam.h Fix logical decoding error when system table w/ toast is repeatedly rewritten. 2018-10-10 13:53:02 -07:00
heapam_xlog.h Perform a lot more sanity checks when freezing tuples. 2017-12-14 18:20:48 -08:00
hio.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
htup.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
htup_details.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
itup.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
multixact.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
nbtree.h Allow btree comparison functions to return INT_MIN. 2018-10-05 16:01:29 -04:00
nbtxlog.h Fix nbtree page split rmgr desc routine. 2019-09-12 15:45:03 -07:00
parallel.h Mark a few parallelism-related variables with PGDLLIMPORT. 2019-06-03 21:25:43 -04:00
printsimple.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
printtup.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
reloptions.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
relscan.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
rewriteheap.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
rmgr.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
rmgrlist.h hash: Support WAL consistency checking. 2017-03-14 14:58:56 -04:00
sdir.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
skey.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
slru.h Remove outdated comment 2017-06-30 14:43:05 -04:00
spgist.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
spgist_private.h Prevent query-lifespan memory leakage of SP-GiST traversal values. 2018-03-19 23:59:17 -04:00
spgxlog.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
stratnum.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
subtrans.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
sysattr.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
timeline.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
transam.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
tsmapi.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
tupconvert.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
tupdesc.h Backpatch introduction of TupleDescAttr(tupdesc, i). 2017-08-22 07:46:05 -07:00
tupmacs.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
tuptoaster.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
twophase.h Mark assorted variables PGDLLIMPORT. 2017-12-05 09:24:05 -05:00
twophase_rmgr.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
valid.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
visibilitymap.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
xact.h Restrict the use of temporary namespace in two-phase transactions 2019-01-18 09:21:58 +09:00
xlog.h Make checkpoint requests more robust. 2019-03-19 12:49:27 -04:00
xlog_internal.h Fix comment. 2017-08-01 08:00:11 +09:00
xlogdefs.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
xloginsert.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
xlogreader.h Fix scenario where streaming standby gets stuck at a continuation record. 2018-05-05 01:35:09 +03:00
xlogrecord.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
xlogutils.h Post-PG 10 beta1 pgindent run 2017-05-17 16:31:56 -04:00