Error in rounding of timestamp

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Error in rounding of timestamp
Date: 2001-05-05 12:44:48
Message-ID: 200105051244.f45CimY28207@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Alexander Bodnar (bodnar(at)malva(dot)com(dot)ua) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Error in rounding of timestamp

Long Description
djs=# SELECT version();
version
-----------------------------------------------------------
PostgreSQL 7.1 on i686-pc-linux-gnu, compiled by GCC 2.96
(1 row)

INSERT INTO "ObjectLog1" VALUES (1, '2001-05-02 13:48:59.999', 0, 10, 1, 1, 9, 0, 0, 0, 0);

djs=# select "Date" from "ObjectLog1";
Date
---------------------------
2001-05-02 13:48:60.00+03
(1 row)

------------------->13:48:60.00 !!!!!!
It supposed to be 13:49:00.00

Also this bug leads to invalid result of backup-restore procedure.
Restore reports "Bad timestamp format"
Also this bug enforces ODBC error message.

djs=# select date_trunc('second', "Date"), date_part('milliseconds',
"Date")
from "ObjectLog1";
date_trunc | date_part
------------------------+------------------
2001-05-02 13:48:59+03 | 999.000000000002
(1 row)

Sample Code

No file was uploaded with this report

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2001-05-05 14:25:56 Re: Build fails for pl/tcl on OpenBSD
Previous Message Alexander Bodnar 2001-05-05 12:22:51 Error in rounding of timestamp