Clever way to check overlapping time intervals ?

From: Andreas <maps(dot)on(at)gmx(dot)net>
To: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Clever way to check overlapping time intervals ?
Date: 2011-09-15 23:40:07
Message-ID: 4E728CD7.9040505@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,
is there a clever way to check overlapping time intervals ?
An option named n should be taken from date y to y.
The same name is ok for another interval.

e.g. table : mytab ( d1 date, d2 date, n text, v text )

There should be a constraint to provide no row can have a d1 or d2
within the interval of another row in case they have the same n.

And no row can have an interval that encloses an existing interval.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Andreas Kretschmer 2011-09-16 00:15:47 Re: Clever way to check overlapping time intervals ?
Previous Message Nicoletta Maia 2011-09-14 17:24:48 Re: Window function sort order help