Re: Why overlaps is not working
От | Andrus |
---|---|
Тема | Re: Why overlaps is not working |
Дата | |
Msg-id | 003b01c705d1$71959280$6207eb50@acer обсуждение исходный текст |
Ответ на | Re: Why overlaps is not working (Matthias.Pitzl@izb.de) |
Ответы |
Re: Why overlaps is not working
|
Список | pgsql-general |
>> 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". My table represents employee absence starting and ending dates. If end day is not yet known, it is represented by NULL value. My query should threat unknown value as never ending absence to return estimated number of work days. Infinity date value is missing in SQL standard. I do'nt know any other good way to represent missing ending date. > There is a value "infinity" for timestamps, but unfortunately not for > dates. Otherwise, I'd suggest that you use that instead. I tried to use timestamp 'infinity':: date but this does not work if both b and d are infinity since select timestamp 'infinity':: date<=timestamp 'infinity':: date returns null. Andrus.
В списке pgsql-general по дате отправления: