Vik Fearing <vik.fearing@dalibo.com> writes:
> On 06/27/2014 02:49 AM, Tom Lane wrote:
>> In exactly the same way, it isn't safe to push down quals into
>> subqueries that use DISTINCT unless the quals are non-volatile. This
>> consideration is missed by the current code, and I think that's a bug.
>> Given the lack of prior complaints, I'm not excited about back-patching a
>> change to prevent pushing down volatile quals in the presence of DISTINCT;
>> but I think we probably ought to fix it in 9.5, and maybe 9.4 too.
> Why wouldn't it go back all the way to 9.0? (assuming 8.4 is dead)
People get unhappy when minor releases de-optimize queries that had
been working for them. It's not too late to change the behavior of
9.4, but I'm hesitant to do it in already-released branches, especially
in the absence of any complaints from the field.
> Are you going to take care of all this, or should David or I take a
> crack at it? The commitfest app still shows Ready for Committer.
I can deal with it.
regards, tom lane