Re: BUG #15336: Wrong cursor's bacward fetch results in select with ALL(subquery)

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: v(dot)g(dot)baranoff(at)gmail(dot)com
Subject: Re: BUG #15336: Wrong cursor's bacward fetch results in select with ALL(subquery)
Date: 2018-08-17 13:56:46
Message-ID: 87in492jrn.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

>>>>> "Andrew" == Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> writes:

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

It turns out to be also necessary to do this in ExecSetParamPlan, though
I couldn't find a way to make a stable regression test for that - my
manual tests were based on putting a subselect inside a volatile
construct like CASE WHEN random() < x THEN.

Patch attached.

--
Andrew (irc:RhodiumToad)

Attachment Content-Type Size
dirfix.patch text/x-patch 3.5 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Mark Lai 2018-08-17 13:56:56 Re: BUG #15333: pg_dump error on large table -- "pg_dump: could not stat file...Unknown error"
Previous Message Tom Lane 2018-08-17 13:49:21 Re: sql_inheritance