Re: Patch: add GiST support for BOX @> POINT queries - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Patch: add GiST support for BOX @> POINT queries
Date
Msg-id 15507.1308319180@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patch: add GiST support for BOX @> POINT queries  (Andrew Tipton <andrew.t.tipton@gmail.com>)
List pgsql-hackers
Andrew Tipton <andrew.t.tipton@gmail.com> writes:
> At this point I'm a bit lost -- while pg_amop.h has plenty of examples
> of crosstype comparison operators for btree index methods, there are
> none for GiST.  Is GiST somehow a special case in this regard?

AFAIR, GIST doesn't use the concept of a crosstype opclass entry.
It only works with primary opclass entries.  You have to set both
amproclefttype and amprocrighttype to the datatype of the indexable
column, regardless of what the other argument actually is.

(I think this implies that you can't have more than one consistent
function per opclass, which means you have to do whatever it is you
have in mind by patching the existing consistent function, not adding
another one alongside it.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: XPATH evaluation
Next
From: Florian Pflug
Date:
Subject: Re: Boolean operators without commutators vs. ALL/ANY