Re: Timestamp Question

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: "Dario V(dot) Fassi" <software(at)sistemat(dot)com(dot)ar>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Timestamp Question
Date: 2004-07-12 00:50:00
Message-ID: 40F1E038.20609@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Dario V. Fassi wrote:

> You are seeing it:
>
> > test=> select '2004-07-10 12:59:59.123'::timestamp(6);
> > timestamp -------------------------
> > 2004-07-10 12:59:59.123
>
> I suggest that is cross DBs (eg. DB2 / PgSql etc) , the above
> situation cause troubles.

Sounds like it's not a JDBC problem though -- perhaps you should take it
up on pgsql-general or pgsql-sql?

> ** From a Jdbc client can see rows like:
> 2004-07-10 12:59:59.123
>
> in plase of:
>
> 2004-07-10 12:59:59.12300
> or
> 2004-07-10 12:59:59.00123

If you're using JDBC, you should be using ResultSet.getTimestamp(), not
interpreting the strings directly. Do you have a testcase that uses
getTimestamp() and sees an incorrect value?

-O

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2004-07-12 01:54:07 Re: JDBC Connection
Previous Message Dario V. Fassi 2004-07-12 00:47:29 Re: Timestamp Question