Обсуждение: callable statement return boolean --> ERROR

Поиск
Список
Период
Сортировка

callable statement return boolean --> ERROR

От
Pedro Salazar
Дата:
Greetings,

I created a function in pgsql that returns a boolean. In JDBC I register the
return variable to java.sql.Types.BOOLEAN. However, when I execute my
function I got the following error:

A CallableStatement Function was executed and the return was of type
(java.sql.Types=-7) however type=java.sql.Types=16 was registered.
        at
org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.j
ava:332)
        at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.j
ava:48)

Is boolean type values supported by JDBC Postgresql driver?

P.S.- a workaround is use 0/1, but I'm wondering if boolean is supported in
JDBC... (7.3.2)

thanks,
Pedro Salazar.