Re: Return Value of a Function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Terry Lee Tucker <terry(at)esc1(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Return Value of a Function
Date: 2004-02-02 16:58:09
Message-ID: 11059.1075741089@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Richard Huxton <dev(at)archonet(dot)com> writes:
> You could return a SETOF myrowtype where the set contains only one row -
> that's probably what you're after. Then you can do things like:

> SELECT * FROM set_returning_function(1,'a');

You're confusing SETOF with returning a composite type --- actually they
are orthogonal features that can be used separately. Obviously the docs
could stand to be improved in this area :-(

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2004-02-02 17:32:06 Re: About Privileges
Previous Message Terry Lee Tucker 2004-02-02 16:53:39 Re: Return Value of a Function