Arguments not being passed to a function - Mailing list pgsql-general

From Barry Lind
Subject Arguments not being passed to a function
Date
Msg-id 3930E8E0.801AB4A7@xythos.com
Whole thread Raw
Responses Re: Arguments not being passed to a function  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: "planx plnetx"
Date:
Subject: PostgreSQL7.0 bug? "make install" doesN'T run at all
Next
From: Tim
Date:
Subject: cvsup tag & pgacctng in cvsup file?