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

From Andrus
Subject Re: Why overlaps is not working
Date
Msg-id 003a01c705d1$70bfa4e0$6207eb50@acer
Whole thread Raw
In response to Re: Why overlaps is not working  (Richard Broersma Jr <rabroersma@yahoo.com>)
List pgsql-general
> I am not sure if this would work for you, but instead of using NULL to
> represent infinity, why not
> use 'infinity' to represent infinity?

Infinity dehaves differenty than ordinal dates and nulls.
If both b and d are infinity then comparison fails:

select timestamp 'infinity':: date<=timestamp 'infinity':: date

returns null.

So infinity introduces third kind of FUD in addition to usual date and
null comparisons. NULLs in SQL are disaster. With infinity  SQL is double
disaster.

In samples I used DATE  '999993112' but this is incorrect.
I must use maximum allowed date or max_timestamp casted to date.
Is it reasonable to use it ?
 I hope that  MAX_DATE <= MAX_DATE returns true.
Which is the value of MAX_DATE is Postgres ?

Andrus.


pgsql-general by date:

Previous
From: "Andrus"
Date:
Subject: Re: Why overlaps is not working
Next
From: novnov
Date:
Subject: Speed of postgres compared to ms sql, is this article/comment off?