Re: Function results written to memory, then sent?

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Steve - DND <postgres(at)digitalnothing(dot)com>
Cc: "Pgsql-General(at)Postgresql(dot) Org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Function results written to memory, then sent?
Date: 2005-03-24 13:56:56
Message-ID: 20050324135656.GF20726@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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[(at)]dcc(dot)uchile(dot)cl>)
"When the proper man does nothing (wu-wei),
his thought is felt ten thousand miles." (Lao Tse)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message rdiamond 2005-03-24 14:07:14 LWM 2004 Readers' Choice Nomination
Previous Message postgresql 2005-03-24 13:41:06 Re: Good Books