From: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
---|---|
To: | Stas Kelvich <stas(dot)kelvich(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Cube extension kNN support |
Date: | 2015-02-07 21:32:58 |
Message-ID: | CAPpHfdugQB1iiLCO+=BRhP5R5-DhumsZaZwKRtYNcq58UKTVpA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi!
On Sat, Feb 7, 2015 at 12:45 PM, Stas Kelvich <stas(dot)kelvich(at)gmail(dot)com>
wrote:
> I had updated old patch with kNN operators for cube data structures.
> Copying description from old message:
>
> Following distance operators introduced:
>
> <#> taxicab distance
> <-> euclidean distance
> <=> chebyshev distance
>
> For example:
> SELECT * FROM objects ORDER BY objects.coord <-> '(137,42,314)'::cube
> LIMIT 10;
>
> Also there is operator "->" for selecting ordered rows directly from index.
> This request selects rows ordered ascending by 3rd coordinate:
>
> SELECT * FROM objects ORDER BY objects.coord->3 LIMIT 10;
>
> For descendent ordering suggested syntax with minus before coordinate.
> This request selects rows ordered descending by 4th coordinate:
>
> SELECT * FROM objects ORDER BY objects.coord->-4 LIMIT 10;
>
I've checked the patch. The first notes are so:
1) Check coding style, in particular braces. Postgres coding style require
using it for multiline statements.
2) Update documentation according to new features.
------
With best regards,
Alexander Korotkov.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-02-07 21:35:03 | Re: perplexing error message |
Previous Message | Andres Freund | 2015-02-07 21:30:29 | Re: Parallel Seq Scan |