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

From Richard Huxton
Subject Re: Why overlaps is not working
Date
Msg-id 4555F061.4030307@archonet.com
Whole thread Raw
In response to Re: Why overlaps is not working  ("Andrus" <eetasoft@online.ee>)
List pgsql-general
Andrus wrote:
>> CREATE OR REPLACE FUNCTION f_v_same_day_overlaps(date,
>>       date, date, date, out overlaps bool) as
>> $_$
>> SELECT (($3 between $1 and $2) or ($4 between $1 and $2));
>> $_$ language sql;
>
> Thank you.
> In my application second and fourth parameters can be NULL which means
> forever.

No it doesn't. NULL means "unknown". You're just using it to represent
"forever".

There is a value "infinity" for timestamps, but unfortunately not for
dates. Otherwise, I'd suggest that you use that instead.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Jorge Godoy
Date:
Subject: Re: Why overlaps is not working
Next
From: Richard Broersma Jr
Date:
Subject: Re: Why overlaps is not working