plperl (7.5)

From: elein <elein(at)varlena(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: elein(at)varlena(dot)com
Subject: plperl (7.5)
Date: 2004-07-11 04:18:28
Message-ID: 20040710211828.E6381@cookie.varlena.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)varlena(dot)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.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2004-07-11 04:22:58 Re: Nested Transactions, Abort All
Previous Message Bruce Momjian 2004-07-11 03:11:11 Re: pg_largeobject and tablespaces