git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 0a97edb) | patch
Improve handling of NULLs in KNN-GiST and KNN-SP-GiST
2019年9月19日 18:30:19 +0000 (21:30 +0300)
2019年9月19日 18:48:39 +0000 (21:48 +0300)
commit 6cae9d2c10e151f741e7bc64a8b70bb2615c367c
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
src/backend/access/gist/gistget.c diff | blob | blame | history
src/backend/access/gist/gistscan.c diff | blob | blame | history
src/backend/access/index/indexam.c diff | blob | blame | history
src/backend/access/spgist/spgscan.c diff | blob | blame | history
src/include/access/genam.h diff | blob | blame | history
src/include/access/gist_private.h diff | blob | blame | history
src/include/access/spgist_private.h diff | blob | blame | history
src/test/regress/expected/create_index_spgist.out diff | blob | blame | history
src/test/regress/sql/create_index_spgist.sql diff | blob | blame | history
src/tools/pgindent/typedefs.list diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /