On Wed, Jul 7, 2010 at 7:43 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Anyway, the way it works is that the parser generates "alias Vars" that
> refer to the join RTE, mainly because this makes life simpler for
> ruleutils. But the planner prefers to work with the "real" underlying
> columns whenever those are semantically equivalent, so it has a pass
> that does the replacement, and that's what's broken ...
Well, +1 from me for leaving the ruleutils as-is. I don't think we
should go out of our way to generate join alias vars just on the off
chance that there's a bug in the translation from join alias vars to
plain ol' vars, and I agree with your statement upthread that
qualification makes things more robust.
I like robust.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company