(Comment)Bug in CteScanNext

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: (Comment)Bug in CteScanNext
Date: 2016-09-02 23:20:48
Message-ID: 8fa74614-5ed8-000e-2204-184931cc28a1@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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, wouldn't the condition need to be
(!forward || !eof_tuplestore)?
--
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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2016-09-02 23:49:06 Re: Renaming of pg_xlog and pg_clog
Previous Message Michael Paquier 2016-09-02 21:11:54 Re: Password identifiers, protocol aging and SCRAM protocol