OSDN Git Service

Repair some issues with column aliases and RowExpr construction in the
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 19 Aug 2004 20:57:41 +0000 (20:57 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 19 Aug 2004 20:57:41 +0000 (20:57 +0000)
commitbbd6eb5b958ef38f786089fd4a03d650d4b7220e
tree3dbc25578ccd347b586018f6b8a6d8d6baa84ac7
parent040450beef4f3fdafaa9e20dbb0ee3e00c5856ba
Repair some issues with column aliases and RowExpr construction in the
presence of dropped columns.  Document the already-presumed fact that
eref aliases in relation RTEs are supposed to have entries for dropped
columns; cause the user alias structs to have such entries too, so that
there's always a one-to-one mapping to the underlying physical attnums.
Adjust expandRTE() and related code to handle the case where a column
that is part of a JOIN has been dropped.  Generalize expandRTE()'s API
so that it can be used in a couple of places that formerly rolled their
own implementation of the same logic.  Fix ruleutils.c to suppress
display of aliases for columns that were dropped since the rule was made.
16 files changed:
src/backend/catalog/dependency.c
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/prep/prepjointree.c
src/backend/optimizer/util/var.c
src/backend/parser/parse_clause.c
src/backend/parser/parse_coerce.c
src/backend/parser/parse_relation.c
src/backend/parser/parse_target.c
src/backend/rewrite/rewriteHandler.c
src/backend/rewrite/rewriteManip.c
src/backend/utils/adt/ruleutils.c
src/include/nodes/parsenodes.h
src/include/nodes/primnodes.h
src/include/parser/parse_relation.h
src/include/parser/parsetree.h
src/include/rewrite/rewriteManip.h