Re: Any function for calculating inersect of intervals? - Mailing list pgsql-general

From Tom Lane
Subject Re: Any function for calculating inersect of intervals?
Date
Msg-id 2547.1105979847@sss.pgh.pa.us
Whole thread Raw
In response to Any function for calculating inersect of intervals?  (Együd Csaba <csegyud@vnet.hu>)
Responses Re: Any function for calculating inersect of intervals?  (Együd Csaba <csegyud@vnet.hu>)
List pgsql-general
=?iso-8859-2?Q?Egy=FCd_Csaba?= <csegyud@vnet.hu> writes:
> E.g. I have four dates (D1, D2, D3, D4) and I want to know if (D1,D2)
> intersects (D3,D4) or not.

See the OVERLAPS operator:
    ( start1, end1 ) OVERLAPS ( start2, end2 )
http://developer.postgresql.org/docs/postgres/functions-datetime.html

            regards, tom lane

pgsql-general by date:

Previous
From: Együd Csaba
Date:
Subject: Any function for calculating inersect of intervals?
Next
From: Alban Hertroys
Date:
Subject: Re: Any function for calculating inersect of intervals?