From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Thomas Hallgren <thomas(at)tada(dot)se> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Recursive calls to functions that return sets |
Date: | 2006-03-22 17:36:19 |
Message-ID: | 44218B13.6020909@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thomas Hallgren wrote:
> Recursive calls works in PL/Java. No problem there. But the larger the
> set, the more memory it consumes. Do I read your answers correctly if
> I conclude this is a known limitation when SPI is used? I.e. there's
> no way to stream one row at a time without ever building the full set?
plperl stashes the results in a tuplestore object, which spills to disk.
So memory use is not unbounded. Before 8.1 we had no return_next and no
intermediate tuplestore, so we had serious memory problems with
returning large sets.
As for SPI calls, we also had problems there but now we provide a cursor
interface that works much more nicely.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-03-22 17:36:32 | Re: Recursive calls to functions that return sets |
Previous Message | Alvaro Herrera | 2006-03-22 17:34:55 | Re: Recursive calls to functions that return sets |