Don't bother to attach column name lists to RowExprs of named types.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 17 Mar 2022 22:25:44 +0000 (18:25 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 17 Mar 2022 22:25:44 +0000 (18:25 -0400)
commitd7b5c071dd6af2b81a7042dc60295061c7230cdc
treeb74969bf121453b16364c34e65be4688a9b0c07b
parentec62cb0aac5ba31a82339606009ddbd7eb00e2ac
Don't bother to attach column name lists to RowExprs of named types.

If a RowExpr is marked as returning a named composite type, we aren't
going to consult its colnames list; we'll use the attribute names
shown for the type in pg_attribute.  Hence, skip storing that list,
to save a few nanoseconds when copying the expression tree around.

Discussion: https://postgr.es/m/2950001.1638729947@sss.pgh.pa.us
src/backend/optimizer/prep/prepjointree.c
src/backend/optimizer/util/var.c
src/backend/rewrite/rewriteManip.c
src/include/nodes/primnodes.h