Greg Stark <gsstark(at)mit(dot)edu> writes:
> On Sat, Feb 26, 2011 at 5:55 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> So we really need some refactoring here. I dislike adding another
>> fundamental step to the ExecutorStart/ExecutorRun/ExecutorEnd sequence,
>> but there may not be a better way. The only way I see to fix this
>> without changing that API is to have ExecutorRun do the cleanup
>> processing just after the top plan node returns a null tuple, and that
>> seems a bit ugly as well.
> How would that handle the case of a cursor which isn't read to
> completion? Should it still execute the CTEs to completion?
Right at the moment we dodge that issue by disallowing wCTEs in cursors.
If we did allow them, then I would say that the wCTEs have to be run to
completion when the cursor is closed.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Greg Stark||Date: 2011-02-26 16:20:31|
|Subject: Re: wCTE: why not finish sub-updates at the end, not the beginning?|
|Previous:||From: Magnus Hagander||Date: 2011-02-26 15:51:28|
|Subject: Parallel restore checks wrong thread return value?|