Re: Patch: add GiST support for BOX @> POINT queries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Tipton <andrew(dot)t(dot)tipton(at)gmail(dot)com>
Cc: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch: add GiST support for BOX @> POINT queries
Date: 2011-06-17 13:59:40
Message-ID: 15507.1308319180@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Tipton <andrew(dot)t(dot)tipton(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2011-06-17 14:03:56 Re: Boolean operators without commutators vs. ALL/ANY
Previous Message Andrew Dunstan 2011-06-17 13:47:04 Re: XPATH evaluation