Change scoping of table and join refnames to conform to SQL92: a JOIN

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 4a66f9dd54694eb4d7ecce2c7e0f0c50dfde88cd
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2001-02-14T21:35:07Z
Releases: 7.1.1
Change scoping of table and join refnames to conform to SQL92: a JOIN
clause with an alias is a <subquery> and therefore hides table references
appearing within it, according to the spec.  This is the same as the
preliminary patch I posted to pgsql-patches yesterday, plus some really
grotty code in ruleutils.c to reverse-list a query tree with the correct
alias name depending on context.  I'd rather not have done that, but unless
we want to force another initdb for 7.1, there's no other way for now.

Files