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.