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

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: (view raw, whole thread or download thread mbox)
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

Dear developers,

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

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';
 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';
 2000-12-31 23:59:59.999999

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



pgsql-bugs by date

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

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