Tom Lane wrote:
> Seriously, I think what this shows is that piecemeal pullup is wrong in
> principle, and that the right approach is always to concat the
> subquery's rtable in toto to the upper level, and then go from there on
> adjusting varnos. Do you want to look into that approach?
You mean like pull_up_simple_subquery() does? Yeah, I can try that. This
isn't really something I'm familiar with, but it's great exercise :-).
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com