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-12 21:39:09
Message-ID: 00e501c706a3$7670ac40$4814eb50@acer
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>> > apparently date doesn't know anything about infinity. However, from
>> > what
>> > I've read in my "SQL for
>> > smarties" book regarding temporial database design, unknown future
>> > dates
>> > were stored as:
>> > '9999-12-31'
>> >
>> > Would this help, since any enddate with this value would be be
>> > enterpreted
>> > as an enddate that has
>> > not yet occured? when you arrive at the date for records effective
>> > period
>> > to close just update
>> > the enddate to the today's date.
>>
>> select date '10000-1-1'< date '99991231'
>> return false.
>> If my database contains dates greater than DATE '9999-12-31' then this
>> check fails.
>> This is why I'm searching for a real MAX_DATE value in Postgres.
>> It would be nice if there will be MAX_DATE constant in Postgres or some
>> one
>> row system table contains MAX_DATE value.
>
> That is very interesting, but would you really expect to record dates
> greater than the year 9999?

Some programmer who did'nt read the book you mentioned but some other sql
book may use
date '10001-1-1' for marking infinity.
So this will break by code.

Andrus.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message novnov 2006-11-12 22:21:10 Re: Table and Field namestyle best practices?
Previous Message Luca Ferrari 2006-11-12 21:15:33 kubuntu & pgadmin