Re: generate_series from now to infinity...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: depesz(at)depesz(dot)com
Cc: "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net>, pg-dev <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: generate_series from now to infinity...
Date: 2009-05-17 17:53:22
Message-ID: 29572.1242582802@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hubert depesz lubaczewski <depesz(at)depesz(dot)com> writes:
> why is it not limiting generate_series in the second example?

nodeFunctionscan.c sucks the whole SRF output into a tuplestore before
returning any of it. In principle you could do something different for
a value-per-call SRF, but it would require a second whole code path
(or else major refactoring of ExecMakeTableFunctionResult and related
code). The performance implications are unclear too.

I seem to recall there was some discussion of this point when that code
was first written, but nobody bothered to do anything about it.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2009-05-17 19:50:07 Re: Implementation of GROUPING SETS (T431: Extended grouping capabilities)
Previous Message Dickson S. Guedes 2009-05-17 17:50:55 Re: generate_series from now to infinity...