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

pgsql-server: I think I've finally identified the cause of the

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql-server: I think I've finally identified the cause of the
Date: 2004-05-31 18:32:23
Message-ID: 20040531183223.85AC1D1B189@svr1.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
I think I've finally identified the cause of the off-by-one-second
issue in timestamp conversion that we hacked around for so long by
ignoring the seconds field from localtime().  It's simple: you have
to watch out for platform-specific roundoff error when reducing a
possibly-fractional timestamp to integral time_t form.  In particular
we should subtract off the already-determined fractional fsec field.
This should be enough to get an exact answer with int64 timestamps;
with float timestamps, throw in a rint() call just to be sure.

Tags:
----
REL7_4_STABLE

Modified Files:
--------------
    pgsql-server/src/backend/utils/adt:
        timestamp.c (r1.96 -> r1.96.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/adt/timestamp.c.diff?r1=1.96&r2=1.96.2.1)

pgsql-committers by date

Next:From: Tom LaneDate: 2004-05-31 18:42:41
Subject: pgsql-server: Too few parens for my taste in this macro.
Previous:From: Tom LaneDate: 2004-05-31 18:31:51
Subject: pgsql-server: I think I've finally identified the cause of the

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