Re: ExecTypeSetColNames is fundamentally broken
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-12-06T20:30:28Z
Lists: pgsql-hackers
On Sun, Dec 5, 2021 at 1:46 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > So 0001 attached fixes this by revoking the decision to apply > ExecTypeSetColNames in cases where a Var or RowExpr is declared > to return a named composite type. This causes a couple of regression > test results to change, but they are ones that were specifically > added to exercise this behavior that we now see to be invalid. I don't understand the code so I can't comment on the code, but I find the regression test changes pretty suspect. Attaching any alias list to the RTE ought to rename the output columns for all purposes, not just the ones we as implementers find convenient. I understand that we have to do *something* here and that the present behavior is buggy and unacceptable ... but I'm not sure I accept that the only possible fix is the one you propose here. -- Robert Haas EDB: http://www.enterprisedb.com
Commits
-
Don't bother to attach column name lists to RowExprs of named types.
- d7b5c071dd6a 15.0 landed
-
Revert applying column aliases to the output of whole-row Vars.
- ec62cb0aac5b 15.0 landed
- 5e144cc89b46 13.7 landed
- 205214c8b8cc 10.21 landed
- 1f5ef5ae0806 12.11 landed
- 1d072bd2030a 14.3 landed
- 13b54d1e0dde 11.16 landed