]> granicus.if.org Git - postgresql/commit
Preserve column names in the execution-time tupledesc for a RowExpr.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 14 Feb 2012 22:34:19 +0000 (17:34 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 14 Feb 2012 22:34:56 +0000 (17:34 -0500)
commit398f70ec070fe60151584eaa448f04708aa77892
tree508ae6812ca581b5e39e11bb80206aa87e115046
parentc1d9df4fa227781b31be44a5a3024865a7f48049
Preserve column names in the execution-time tupledesc for a RowExpr.

The hstore and json datatypes both have record-conversion functions that
pay attention to column names in the composite values they're handed.
We used to not worry about inserting correct field names into tuple
descriptors generated at runtime, but given these examples it seems
useful to do so.  Observe the nicer-looking results in the regression
tests whose results changed.

catversion bump because there is a subtle change in requirements for stored
rule parsetrees: RowExprs from ROW() constructs now have to include field
names.

Andrew Dunstan and Tom Lane
16 files changed:
contrib/hstore/expected/hstore.out
src/backend/executor/execQual.c
src/backend/executor/execTuples.c
src/backend/executor/nodeValuesscan.c
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/path/equivclass.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/var.c
src/backend/parser/gram.y
src/backend/parser/parse_expr.c
src/include/catalog/catversion.h
src/include/executor/executor.h
src/include/nodes/primnodes.h
src/include/optimizer/prep.h
src/test/regress/expected/json.out