AW: stringtype=unspecified is null check problem

Поиск
Список
Период
Сортировка
От Martin Handsteiner
Тема AW: stringtype=unspecified is null check problem
Дата
Msg-id VI1PR1001MB1423CC078BC3A5D323F2D8D5E8C29@VI1PR1001MB1423.EURPRD10.PROD.OUTLOOK.COM
обсуждение исходный текст
Ответ на Re: stringtype=unspecified is null check problem  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-jdbc

 

> create or replace function callfunc(OUT val integer) returns integer as $$ select 1::integer; $$ > language sql;

> prepare cf (void) as select callfunc($1);

> execute cf('text');

 

I know, this test case is not about problems with calling functions with jdbc, but as we are still in jdbc mailing list:

 

A good test case for java would be a function with mixed in / out params, first in then out.

create or replace function callfunc(in val1 integer, in val2 integer, in out val3 integer, out val4 integer) returns void

 

The out values are mapped to the wrong indexes 1 and 2 because result from db is {1, 1} but jdbc throws exception, that 1 and 2 is not registered as out param…

 

So calling functions with out param from jdbc only works when out params are first.

 

We solved that by calling functions with

 

SELECT * FROM callfunc(?, ?, ?)

 

And mapping the result by our own to the correct indexes.


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

Предыдущее
От: Martin Handsteiner
Дата:
Сообщение: AW: stringtype=unspecified is null check problem
Следующее
От: Vladimir Sitnikov
Дата:
Сообщение: [pgjdbc/pgjdbc]