Re: BUG #4960: Unexpected timestamp rounding

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: "Matthias" <matthias(dot)cesna(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4960: Unexpected timestamp rounding
Date: 2009-07-31 21:12:05
Message-ID: 14785.1249074725@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> "Matthias" <matthias(dot)cesna(at)gmail(dot)com> wrote:
>> It is about when using a upper-boundary timestamp. The value of
>> 9999-12-31 23:59:59.999999 is sometimes used to indicate an infinite
>> validity.

> One other thought -- using a "magic value" for something like this is
> usually a bad idea. NULL indicates the absence of a value, and means
> "unknown or not applicable". I generally use that for an upper bound
> when there is no valid upper bound.

Also, if you really want to convey the idea of "infinity" rather than
"unknown", the timestamp types do have special values 'infinity'
and '-infinity', which are likewise far preferable to choosing magic
regular values.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2009-07-31 23:49:02 Re: BUG #4958: Stats collector hung on WaitForMultipleObjectsEx while attempting to recv a datagram
Previous Message Kevin Grittner 2009-07-31 21:08:13 Re: BUG #4960: Unexpected timestamp rounding