From: Teodor Sigaev <teodor@sigaev.ru>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix lossy KNN GiST when ordering operator returns non-float8 val
Date: Tue, 02 Feb 2016 12:21:35 +0000
Message-ID: <E1aQZxf-0006hY-IF@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: teodor@sigaev.ru
Subject: Re: pgsql: Fix lossy KNN GiST when ordering operator returns non-float8 val
In-Reply-To: <E1aQZxf-0006hY-IF@gemulon.postgresql.org>
References: <E1aQZxf-0006hY-IF@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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