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

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

"bwhite" <bwhite(at)frognet(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-03-31 15:05:32 Re: Question about rtrees (overleft replacing left in nodes)
Previous Message Peter Eisentraut 2004-03-31 12:33:50 Re: Some Documentation Changes

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-03-31 15:05:32 Re: Question about rtrees (overleft replacing left in nodes)
Previous Message Peter Eisentraut 2004-03-31 12:33:50 Re: Some Documentation Changes