Yavuz Kavus wrote:
hi everybody.

i am writing stored procedures.
lots of them have out parameters.

i dont know how to test them
from an sql query tool(ex: pgAdmin query tool).
i am trying to test them from my program, but it is not so efficient.

OUT parameters get returned as part of a record.

CREATE FUNCTION foo(a int4, OUT b int4, OUT c int4) AS $$
BEGIN
  b:=a+1;
  c:=a+2;
END; $$ LANGUAGE plpgsql;


richardh=# SELECT foo(9);
   foo
---------
 (10,11)

HTH
--
  Richard Huxton
  Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to