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

From Bruno Wolff III
Subject Re: Ranges for well-ordered types
Date
Msg-id 20060610201521.GA8916@wolff.to
Whole thread Raw
In response to 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 Sat, Jun 10, 2006 at 23:51:58 +0900, Michael Glaesemann <grzm@seespotcode.net> wrote:
> Each row of this table represents the time range (from from_date to  
> to_date) during which a teacher was assigned to a particular school.  
> (Teachers can be assigned to more than one school at a time.) The  
> check constraint guarantees that [from_date, to_date] represents a  
> valid closed-closed interval (where the end points are included in  
> the range). Two unique constraints are necessary to guarantee  

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.


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: bison version
Next
From: "Joshua D. Drake"
Date:
Subject: Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),