Re: postgresql and java data types mismatch.....

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: postgresql and java data types mismatch.....
Дата
Msg-id 42FB537E.4070005@opencloud.com
обсуждение исходный текст
Ответ на postgresql and java data types mismatch.....  (Andres Ledesma <aledes@euskalnet.net>)
Ответы Re: postgresql and java data types mismatch.....  (Andres Ledesma <aledes@euskalnet.net>)
Re: postgresql and java data types mismatch.....  (Kris Jurka <books@ejurka.com>)
Список pgsql-jdbc
Andres Ledesma wrote:

> According to documentation, java.sql.Types.BOOLEAN is the equivalence of SQL
> BOOLEAN, but a function returning a boolean, returns something matched to
> Types.BIT in java.  It happens in the following code.

Types.BIT and Types.BOOLEAN are, as far as I can tell from the JDBC
spec, intended to be interchangeable.

> A CallableStatement Function was executed and the return was of type
> (java.sql.Types=-7) however type=java.sql.Types=16 was registered.
>
> Types = -7 correspond to Types.BIT
> Types = 16 correspond to Types.BOOLEAN

A workaround is to just register the OUT parameter as Types.BIT, but
yes, the driver shouldn't really complain in this case.

You didn't say which driver version you were using..

-O

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

Предыдущее
От: Andres Ledesma
Дата:
Сообщение: postgresql and java data types mismatch.....
Следующее
От: Andres Ledesma
Дата:
Сообщение: Re: postgresql and java data types mismatch.....