Re: (Comment)Bug in CteScanNext

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: (Comment)Bug in CteScanNext
Date: 2016-09-07 21:44:20
Message-ID: 70a33d9c-9536-2c90-7ef9-b69ad0f213d5@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
tuplestore.patch text/plain 2.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-09-07 21:58:42 Re: GiST penalty functions [PoC]
Previous Message Tom Lane 2016-09-07 21:42:26 Re: Is tuplesort_heap_siftup() a misnomer?