Tom Lane wrote:
Neil Conway <[EMAIL PROTECTED]> writes:
This works, but it seems overly verbose. It occurred to me that we could
easily add a new PL/PgSQL statement that evaluates a set-returning
expression and adds *all* the resulting rows to the function's result
set. For example:

I think we've got something isomorphic to that in the patch queue
already --- take a look at Pavel's "table function" patch.  It's in
need of cleanup but I think it will make it in.



Interesting - I haven't followed that one. In pl/perl the equivalent will use one tuplestore on the way in and another on the way out, with return_next() copying between the two. If we had some mechanism like this there is thus a potential for substantial savings, as well as improved clarity.

cheers

andrew

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to