Clean up handling of dropped columns in NAMEDTUPLESTORE RTEs.
authorTom Lane <[email protected]>
Wed, 6 Sep 2017 14:41:05 +0000 (10:41 -0400)
committerTom Lane <[email protected]>
Wed, 6 Sep 2017 14:41:05 +0000 (10:41 -0400)
commit483882905a9a5dc72c9487ceee12320b9630ba2b
treee1e3093c66dd2cac5d53236bcfd8982da234105f
parent3fbf09563f839137e5279a390044a18e400fa074
Clean up handling of dropped columns in NAMEDTUPLESTORE RTEs.

The NAMEDTUPLESTORE patch piggybacked on the infrastructure for
TABLEFUNC/VALUES/CTE RTEs, none of which can ever have dropped columns,
so the possibility was ignored most places.  Fix that, including adding a
specification to parsenodes.h about what it's supposed to look like.

In passing, clean up assorted comments that hadn't been maintained
properly by said patch.

Per bug #14799 from Philippe Beaudoin.  Back-patch to v10.

Discussion: https://postgr.es/m/20170906120005[email protected]
src/backend/optimizer/util/relnode.c
src/backend/parser/parse_relation.c
src/backend/parser/parse_target.c
src/backend/utils/adt/ruleutils.c
src/include/nodes/parsenodes.h