When expanding a whole-row Var into a RowExpr during ResolveNew(), attach

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

Commit: bf461538e18b67ec05d89846fcf15fa9c0cb9a74
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2008-10-06T17:39:26Z
Releases: 8.4.0
When expanding a whole-row Var into a RowExpr during ResolveNew(), attach
the column alias names of the RTE referenced by the Var to the RowExpr.
This is needed to allow ruleutils.c to correctly deparse FieldSelect nodes
referencing such a construct.  Per my recent bug report.

Adding a field to RowExpr forces initdb (because of stored rules changes)
so this solution is not back-patchable; which is unfortunate because 8.2
and 8.3 have this issue.  But it only affects EXPLAIN for some pretty odd
corner cases, so we can probably live without a solution for the back
branches.

Files