On Thu, Apr 16, 2020 at 08:44:16PM +0200, Tomas Vondra wrote: > >Yeah, that's not entirely close to me. But maybe it shows us where we to >get the unprocessed target list? >
I think at the very least this needs to apply the same change also to generate_nonunion_paths, because otherwise this fails because of the same issue:
set enable_hashagg = off; explain select * from foo except select * from foo order by 1, 3;
Ah yes, that's what I'll have to do to cope with EXCEPT/INTERSECT.