Re: knngist - 0.8

From: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Subject: Re: knngist - 0.8
Date: 2010-12-27 00:52:59
Message-ID: AANLkTinKOB7836fmTqXpSCdX+QKMJfipe-ydFGc1RU82@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/12/27 Robert Haas <robertmhaas(at)gmail(dot)com>:
> On Sun, Dec 26, 2010 at 2:41 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com> writes:
>>> Catching up tonight, I wonder I could propose to add ordering
>>> operators in btree, not in gist, for basic types.
>>
>> I thought about that for a bit while working on the knngist patch, but
>> couldn't really see any useful application.  In particular, I don't see
>> a way to shoehorn + and - in there as ordering operators.  They don't
>> match the structure.  The RANGE problem wants to add operators that are
>> somehow related to a btree's operators, but they're not related in the
>> way that knngist uses.
>
> As far as window functions go, we clearly need some kind of type
> interface feature, but I am unclear whether we should sandwhich it
> into the btree opclass machinery or whether it might be better to
> create a whole separate concept just for this purpose.  Range types
> might also like to have some of the same information (addition and
> subtraction operators for a type, and perhaps also the identity and
> unit if those exist).

I believe we should use btree opclass machinery to represent
add/subtract interfaces because in the RANGE case you eventually need
add constant to value and compare it with some boundary by using
btree. Or, btree operator set would be shared in the type interface
machinery. We will want to avoid duplication between them.

Regards,

--
Hitoshi Harada

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-12-27 01:13:40 Re: knngist - 0.8
Previous Message Andrew Dunstan 2010-12-26 21:54:24 Re: C++ keywords in headers (was Re: [GENERAL] #include <funcapi.h>)