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:00:06
Message-ID: 4A7315060200002500029269@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-bugs
"Matthias" <matthias(dot)cesna(at)gmail(dot)com> wrote:
 
> I noticed an unusual (and from my point of view inconsistent)
> rounding of a timestamp:
 
What do you get when you run?:
 
show integer_datetimes;
 
If it is off, which is probably the default for your distribution
under 8.3.X, timestamps are floating point (approximate) values which
get less precise as you move away from the base timestamp of
'2000-01-01 00:00'.
 
The default under 8.4 is to use integer timestamps, which have a
microsecond precision across the range they support.  (That range is
not as broad as the floating point format, but plenty large for most
practical uses.)
 
You can configure PostgreSQL to use integer timestamps in 8.3 if you
build from source, but you will need to convert your database.
 
-Kevin

In response to

Responses

pgsql-bugs by date

Next:From: Kevin GrittnerDate: 2009-07-31 21:08:13
Subject: Re: BUG #4960: Unexpected timestamp rounding
Previous:From: MatthiasDate: 2009-07-31 19:39:23
Subject: BUG #4960: Unexpected timestamp rounding

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