Re: Function results written to memory, then sent? - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Function results written to memory, then sent?
Date
Msg-id 20050324135656.GF20726@dcc.uchile.cl
Whole thread Raw
In response to Function results written to memory, then sent?  ("Steve - DND" <postgres@digitalnothing.com>)
List pgsql-general
On Mon, Mar 14, 2005 at 11:35:12PM -0700, Steve - DND wrote:
> I was reading through the docs today, and came across a paragraph that
> indicated when plpgsql queries are executed on the server, the results are
> all written to memory(or disk if necessary), and not streamed as available.
> I can't find the doc page which said it, but does anyone know if this
> applies to regular SQL as well, or is it just plpgsql specific. If it
> applies to either or both, are there any current plans to not have PG not
> behave in this manner, and stream the results of a query as they become
> available?

It is only plpgsql.  Pl/pgsql uses the C interface, which allows both
things to happen (so you can write a function in C which does one thing
or the other).  SQL is implemented internally (not through the C
interface) and streams the results as they are available.

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"When the proper man does nothing (wu-wei),
his thought is felt ten thousand miles." (Lao Tse)

pgsql-general by date:

Previous
From: postgresql@bryden.co.za
Date:
Subject: Re: Good Books
Next
From: Sven Willenberger
Date:
Subject: Re: plperl doesn't release memory