plperl (7.5) - Mailing list pgsql-hackers

From elein
Subject plperl (7.5)
Date
Msg-id 20040710211828.E6381@cookie.varlena.com
Whole thread Raw
Responses Re: plperl (7.5)
Re: plperl (7.5)
List pgsql-hackers
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.

For example, you maybe selecting rows,
doing a little formating and adding some
information and returning the rows as you
process them.  It the table you are selecting
is very large, you still have to hold the
results in memory to return them all at 
once.

Am I misunderstanding something or can
someone explain the reasoning?

In an ideal implementation both techniques
would be possible since returning the array
is kind of cool ;-)

--elein
============================================================
elein@varlena.com        Varlena, LLC        www.varlena.com
         PostgreSQL Consulting, Support & Training   

PostgreSQL General Bits   http://www.varlena.com/GeneralBits/
=============================================================
I have always depended on the [QA] of strangers.



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_largeobject and tablespaces
Next
From: Alvaro Herrera
Date:
Subject: Re: Nested Transactions, Abort All