pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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:18 +0000
Message-ID: <E1aQZxO-0006h8-UG@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
------
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


view thread (2+ messages)  latest in thread

Message-ID: <E1aQZxO-0006h8-UG@gemulon.postgresql.org>
Permalink:  ../E1aQZxO-0006h8-UG@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1aQZxO-0006h8-UG@gemulon.postgresql.org

 · 

reply

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: <E1aQZxO-0006h8-UG@gemulon.postgresql.org>
  References: <E1aQZxO-0006h8-UG@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