On 9/6/16 12:00 PM, Tom Lane wrote:
On the other hand, if eof_cte is true, then what happened on the last
call is that we tried to fetch forwards, reached EOF on the underlying
query, and returned NULL. In that case, a backwards fetch *should*
produce the last row in the tuplestore.
Patch atta
Jim Nasby writes:
> On 9/3/16 1:30 PM, Tom Lane wrote:
>> Or we could add something like "But first, we must deal with the special
>> case of reversing direction after reaching EOF."
> I'm working on that, but one thing isn't clear to me... why do we only
> skip past the last tuple if (!node->le
On 9/3/16 1:30 PM, Tom Lane wrote:
Or we could add something like "But first, we must deal with the special
case of reversing direction after reaching EOF."
I'm working on that, but one thing isn't clear to me... why do we only
skip past the last tuple if (!node->leader->eof_cte)? Even if we'v
Jim Nasby writes:
> In CteScanNext():
> /*
>* If we are not at the end of the tuplestore, or are going
> backwards, try
>* to fetch a tuple from tuplestore.
>*/
> eof_tuplestore = tuplestore_ateof(tuplestorestate);
> if (!forward && eof_tuplestore)
> Fo
In CteScanNext():
/*
* If we are not at the end of the tuplestore, or are going
backwards, try
* to fetch a tuple from tuplestore.
*/
eof_tuplestore = tuplestore_ateof(tuplestorestate);
if (!forward && eof_tuplestore)
For the comment to be correct,