Tom Lane wrote:
> Probably not. But it strikes me that there's another sin of omission
> here: function and values RTEs need to be tweaked too, because they
> contain expressions thst could have uplevel Vars in them. I'm not
> certain such RTEs could appear at top level in a UNION query, but I'm
> not sure they couldn't either.
Hmm. Maybe through a rewrite or something?
We should use range_table_walker, which knows how to descend into all
kinds of RTEs...
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com