OSDN Git Service

Change scoping of table and join refnames to conform to SQL92: a JOIN
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 14 Feb 2001 21:35:07 +0000 (21:35 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 14 Feb 2001 21:35:07 +0000 (21:35 +0000)
commit4a66f9dd54694eb4d7ecce2c7e0f0c50dfde88cd
tree8810441569d5cf2e29f2a5c2b67ceb91d74deb2d
parentd42d31e78e2f9db73edb0b0ed35cafb1c409bdbf
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.
16 files changed:
src/backend/catalog/heap.c
src/backend/commands/command.c
src/backend/parser/analyze.c
src/backend/parser/parse_clause.c
src/backend/parser/parse_expr.c
src/backend/parser/parse_func.c
src/backend/parser/parse_node.c
src/backend/parser/parse_relation.c
src/backend/parser/parse_target.c
src/backend/utils/adt/ruleutils.c
src/include/nodes/primnodes.h
src/include/parser/parse_clause.h
src/include/parser/parse_node.h
src/include/parser/parse_relation.h
src/include/utils/builtins.h
src/tools/backend/index.html