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: pgsql-bugs@lists.postgresql.org
Cc: v.g.baranoff@gmail.com
Date: 2018-08-17T11:49:19Z
Lists: pgsql-bugs
>>>>> "Andrew" == Andrew Gierth <andrew@tao11.riddles.org.uk> writes:

 Andrew> I'm really not sure yet what the correct fix is, though.

I'm guessing that locally saving/restoring the scan direction in
ExecSubPlan is going to be the best option; it seems to fix the problem,
I'll post a patch in a bit.

-- 
Andrew (irc:RhodiumToad)


Commits

  1. Set scan direction appropriately for SubPlans (bug #15336)

  2. Get rid of the separate EState for subplans, and just let them share the