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.