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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-bugs by date

  From Date Subject
Next Message Kevin Grittner 2009-07-31 21:08:13 Re: BUG #4960: Unexpected timestamp rounding
Previous Message Matthias 2009-07-31 19:39:23 BUG #4960: Unexpected timestamp rounding