Re: plperl (7.5)

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: plperl (7.5)
Date: 2004-07-11 05:05:47
Message-ID: 20040711050547.GB14600@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jul 10, 2004 at 09:18:28PM -0700, elein wrote:
> The new plperl returns sets by having
> the function return an array.
>
> This requires that the entire array be
> built before anything is returned.
>
> It seems to me that that does not scale
> very well. The technique of RETURN NEXT;
> scales much better.

I think RETURN NEXT does the same thing anyway ... they just store
tuples in a Tuplestore and then the whole thing is returned. So the
function actually doesn't return until the whole function is done.

The set-returning-function infraestructure actually has a mode on which
you can return one tuple per call, but PL/pgSQL uses only the other
mode, materializing the whole set before return.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"El conflicto es el camino real hacia la unión"

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dennis Bjorklund 2004-07-11 05:40:17 Re: Nested Transactions, Abort All
Previous Message Alvaro Herrera 2004-07-11 04:22:58 Re: Nested Transactions, Abort All