From: Tom Lane <tgl@sss.pgh.pa.us>
To: mikael-aronsson <mikael-aronsson@telia.com>
Cc: Boris Kirzner <borisk@mainsoft.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Bug in storing Timestamp
Date: Mon, 11 Apr 2005 11:07:27 -0400
Message-ID: <29958.1113232047@sss.pgh.pa.us> (raw)
In-Reply-To: <008901c53ea6$d955f6b0$8ba7e551@w128mtec>
References: <425A701C.6070608@mainsoft.com>
<008901c53ea6$d955f6b0$8ba7e551@w128mtec>
"mikael-aronsson" <mikael-aronsson@telia.com> writes:
> I have never had any problems with timestamps, if I remember correct the
> resolution gets worse when you get far away from 1900 or so, is it possible
> that using year 0001 gives that bad resolution maybe ?
Good thought, but no; the error at 0001 is still down around the sixth
decimal place:
regression=# select '0001-01-01 02:02:02.123456'::timestamp;
timestamp
----------------------------
0001-01-01 02:02:02.123459
(1 row)
I was wondering about the fact that he was storing into a time column
rather than a timestamp. That works if the conversion is done on the
server, modulo the sixth decimal place again:
regression=# select '0001-01-01 02:02:02.123456'::timestamp::time;
time
-----------------
02:02:02.123459
(1 row)
but maybe it's confusing the JDBC driver into doing the wrong thing
entirely.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: tgl@sss.pgh.pa.us, mikael-aronsson@telia.com, borisk@mainsoft.com
Subject: Re: Bug in storing Timestamp
In-Reply-To: <29958.1113232047@sss.pgh.pa.us>
References: <425A701C.6070608@mainsoft.com> <008901c53ea6$d955f6b0$8ba7e551@w128mtec> <29958.1113232047@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox