Arguments not being passed to a function

Поиск
Список
Период
Сортировка
От Barry Lind
Тема Arguments not being passed to a function
Дата
Msg-id 3930E8E0.801AB4A7@xythos.com
обсуждение исходный текст
Ответы Re: Arguments not being passed to a function  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I am trying to call PL/pgSQL functions from JDBC via the Fastpath
interface.  The function is executing but none of the arguments to the
function are getting set.

here is a simple example:

create function testcall (int4) returns int4 as '
begin
  return $1;
end;
' language 'plpgsql';

In java I call it via:

FastpathArg args[] = new FastpathArg[1];
args[0] = new FastpathArg(55555);
Integer l_return = (Integer)fp.fastpath("testcall", true, args);

The result is always zero.  I know that the function is executing
because if I change it to do an insert the insert happens (but if I use
a parameter in the insert, i.e. $1, it is always null).

However if I run the function from a select, (ie. select
testcall(55555); ) it works correctly.

Can anyone shed some light on this?

thanks,
--Barry

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

Предыдущее
От: "planx plnetx"
Дата:
Сообщение: PostgreSQL7.0 bug? "make install" doesN'T run at all
Следующее
От: Tim
Дата:
Сообщение: cvsup tag & pgacctng in cvsup file?