| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера