Re: knngist - 0.8 - Mailing list pgsql-hackers

From Robert Haas
Subject Re: knngist - 0.8
Date
Msg-id AANLkTi=NwrDFjYGu9Ws3EkU3TE=94jcx2mWh_ZX2o1hg@mail.gmail.com
Whole thread Raw
In response to Re: knngist - 0.8  (Teodor Sigaev <teodor@sigaev.ru>)
Responses Re: knngist - 0.8
List pgsql-hackers
2010/10/19 Teodor Sigaev <teodor@sigaev.ru>:
>>> Thinking about it that way, perhaps we could add an integer column
>>> amop_whats_it_good_for that gets used as a bit field.  That wouldn't
>>> require changing the index structure, although it might break some
>>> other things.
>
>> OPERATOR strategy_number ( op_type [ , op_type ] ) [ FOR { SEARCH |
>> ORDER } [, ...] ]
>
> It's very desirable thing to be able to distinguish roles in consistent
> method of GiST: computation of distance could be very expensive and. The
> single way to provide it in current GiST interface is a strategy number. Of
> course, we could add 6-th argument to consistent to point role, but I don't
> think that's good decision.

To me, adding an additional argument (or maybe providing a whole
separate support function, separate from consistent) seems quite
natural, because now you have a way to pass all the other little bits
that might matter... ASC/DESC, NULLS FIRST/LAST, collation OID, etc.
You can define the additional argument as providing all of the extra
info about how the operator is being used, and, if it's being used for
ordering, the details of the requested order.  What is your thinking
on the matter?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Extensions, this time with a patch
Next
From: Simon Riggs
Date:
Subject: Re: Issues with two-server Synch Rep