Re: [SQL] How to check date-interval constraints

2006-03-02 Thread Michael Glaesemann
On Mar 3, 2006, at 14:13 , Michael Fuhr wrote: On Fri, Mar 03, 2006 at 04:28:01AM +0100, Andreas wrote: How can I have a constraint, that prohibits nesting or overlapping intervals? 172006-1-1 2006-1-31 292006-2-1 2006-2-28 OK 352006-1-10 2006-1

Re: [SQL] How to check date-interval constraints

2006-03-02 Thread Michael Fuhr
On Fri, Mar 03, 2006 at 04:28:01AM +0100, Andreas wrote: > How can I have a constraint, that prohibits nesting or overlapping > intervals? > > 172006-1-1 2006-1-31 > 292006-2-1 2006-2-28 OK > 352006-1-10 2006-1-20 BAD lies within line

[SQL] How to check date-interval constraints

2006-03-02 Thread Andreas
Hi, I'd like to have a table that looks like this: my_option ( id serial primary key, myvalue double, valid_start timestamp, valid_stop timestamp ); I want to store values that are only valid in a given start-stop-interval so I could find a date-specific value for