"Neil Davis" <npdavis@hotmail.com> writes:
> I am trying to figure out how to return more than one field using "SETOF".
> I can concatenate the fields in the select statement down to one and
> use SETOF Text to return them, then split them back apart in my
> code.
SETOF is not for returning multiple columns, it is for returning
multiple *rows*. I don't think that's what you want here.
Returning multiple columns requires a tuple (structure) return datatype.
Unfortunately that's not supported all that well right now. Check the
pgsql archives for my message about functions returning tuples, from a
few days back.
regards, tom lane