| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Neil Davis" <npdavis(at)hotmail(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Selects in server side functions |
| Date: | 2000-10-28 02:42:30 |
| Message-ID: | 6275.972700950@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
"Neil Davis" <npdavis(at)hotmail(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alex Pilosov | 2000-10-28 03:36:58 | Re: Selects in server side functions |
| Previous Message | elein | 2000-10-28 02:02:09 | FW: Another array question: Join on array elements |