Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

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: Fri, 31 Jul 2009 17:12:05 -0400
  • Message-id: <14785.1249074725@sss.pgh.pa.us> <text/plain>

"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



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group