From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Paul Matthews <plm(at)netspace(dot)net(dot)au> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Geometric Elimination |
Date: | 2009-08-21 14:07:03 |
Message-ID: | 20090821140703.GB27048@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Aug 21, 2009 at 09:42:57PM +1000, Paul Matthews wrote:
> Martijn van Oosterhout wrote:
> > I haven't completely understood what you're trying to do
> >
> Putting in place the missing 'box op point' and 'point op box'
> operators. The problematic queries are at the bottom of the email.
If that's all you're doing, why all the fussing with indexes.
> > - I don't see any definition of an operator class, just the family,
> > which doesn't seem to make any sense to me.
> >
> I am working on the assumption that the Box and Point class already have
> operator classes. Otherwise how would all the existing Box and Point
> operators work? From my limited understanding of the source code it's in
> postgres.bki round about line 2208 and 2211. (It there a better
> interface to this information?).
The box type has an operator class, for boxes. There is no operator
class for points, it could clearly be done, it just hasn't. Operator
classes are *only* needed for index support. If you don't want index
support, don't set them up.
For catalogs I usually get go the the anoncvs interface for the raw
data, for example:
http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_opclass.h?rev=1.85
http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_amop.h?rev=1.90
If you want index support, you need to go the whole way, and setup an
appropriate operator class for (box,point).
> > - Check for differences in the explain output, that should reveal any
> > implicit casts that may be getting in your way.
> >
> The EXPLAIN does not show any explicit casts occurring.
It would be helpful if you pasted the actual EXPLAIN output. The last
two really should be the same, so what's the difference in explain
output?
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-08-21 14:18:51 | Re: XLogFlush |
Previous Message | Tom Lane | 2009-08-21 14:00:59 | Re: Geometric Elimination |