Re: Selects in server side functions - Mailing list pgsql-general

From Tom Lane
Subject Re: Selects in server side functions
Date
Msg-id 6275.972700950@sss.pgh.pa.us
Whole thread Raw
In response to Selects in server side functions  ("Neil Davis" <npdavis@hotmail.com>)
List pgsql-general
"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

pgsql-general by date:

Previous
From: "elein"
Date:
Subject: FW: Another array question: Join on array elements
Next
From: "Nguyen , Nguyen"
Date:
Subject: a simple trigger?