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

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: (view raw, whole thread or download thread mbox)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group