| From: | Ryouichi Matsuda <r-matuda(at)sra(dot)co(dot)jp> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Cc: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | Failure in timestamptz of JDBC of 7.2b4 |
| Date: | 2001-12-25 08:19:39 |
| Message-ID: | 20011225171301.246A.R-MATUDA@sra.co.jp |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-jdbc |
I found a failure in a JDBC driver of 7.2b4.
(1) It does not support timestamptz type
(2) Exception occurs by timestamp without time zone type
I attach a patch correcting the first failure.
You can confirm it in example.psql as follows:
---------------------------------------------------------------------
$ java -cp postgresql-examples.jar:postgresql.jar example.psql jdbc:postgresql:r-matuda r-matuda pass
PostgreSQL psql example v6.3 rev 1
Connecting to Database URL = jdbc:postgresql:r-matuda
Connected to PostgreSQL 7.2b4
[1] select 'now'::timestamp;
timestamptz
No class found for timestamptz.
[1] [1] select 'now'::timestamp with time zone;
timestamptz
No class found for timestamptz.
[1] [1] select 'now'::timestamp without time zone;
timestamp
Exception caught.
java.lang.StringIndexOutOfBoundsException: String index out of range: 26
java.lang.StringIndexOutOfBoundsException: String index out of range: 26
at java.lang.String.charAt(String.java:516)
at org.postgresql.jdbc2.ResultSet.toTimestamp(ResultSet.java:1653)
at org.postgresql.jdbc2.ResultSet.getTimestamp(ResultSet.java:398)
at org.postgresql.jdbc2.ResultSet.getObject(ResultSet.java:768)
at example.psql.displayResult(psql.java:137)
at example.psql.processLine(psql.java:96)
at example.psql.<init>(psql.java:62)
at example.psql.main(psql.java:227)
| Attachment | Content-Type | Size |
|---|---|---|
| Connection.java.diff | application/octet-stream | 2.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2001-12-25 20:29:25 | Re: Thoughts on the location of configuration files |
| Previous Message | Serguei Mokhov | 2001-12-24 23:52:29 | [OT] Merry Xmas! |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Paulo J. Matos aka PDestroy | 2001-12-25 18:03:48 | Building --with-java |
| Previous Message | Dave Cramer | 2001-12-24 12:15:31 | Re: |