pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix lossy KNN GiST when ordering operator returns non-float8 val
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix lossy KNN GiST when ordering operator returns non-float8 val
@ 2016-02-02 12:21 Teodor Sigaev <teodor@sigaev.ru>
  0 siblings, 0 replies; 2+ messages in thread

From: Teodor Sigaev @ 2016-02-02 12:21 UTC (permalink / raw)
  To: pgsql-committers

Fix lossy KNN GiST when ordering operator returns non-float8 value.

KNN GiST with recheck flag should return to executor the same type as ordering
operator, GiST detects this type by looking to return type of function which
implements ordering operator. But occasionally detecting code works after
replacing ordering operator function to distance support function.
Distance support function always returns float8, so, detecting code get float8
instead of actual return type of ordering operator.

Built-in opclasses don't have ordering operator which doesn't return
non-float8 value, so, tests are impossible here, at least now.

Backpatch to 9.5 where lozzy KNN was introduced.

Author: Alexander Korotkov
Report by: Artur Zakirov

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/62e0ade9aa89c8f88ce506e1cb4be6e3697ee2d0

Modified Files
--------------
src/backend/access/gist/gistscan.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix lossy KNN GiST when ordering operator returns non-float8 val
@ 2016-02-02 12:21 Teodor Sigaev <teodor@sigaev.ru>
  0 siblings, 0 replies; 2+ messages in thread

From: Teodor Sigaev @ 2016-02-02 12:21 UTC (permalink / raw)
  To: pgsql-committers

Fix lossy KNN GiST when ordering operator returns non-float8 value.

KNN GiST with recheck flag should return to executor the same type as ordering
operator, GiST detects this type by looking to return type of function which
implements ordering operator. But occasionally detecting code works after
replacing ordering operator function to distance support function.
Distance support function always returns float8, so, detecting code get float8
instead of actual return type of ordering operator.

Built-in opclasses don't have ordering operator which doesn't return
non-float8 value, so, tests are impossible here, at least now.

Backpatch to 9.5 where lozzy KNN was introduced.

Author: Alexander Korotkov
Report by: Artur Zakirov

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f25d07d99f4acf136baed4ef29ea97faad7337db

Modified Files
--------------
src/backend/access/gist/gistscan.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-02-02 12:21 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-02-02 12:21 pgsql: Fix lossy KNN GiST when ordering operator returns non-float8 val Teodor Sigaev <teodor@sigaev.ru>
2016-02-02 12:21 pgsql: Fix lossy KNN GiST when ordering operator returns non-float8 val Teodor Sigaev <teodor@sigaev.ru>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox