David Rowley <david.row...@2ndquadrant.com> writes: > On Sat, 2 Mar 2019 at 05:44, Tom Lane <t...@sss.pgh.pa.us> wrote: >> I'm not sure if the second one is actually a semantics bug or just a >> misoptimization? But yeah, +1 for putting in some simple tests for >> corner cases right now. Anyone want to propose a specific patch?
> The second is just reducing the planner's flexibility to produce a > good plan. The first is a bug. Proposed regression test attached. LGTM, pushed. regards, tom lane