Search Postgresql Archives

Re: how to test my stored procedures?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux