BUG #4960: Unexpected timestamp rounding

From: "Matthias" <matthias(dot)cesna(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4960: Unexpected timestamp rounding
Date: 2009-07-31 19:39:23
Message-ID: 200907311939.n6VJdNiY068065@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 4960
Logged by: Matthias
Email address: matthias(dot)cesna(at)gmail(dot)com
PostgreSQL version: 8.3.7
Operating system: Windows XP
Description: Unexpected timestamp rounding
Details:

Dear developers,

I noticed an unusual (and from my point of view inconsistent) rounding of a
timestamp:

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. However
passing such a value in an SQL will lead it to be rounded up:

DDB02=# select timestamp '9999-12-31 23:59:59.999999';
timestamp
----------------------
10000-01-01 00:00:00
(1 row)

This is not logical to me since 23:59:59.999999 would be a valid value or?
This also happens during the insert into a table and as such modifies my
intention and the data.

Doing the same with the year 2000 does not give me any rounding:

DDB02=# select timestamp '2000-12-31 23:59:59.999999';
timestamp
----------------------------
2000-12-31 23:59:59.999999

Thank you for having a look at the issue & sincerely thank you for such a
great database!

Regards,
Matthias

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kevin Grittner 2009-07-31 21:00:06 Re: BUG #4960: Unexpected timestamp rounding
Previous Message Tom Lane 2009-07-31 17:28:21 Re: Inconsistent query results after upgrading to Postgresql 8.4.0