Re: How does one return rows from plpgsql functions?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ryan Kirkpatrick <pgsql(at)rkirkpat(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How does one return rows from plpgsql functions?
Date: 2002-01-21 17:21:07
Message-ID: 9895.1011633667@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ryan Kirkpatrick <pgsql(at)rkirkpat(dot)net> writes:
> So, how do I get back and access the entire row returned from a
> function without calling it multiple times?

You don't. The syntax just doesn't support it, and no I don't want to
put in common-subexpression recognition.

We have talked about functions as table sources:

SELECT t.col1, t.col2 FROM myfunction(yaddayadda) AS t;

in which presumably the function would only be invoked once (per row?).
Alex Pilosov was working on this, IIRC, but I dunno when it will be done.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-01-21 17:23:37 Re: [HACKERS] PostgreSQL Licence: GNU/GPL
Previous Message Vince Vielhaber 2002-01-21 17:16:40 Re: [HACKERS] PostgreSQL Licence: GNU/GPL