Re: ResultSet internal data type handling

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: ResultSet internal data type handling
Дата
Msg-id 4A094AC8.4050100@opencloud.com
обсуждение исходный текст
Ответ на Re: ResultSet internal data type handling  (Luca Ferrari <fluca1978@infinito.it>)
Список pgsql-jdbc
Luca Ferrari wrote:

> It is not clear to me: the driver is receiving always strings from the server,
> and therefore must do the conversion by itself. The fact is that such
> conversion is not checked against the table definition. I would expect an
> SQLException if I try to read an integer as a string or viceversa. Instead the
> conversion can work and the driver says nothing about.

The JDBC spec says the driver does conversions depending on the
ResultSet getter method you use. See table B-6 in appendix B of the JDBC
spec. In this particular case, the table says you can getInt() on a
VARCHAR and getString() on an INTEGER.

-O

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

Предыдущее
От: Luca Ferrari
Дата:
Сообщение: Re: ResultSet internal data type handling
Следующее
От: John Lister
Дата:
Сообщение: Re: ResultSet internal data type handling