Re: Cube extension kNN support
От | Stas Kelvich |
---|---|
Тема | Re: Cube extension kNN support |
Дата | |
Msg-id | EEC5A6BA-5638-4000-BC45-D3ADA49BDE7E@gmail.com обсуждение исходный текст |
Ответ на | Re: Cube extension kNN support (Alexander Korotkov <aekorotkov@gmail.com>) |
Ответы |
Re: Cube extension kNN support
|
Список | pgsql-hackers |
Documentation along with style fix. > On 08 Feb 2015, at 00:32, Alexander Korotkov <aekorotkov@gmail.com> wrote: > > Hi! > > On Sat, Feb 7, 2015 at 12:45 PM, Stas Kelvich <stas.kelvich@gmail.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.
Вложения
В списке pgsql-hackers по дате отправления: