Re: Why overlaps is not working

From: "Andrus" <eetasoft(at)online(dot)ee>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Why overlaps is not working
Date: 2006-11-13 11:41:19
Message-ID: 031601c70718$ae4f2360$2300b3a8@Andrus
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I thought the suggested solution was to use infinity, hence the
> requirement to cast to timestamps.
> That'd mean something along the lines of:
>
> where (a::timestamp, coalesce(b, 'infinity')::timestamp) overlaps
> (c::timestamp, coalesce(d, 'infinity')::timestamp)

select (date'20060101'::timestamp, coalesce(date'20060102'::timestamp, 'infinity')) overlaps
(date'20060102', coalesce(date'20060103'::timestamp, 'infinity'))

returns false but since date'20060102' is overlapping it must return true.
So it seems that it is not possible to use timestamps and infinity.

Andrus.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2006-11-13 12:04:25 Re: Why overlaps is not working
Previous Message Albe Laurenz 2006-11-13 09:17:54 Re: encoding advice requested