Arguments not being passed to a function

From: Barry Lind <barry(at)xythos(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Arguments not being passed to a function
Date: 2000-05-28 09:37:36
Message-ID: 3930E8E0.801AB4A7@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tim 2000-05-28 10:19:36 cvsup tag & pgacctng in cvsup file?
Previous Message Michael Blakeley 2000-05-27 21:27:17 group by week (ww), plus -S performance