Re: Ranges for well-ordered types - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: Ranges for well-ordered types
Date
Msg-id 20060611015746.GB83625@pervasive.com
Whole thread Raw
In response to Re: Ranges for well-ordered types  (Michael Glaesemann <grzm@seespotcode.net>)
Responses Re: Ranges for well-ordered types  (Michael Glaesemann <grzm@seespotcode.net>)
List pgsql-hackers
On Sun, Jun 11, 2006 at 10:18:11AM +0900, Michael Glaesemann wrote:
> 
> On Jun 11, 2006, at 5:15 , Bruno Wolff III wrote:
> 
> >I think you might want to reconsider your design. It works well for  
> >dates
> >because sets of dates are made of of isolated points and such sets are
> >both open and closed. If you are using time, I think it will be  
> >more convenient
> >to use a closed, open representation.
> 
> Under design I proposed, closed-closed and closed-open are just two  
> different representations of the same range: to the commonly used  
> notation, the closed-open range [p1, p2) is equivalent to  the closed- 
> closed range [p1, next(p2)], where next() is the successor function.  
Why try messing aronud with a successor function when you can just use <
instead of <= ?
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),
Next
From: "Andrew Dunstan"
Date:
Subject: Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),