Re: Why overlaps is not working - Mailing list pgsql-general

From Andrus
Subject Re: Why overlaps is not working
Date
Msg-id 031601c70718$ae4f2360$2300b3a8@Andrus
Whole thread Raw
In response to Re: Why overlaps is not working  (Richard Broersma Jr <rabroersma@yahoo.com>)
Responses Re: Why overlaps is not working  (Alban Hertroys <alban@magproductions.nl>)
List 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.

pgsql-general by date:

Previous
From: "Rodrigo Sakai"
Date:
Subject: Inserting data in composite types
Next
From: Alban Hertroys
Date:
Subject: Re: Why overlaps is not working