Re: Question about rtrees (overleft replacing left in nodes)

From: William White <bwhite(at)frognet(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question about rtrees (overleft replacing left in nodes)
Date: 2004-03-31 17:42:52
Message-ID: 406B031C.1070405@frognet.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-patches

Tom Lane wrote:
> I said:
>
>>However, if this is indeed wrong, why have we not heard bug reports
>>stating that rtree indexes don't work? Can you generate a test case
>>in which it fails?
>
>
> Actually, it's not necessary to look very far: there's one rtree index
> defined in the regression database, and guess what: it gets << queries
> wrong.

OK, glad to know I'm not going crazy. Oh well, if there's a way to
break something, trust me to find it within a week of using it. :(

Out of curiosity how many tuples are in that test? I wasn't able to
invoke index scan with position operators even at 100K tuples.

Also worth noting that &< and &> queries fail (that's the test case I
just sent) as well; the << and >> failure is (if I understand correctly)
a result of &< and &> being used at the node level in the rtree.

Side question: is there a user contrib area for extensions? The path to
this discovery started with a general interval "template class" to
support any interval type (open, half-open, or closed) on any scalar
data type (note: by "template class" read "C equivalent thereof using
Gnu cpp ## macro construction kluges to create another C file with data
types fileld in"). My original goal was [timestamp,timestamp) intervals
(or (t,t) or [t,t] or whatever) but it works with any scalar that's
internally numeric. Someone else might as well benefit from the
frustrations I've had in figuring out how to handle operations on half-
and fully-open empty intervals. :)

Thanks,

-- Bill

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message William Reese 2004-03-31 17:49:02 Problem with foreign keys and locking
Previous Message Diogo Biazus 2004-03-31 17:33:07 Re: Wich hardware suits best for large full-text indexed

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-03-31 17:55:40 Re: Question about rtrees (overleft replacing left in nodes)
Previous Message William White 2004-03-31 17:29:39 Re: Question about rtrees (overleft replacing left in nodes)