From: | "Dave Cramer" <dave(at)fastcrypt(dot)com> |
---|---|
To: | "Holger Klawitter" <holger(at)klawitter(dot)de>, <pgsql-general(at)postgreSQL(dot)org> |
Subject: | Re: bug?: java won't read timestamps |
Date: | 2001-06-06 18:31:09 |
Message-ID: | 03cb01c0eeb6$db61c450$0302a8c0@INSPIRON |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Which version of the driver are you using? This has historically been a
problem
The relevant code is in java.sql
Dave
----- Original Message -----
From: "Holger Klawitter" <holger(at)klawitter(dot)de>
To: <pgsql-general(at)postgreSQL(dot)org>
Sent: Wednesday, June 06, 2001 12:24 PM
Subject: [GENERAL] bug?: java won't read timestamps
> Hi there,
>
> I have a table containing "timestamp with time zone" and I observed
> a strange problem:
>
> THE ENVIRONMENT:
> Linux 2.4.0
> Postgres 7.1.2
> JDK 1.3.1 (same with JDK 1.3.0)
> postgresql.jar from $PGHOME/share/java
>
> THE TABLE:
> Table "hits"
> Attribute | Type | Modifier
> --------------+--------------------------+----------
> id | integer |
> zeit | timestamp with time zone |
>
> THE PROGRAM:
>
> stmt = toDB.createStatement();
> ResultSet rs = stmt.executeQuery( "SELECT max(zeit) FROM hits" );
> rs.next();
> ts = rs.getTimestamp(1); // <-- breaks here
> stmt.close();
>
> THE ERROR:
>
> Bad Timestamp Format at 19 in 2001-03-05 17:17:13.24+01
>
> The second fraction seems not to be supported by the jdbc timestamp
> reader. BTW: there is no format specifier for them as well (at least
> in the docs).
>
> I am helping myself by forcing a different output
> to_char(max(zeit),"YYYY-MM-DD HH24:MI:SS+01")
> Is there a better solution?
>
> (Is the relevant code in java.sql or is it in org.postgresql?)
>
> With kind regards / Mit freundlichem Gruß
> Holger Klawitter
> --
> Holger Klawitter
> holger(at)klawitter(dot)de http://www.klawitter.de
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | John Scott | 2001-06-06 18:45:08 | Re: [SQL] maximum number of rows in table - what about oid limits? |
Previous Message | Reinoud van Leeuwen | 2001-06-06 18:22:07 | Re: What CASE tools and clients for Postgres? |