From: Teodor Sigaev <teodor@sigaev.ru>
To: pgsql-committers@postgresql.org
Subject: pgsql: llow negative coordinate for ~> (cube, int) operator
Date: Thu, 11 Jan 2018 11:49:54 +0000
Message-ID: <E1eZbMo-0000ir-S7@gemulon.postgresql.org> (raw)
llow negative coordinate for ~> (cube, int) operator
~> (cube, int) operator was especially designed for knn-gist search.
However, knn-gist supports only ascending ordering of results. Nevertheless
it would be useful to support descending ordering by ~> (cube, int) operator.
We provide workaround for that: negative coordinate give us inversed value
of corresponding cube bound. Therefore, knn search using negative coordinate
gives us an effect of descending ordering by cube bound.
Author: Alexander Korotkov
Reviewed by: Tomas Vondra, Andrey Borodin
Discussion: https://www.postgresql.org/message-id/flat/a9657f6a-b497-36ff-e56-482a2c7e3292@2ndquadrant.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f50c80dbb17efa39c169f6c510e9464486ff5edc
Modified Files
--------------
contrib/cube/cube.c | 44 ++++++++--
contrib/cube/expected/cube.out | 168 ++++++++++++++++++++++++++++++++++++++-
contrib/cube/expected/cube_2.out | 168 ++++++++++++++++++++++++++++++++++++++-
contrib/cube/sql/cube.sql | 8 ++
doc/src/sgml/cube.sgml | 5 +-
5 files changed, 379 insertions(+), 14 deletions(-)
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: llow negative coordinate for ~> (cube, int) operator
In-Reply-To: <E1eZbMo-0000ir-S7@gemulon.postgresql.org>
References: <E1eZbMo-0000ir-S7@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