From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
---|---|
To: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Cc: | Alexander Korotkov <aekorotkov(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: GiST for range types (was Re: Range Types - typo + NULL string constructor) |
Date: | 2011-11-03 08:40:09 |
Message-ID: | 1320309609.32341.24.camel@jdavis |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 2011-11-02 at 21:29 +0200, Heikki Linnakangas wrote:
> > + else if (lower1.infinite || upper1.infinite)
> > + length1 = 1.0/0.0;
>
> That seems wrong. I take it that the point is to set length1 to infinity?
I reworked this in commit (on my private repo, of course):
6197fbffb00f729feba8082136801cdef5ac850e
For the archives, it's essentially taking the difference on the left
side of the range, and the difference on the right side of the range,
and adding them together. There are just a lot of special cases for
infinite boundaries, empty ranges, and the lack of a subtype_diff
function.
I think it's a little closer to what Alexander intended, which I think
is an improvement. It should now be able to recognize that expanding
[10,) into [0,) has a penalty of 10.
> PS. I note the docs still refer to subtype_float. I'll fix that before
> committing.
Thank you. The only change I found strange was the test that used \c to
reconnect; but I can't say that my solution was any better.
Regards,
Jeff Davis
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2011-11-03 08:42:29 | Re: GiST for range types (was Re: Range Types - typo + NULL string constructor) |
Previous Message | Heikki Linnakangas | 2011-11-03 08:37:00 | Re: Range Types - typo + NULL string constructor |