Gregory Stark <[EMAIL PROTECTED]> writes:
> You're almost there:

> CREATE FUNCTION getfoo (IN int, OUT int, OUT int) returns setof 
> record(int,int) AS $$
>   SELECT fooid, foosubid FROM foo WHERE fooid = $1;
> $$ LANGUAGE SQL;

Not quite --- it's just "returns setof record".  The output column types
are defined by the OUT parameters.  The only reason you need the returns
clause is to have a place to stick the "setof" specification ...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to