<br /><p><font size="2">Hello,<br /><br /> Your proposal unfortunately does not work if you try to query more than one
valueand want additional columns in the results,<br /> like in<br /><br /> select column1,test(column1) FROM
(values(1),(2))foo<br /><br /> cheers,<br /><br /> Marc Mamin<br /><br /><br /> >IMO easiest would be to include a
RETURNSSETOF record in the<br /> >function declaration and a return next; statement in the function<br />
>body.E.g.<br /> ><br /> ><br /> >CREATE OR REPLACE FUNCTION test (In a int, OUT b int, OUT c int)<br />
>RETURNSSETOF record<br /> >AS<br /> >$BODY$<br /> >BEGIN<br /> > b:=a+1;<br /> > c:=a+2;<br />
> return next;<br /> >END<br /> >$BODY$<br /> > LANGUAGE 'plpgsql'<br /> ><br /> >and then
issue<br/> ><br /> >SELECT * FROM test(1);<br /><br /></font>