postgresql/src/include/access
Alexander Korotkov 6cae9d2c10 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:48:39 +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 Remove fmgr.h includes from headers that don't really need it. 2019-08-16 10:35:31 -07: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 Fix inconsistencies and typos in the tree, take 10 2019-08-13 13:53:41 +09:00
brin_tuple.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
brin_xlog.h Fix inconsistencies and typos in the tree, take 11 2019-08-19 16:21:39 +09: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 Fix inconsistencies and typos in the tree, take 9 2019-08-05 12:14:58 +09:00
detoast.h Split tuptoaster.c into three separate files. 2019-09-05 13:15:10 -04:00
genam.h Improve handling of NULLs in KNN-GiST and KNN-SP-GiST 2019-09-19 21:48:39 +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 Fix inconsistencies and typos in the tree, take 9 2019-08-05 12:14:58 +09:00
ginblock.h Fix inconsistencies and typos in the tree 2019-07-22 10:01:50 +09:00
ginxlog.h Fix inconsistencies and typos in the tree 2019-07-22 10:01:50 +09:00
gist.h Use full 64-bit XID for checking if a deleted GiST page is old enough. 2019-07-24 20:24:07 +03:00
gist_private.h Improve handling of NULLs in KNN-GiST and KNN-SP-GiST 2019-09-19 21:48:39 +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:24:07 +03:00
hash.h Remove fmgr.h includes from headers that don't really need it. 2019-08-16 10:35:31 -07:00
hash_xlog.h Fix inconsistencies and typos in the tree, take 10 2019-08-13 13:53:41 +09:00
heapam.h Fix inconsistencies in the code 2019-07-08 13:15:09 +09:00
heapam_xlog.h Fix inconsistencies and typos in the tree, take 11 2019-08-19 16:21:39 +09:00
heaptoast.h Split tuptoaster.c into three separate files. 2019-09-05 13:15:10 -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 Fix inconsistencies and typos in the tree, take 11 2019-08-19 16:21:39 +09: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 Reorder two nbtree.h function prototypes. 2019-09-12 09:59:16 -07:00
nbtxlog.h Fix nbtree page split rmgr desc routine. 2019-09-12 15:45:08 -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 Fix inconsistencies and typos in the tree, take 10 2019-08-13 13:53:41 +09: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 Remove fmgr.h includes from headers that don't really need it. 2019-08-16 10:35:31 -07:00
spgist_private.h Improve handling of NULLs in KNN-GiST and KNN-SP-GiST 2019-09-19 21:48:39 +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:48:47 -07:00
timeline.h Fix inconsistencies in the code 2019-07-08 13:15:09 +09:00
toast_helper.h Create an API for inserting and deleting rows in TOAST tables. 2019-09-06 10:38:51 -04:00
toast_internals.h Split tuptoaster.c into three separate files. 2019-09-05 13:15:10 -04:00
transam.h Remove unreferenced function declarations. 2019-07-05 19:28:45 -04:00
tsmapi.h tableam: sample scan. 2019-03-31 18:37:57 -07:00
tupconvert.h Remove 'msg' parameter from convert_tuples_by_name 2019-09-03 14:47:29 -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
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 Fix inconsistencies and typos in the tree 2019-07-22 10:01:50 +09: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 Fix inconsistencies and typos in the tree, take 11 2019-08-19 16:21:39 +09:00
xlogdefs.h Fix more typos and inconsistencies in the tree 2019-06-17 16:13:16 +09:00
xloginsert.h Fix inconsistencies and typos in the tree, take 9 2019-08-05 12:14:58 +09:00
xlogreader.h Make XLogReaderInvalReadState static 2019-09-03 17:41:43 -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