Re: Question about rtrees (overleft replacing left in nodes) - Mailing list pgsql-general

From Tom Lane
Subject Re: Question about rtrees (overleft replacing left in nodes)
Date
Msg-id 4538.1080745058@sss.pgh.pa.us
Whole thread Raw
In response to Question about rtrees (overleft replacing left in nodes)  ("bwhite" <bwhite@frognet.net>)
Responses Re: Question about rtrees (overleft replacing left in nodes)
Re: Question about rtrees (overleft replacing left in nodes)
List pgsql-general
"bwhite" <bwhite@frognet.net> writes:
> I'm rather confused about the logic of something in the rtree code, perhaps
> someone can provide some insight here.

Hmm ... given the comments in rtstrat.c it seems clear that "overleft"
has to mean "overlaps or is to left of", which means that this
definition is wrong:

> S &< T iff sup(S) <= sup(T)

It'd need to be

S &< T iff inf(S) <= sup(T)

to satisfy the geometrical intuition.  (You could quibble about the
equality case, but box_overlap seems to consider touching boxes to
overlap, so for consistency this should too.)

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?

            regards, tom lane

pgsql-general by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: Wich hardware suits best for large full-text indexed
Next
From: Tom Lane
Date:
Subject: Re: Question about rtrees (overleft replacing left in nodes)