Re: (Comment)Bug in CteScanNext - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: (Comment)Bug in CteScanNext
Date
Msg-id 70a33d9c-9536-2c90-7ef9-b69ad0f213d5@BlueTreble.com
Whole thread Raw
In response to Re: (Comment)Bug in CteScanNext  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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 attached.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)   mobile: 512-569-9461

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is tuplesort_heap_siftup() a misnomer?
Next
From: Tom Lane
Date:
Subject: Re: GiST penalty functions [PoC]