From: | Együd Csaba (Freemail) <csegyud(at)freemail(dot)hu> |
---|---|
To: | 'Alban Hertroys' <alban(at)magproductions(dot)nl>, 'Együd Csaba' <csegyud(at)vnet(dot)hu> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Any function for calculating inersect of intervals? |
Date: | 2005-01-17 17:02:08 |
Message-ID: | 0IAH006LU0UKT5@mail.vnet.hu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thak you Alban, Tom's solution (OVERLAPS) is the best for me.
bye,
-- Csaba
-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Alban Hertroys
Sent: Monday, January 17, 2005 5:49 PM
To: Együd Csaba
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Any function for calculating inersect of intervals?
Együd Csaba wrote:
> Hi,
> wondering if exists any functions which aim to calculate intersect of
> two intervals.
> E.g. I have four dates (D1, D2, D3, D4) and I want to know if (D1,D2)
> intersects (D3,D4) or not.
Try INTERSECTS :P
SELECT * FROM table WHERE (D1, D2) INTERSECTS (D3, D4);
Related, are there any operators/functions to test for adjacency (start of
one is end of other), inclusion (interval is inside other interval) or
wrapping (the inverse; interval is around other interval) of intervals?
Alban.
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.13 - Release Date: 2005.01.16.
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.13 - Release Date: 2005.01.16.
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.13 - Release Date: 2005.01.16.
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.13 - Release Date: 2005.01.16.
From | Date | Subject | |
---|---|---|---|
Next Message | Jasper Potts | 2005-01-17 18:03:53 | Re: Problem with win32 installer for PG 8.0 |
Previous Message | Együd Csaba | 2005-01-17 17:00:20 | Re: Any function for calculating inersect of intervals? |