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

Re: BUG #4960: Unexpected timestamp rounding

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "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:08:13
Message-ID: 4A7316ED020000250002926E@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-bugs
"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.  In particular, expiration or end
dates which will probably eventually be fixed, but haven't been yet,
are more appropriately NULL.  It isn't that there won't be one; it
just isn't known yet -- which fits the semantics of NULL very well.
 
-Kevin

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2009-07-31 21:12:05
Subject: Re: BUG #4960: Unexpected timestamp rounding
Previous:From: Kevin GrittnerDate: 2009-07-31 21:00:06
Subject: Re: BUG #4960: Unexpected timestamp rounding

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