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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Preserve column names in the execution-time tupledesc for a RowE
Date: 2012-02-14 22:35:09
Message-ID: E1RxQxp-0004XY-Go@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2012-02-14 22:42:08 pgsql: Improve fsync documentation by stating that -W _0_ turns of writ
Previous Message Bruce Momjian 2012-02-14 21:55:04 pgsql: Document random page cost is only 4x seqeuntial, and not 40x.