postgresql/src/include
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
..
access Improve handling of NULLs in KNN-GiST and KNN-SP-GiST 2019-09-19 21:48:39 +03:00
bootstrap Remove more unreferenced function declarations 2019-07-07 09:58:33 +09:00
catalog Allow setting statistics target for extended statistics 2019-09-11 00:25:51 +02:00
commands Allow setting statistics target for extended statistics 2019-09-11 00:25:51 +02:00
common Add overflow-safe math inline functions for unsigned integers 2019-09-02 09:38:23 +09:00
datatype Update copyright for 2019 2019-01-02 12:44:25 -05:00
executor Reorder EPQ work, to fix rowmark related bugs and improve efficiency. 2019-09-09 05:14:11 -07:00
fe_utils Fix inconsistencies and typos in the tree, take 11 2019-08-19 16:21:39 +09:00
foreign Fix inconsistencies and typos in the tree 2019-07-16 13:23:53 +09:00
jit Remove fmgr.h includes from headers that don't really need it. 2019-08-16 10:35:31 -07:00
lib Allow simplehash to use already-calculated hash values. 2019-08-01 16:05:49 -07:00
libpq Update hardcoded DH parameters to IANA standards 2019-07-05 10:47:32 +09:00
mb Fix inconsistencies and typos in the tree, take 9 2019-08-05 12:14:58 +09:00
nodes Fix under-parenthesized macro definitions 2019-09-13 16:26:55 -03:00
optimizer Cosmetic improvements in setup of planner's per-RTE arrays. 2019-08-09 12:33:43 -04:00
parser Require the schema qualification in pg_temp.type_name(arg). 2019-08-05 07:48:41 -07:00
partitioning Improve pruning of a default partition 2019-08-04 11:18:45 -04:00
port Revert "For all ppc compilers, implement pg_atomic_fetch_add_ with inline asm." 2019-09-14 19:38:41 -07:00
portability Update copyright for 2019 2019-01-02 12:44:25 -05:00
postmaster Fix inconsistencies and typos in the tree 2019-07-16 13:23:53 +09:00
regex Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
replication Fix inconsistencies and typos in the tree, take 11 2019-08-19 16:21:39 +09:00
rewrite Fix inconsistencies and typos in the tree, take 10 2019-08-13 13:53:41 +09:00
snowball Sync our Snowball stemmer dictionaries with current upstream 2019-07-04 13:26:48 +02:00
statistics Allow setting statistics target for extended statistics 2019-09-11 00:25:51 +02:00
storage Remove unused smgrdounlinkfork() function. 2019-09-18 21:05:33 +09:00
tcop Fix many typos and inconsistencies 2019-07-01 10:00:23 +09:00
tsearch Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
utils Fix bogus handling of XQuery regex option flags. 2019-09-17 15:39:51 -04:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
c.h Improve Assert output 2019-08-17 12:50:50 +02:00
fmgr.h Make comment in fmgr.h match the one in fmgr.c. 2019-08-26 14:32:48 -04:00
funcapi.h Fix many typos and inconsistencies 2019-07-01 10:00:23 +09:00
getaddrinfo.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
getopt_long.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
Makefile Get rid of jsonpath_gram.h and jsonpath_scanner.h 2019-03-20 11:13:34 +03:00
miscadmin.h Fix inconsistencies and typos in the tree, take 11 2019-08-19 16:21:39 +09:00
pg_config.h.in Revert "For all ppc compilers, implement pg_atomic_fetch_add_ with inline asm." 2019-09-14 19:38:41 -07:00
pg_config.h.win32 Use explicit_bzero 2019-09-05 08:30:42 +02:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pg_getopt.h Use our own getopt() on OpenBSD. 2019-01-18 15:06:26 -05:00
pg_trace.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pgstat.h Remove fmgr.h includes from headers that don't really need it. 2019-08-16 10:35:31 -07:00
pgtar.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
pgtime.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
port.h Use explicit_bzero 2019-09-05 08:30:42 +02:00
postgres.h Change function call information to be variable length. 2019-01-26 14:17:52 -08:00
postgres_ext.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
postgres_fe.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
rusagestub.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
windowapi.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00