Bug #622: jdbc driver exception: failed to get datetime field from a table

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема Bug #622: jdbc driver exception: failed to get datetime field from a table
Дата
Msg-id 20020318171809.CBAC8479251@postgresql.org
обсуждение исходный текст
Список pgsql-bugs
Zhou Hui Qing (suzi9999@yeah.net) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
jdbc driver exception: failed to get datetime field from a table

Long Description
platform: SuSE 7.3 , Win2000 Server + cygwin !

When I using the example 'psql' (java example.psql jdbc:postgresql:mydb postgres postgres) to retrive data from the
table'test' (select * from test) , I got an exception:
 

java.lang.StringIndexOutOfBoundsException: String index out of range: 23
java.lang.StringIndexOutOfBoundsException: String index out of range: 23
        at java.lang.String.charAt(String.java:455)
        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)

Sample Code
java example.psql jdbc:postgresql:mydb postgres postgres

create table test(id serial primary key , name varchar(20) , dt datetime default now() );

insert into test (name) values ('my name');

select * from test;

--got an error!


No file was uploaded with this report

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Darcy Buskermolen
Дата:
Сообщение: Re: Bug #621: why postgreSQL stored databases in
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: psql's \r does not reset parenthesis depth counter