| From: | Alexander Litvinov <lan(at)ac-sw(dot)com> |
|---|---|
| To: | pgsql-patches(at)postgresql(dot)org |
| Subject: | patch for ResultSet.java |
| Date: | 2002-04-19 06:56:36 |
| Message-ID: | 200204190656.g3J6ubt01688@gw.ac-sw.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc pgsql-patches |
If I try to fetch timestamp using rs,getTimestamp("name") I got:
java.lang.StringIndexOutOfBoundsException: String index out of range: 22
at java.lang.String.charAt(String.java(Compiled Code))
at org.postgresql.jdbc2.ResultSet.toTimestamp(ResultSet.java:1653)
at org.postgresql.jdbc2.ResultSet.getTimestamp(ResultSet.java:398)
at org.postgresql.jdbc2.ResultSet.getTimestamp(ResultSet.java:617)
Later I tried to do rs.getString("name") I got: "1903-12-29 18:00:12.68"
Using PostgreSQL v7.1.3 (JDBC from 7.2.1)
I have added some bounds check to ResultSet.java. See attached patch.
| Attachment | Content-Type | Size |
|---|---|---|
| ResultSet.patch | text/x-diff | 1.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Anders Bengtsson | 2002-04-19 12:39:03 | Re: BLOB performance test FYI |
| Previous Message | Anders Bengtsson | 2002-04-18 18:31:53 | Re: BLOB performance test FYI |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Olivier PRENANT | 2002-04-19 11:04:16 | Re: [HACKERS] build of 7.2.1 on SCO Openserver andUnixware |
| Previous Message | Christopher Kings-Lynne | 2002-04-19 05:04:50 | Re: Odd(?) RI-trigger behavior |