Skip site navigation (1) Skip section navigation (2)

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

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 aRowE
Date: 2012-02-14 22:35:09
Message-ID: E1RxQxp-0004XY-Go@gemulon.postgresql.org (view raw or flat)
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(-)

pgsql-committers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group