pgsql: Preserve column names in the execution-time tupledesc for a RowE - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Preserve column names in the execution-time tupledesc for a RowE
Date
Msg-id E1RxQxp-0004XY-Go@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/398f70ec070fe60151584eaa448f04708aa77892

Modified Files
--------------
contrib/hstore/expected/hstore.out      |    6 +-
src/backend/executor/execQual.c         |    3 +-
src/backend/executor/execTuples.c       |   19 +++---
src/backend/executor/nodeValuesscan.c   |    6 ++-
src/backend/optimizer/path/allpaths.c   |    9 ++-
src/backend/optimizer/path/equivclass.c |    3 +-
src/backend/optimizer/plan/planner.c    |    3 +-
src/backend/optimizer/prep/prepunion.c  |   98 +++++++++++++++++++------------
src/backend/optimizer/util/var.c        |   13 +++-
src/backend/parser/gram.y               |    1 +
src/backend/parser/parse_expr.c         |   14 ++++-
src/include/catalog/catversion.h        |    2 +-
src/include/executor/executor.h         |    2 +-
src/include/nodes/primnodes.h           |   14 +++--
src/include/optimizer/prep.h            |    3 +-
src/test/regress/expected/json.out      |   62 ++++++++++----------
16 files changed, 158 insertions(+), 100 deletions(-)


pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: pgsql: Document random page cost is only 4x seqeuntial, and not 40x.
Next
From: Bruce Momjian
Date:
Subject: pgsql: Improve fsync documentation by stating that -W _0_ turns of writ