postgresql/src/include/access
Alexander Korotkov 31cbd76057 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:49:07 +03:00
..
amapi.h Initial pgindent run for v12. 2019-05-22 12:55:34 -04:00
amvalidate.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
attnum.h Fix many typos and inconsistencies 2019-07-01 10:00:23 +09:00
brin.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
brin_internal.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
brin_page.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
brin_pageops.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
brin_revmap.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
brin_tuple.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
brin_xlog.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
bufmask.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
clog.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
commit_ts.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
genam.h Improve handling of NULLs in KNN-GiST and KNN-SP-GiST 2019-09-19 21:49:07 +03:00
generic_xlog.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
gin.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
gin_private.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
ginblock.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
ginxlog.h Generate less WAL during GiST, GIN and SP-GiST index build. 2019-04-03 17:03:15 +03:00
gist.h Use full 64-bit XID for checking if a deleted GiST page is old enough. 2019-07-24 20:25:22 +03:00
gist_private.h Improve handling of NULLs in KNN-GiST and KNN-SP-GiST 2019-09-19 21:49:07 +03:00
gistscan.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
gistxlog.h Use full 64-bit XID for checking if a deleted GiST page is old enough. 2019-07-24 20:25:22 +03:00
hash.h Fix many typos and inconsistencies 2019-07-01 10:00:23 +09:00
hash_xlog.h Compute XID horizon for page level index vacuum on primary. 2019-03-26 16:52:54 -07:00
heapam.h Fix assorted inconsistencies. 2019-06-08 08:16:38 +05:30
heapam_xlog.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
hio.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
htup.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
htup_details.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
itup.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
multixact.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
nbtree.h Fix nbtree metapage cache upgrade bug. 2019-07-18 13:22:54 -07:00
nbtxlog.h Fix nbtree page split rmgr desc routine. 2019-09-12 15:45:07 -07:00
parallel.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
printsimple.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
printtup.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
relation.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
reloptions.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
relscan.h Initial pgindent run for v12. 2019-05-22 12:55:34 -04:00
rewriteheap.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
rmgr.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
rmgrlist.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
sdir.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
session.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
skey.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
slru.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
spgist.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
spgist_private.h Improve handling of NULLs in KNN-GiST and KNN-SP-GiST 2019-09-19 21:49:07 +03:00
spgxlog.h Initial pgindent run for v12. 2019-05-22 12:55:34 -04:00
stratnum.h Move hash_any prototype from access/hash.h to utils/hashutils.h 2019-03-11 13:17:50 -03:00
subtrans.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
sysattr.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
table.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
tableam.h tableam: comment improvements. 2019-07-17 19:51:17 -07:00
timeline.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
transam.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
tsmapi.h tableam: sample scan. 2019-03-31 18:37:57 -07:00
tupconvert.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
tupdesc.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
tupdesc_details.h Make naming of tupdesc related structs more consistent with the rest of PG. 2019-01-14 16:25:50 -08:00
tupmacs.h Improve comment for att_isnull. 2019-05-13 13:13:24 -04:00
tuptoaster.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
twophase.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
twophase_rmgr.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
valid.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
visibilitymap.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
xact.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
xlog.h Don't call data type input functions in GUC check hooks 2019-06-30 10:27:43 +02:00
xlog_internal.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
xlogdefs.h Fix more typos and inconsistencies in the tree 2019-06-17 16:13:16 +09:00
xloginsert.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
xlogreader.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
xlogrecord.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
xlogutils.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00