Re: Ranges for well-ordered types

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Michael Glaesemann <grzm(at)seespotcode(dot)net>
Cc: Bruno Wolff III <bruno(at)wolff(dot)to>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Ranges for well-ordered types
Date: 2006-06-11 01:57:47
Message-ID: 20060611015746.GB83625@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2006-06-11 03:20:15 Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),
Previous Message Jim C. Nasby 2006-06-11 01:47:52 Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),