Re: BUG #15336: Wrong cursor's bacward fetch results in select with ALL(subquery)
Andrew Gierth <andrew@tao11.riddles.org.uk>
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-bugs@lists.postgresql.org, v.g.baranoff@gmail.com,
Tom Lane <tgl@sss.pgh.pa.us>
Date: 2018-08-17T14:38:41Z
Lists: pgsql-bugs
>>>>> "Alvaro" == Alvaro Herrera <alvherre@2ndquadrant.com> writes: >> I wonder if we have a contender here for the oldest reported bug in >> PG history; while I haven't tested anything older than 9.5, the >> incorrect logic seems to date back to the introduction of subqueries >> in 6.something. Alvaro> Hmm .. Alvaro> 8.2 seems fine: Hah. You're right; the bug is only 10 years old, not 20. It was apparently introduced in 8.3 by commit c7ff7663e; before that, SubPlans had a separate EState from the parent plan, so they didn't share the parent plan's direction indicator. -- Andrew (irc:RhodiumToad)
Commits
-
Set scan direction appropriately for SubPlans (bug #15336)
- 807c1c555064 9.3.25 landed
- 3cf3a65cb7da 9.4.20 landed
- d2ecc27c374a 9.5.15 landed
- 6302fe6b28e2 9.6.11 landed
- d31ebbff5b2b 10.6 landed
- 67b161eae32b 11.0 landed
- 520acab17124 12.0 landed
-
Get rid of the separate EState for subplans, and just let them share the
- c7ff7663e47f 8.3.0 cited