pgsql: Prevent failure when RowExpr or XmlExpr is parse-analyzed twice.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Prevent failure when RowExpr or XmlExpr is parse-analyzed twice.
Date: 2012-12-23 19:08:32
Message-ID: E1TmquW-0003a1-7G@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Prevent failure when RowExpr or XmlExpr is parse-analyzed twice.

transformExpr() is required to cope with already-transformed expression
trees, for various ugly-but-not-quite-worth-cleaning-up reasons. However,
some of its newer subroutines hadn't gotten the memo. This accounts for
bug #7763 from Norbert Buchmuller: transformRowExpr() was overwriting the
previously determined type of a RowExpr during CREATE TABLE LIKE INCLUDING
INDEXES. Additional investigation showed that transformXmlExpr had the
same kind of problem, but all the other cases seem to be safe.

Andres Freund and Tom Lane

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/de4cf42af954a03957d3fd7afc1314b45af786e8

Modified Files
--------------
src/backend/parser/gram.y | 1 +
src/backend/parser/parse_expr.c | 19 +++++++++++++++++--
src/include/nodes/primnodes.h | 3 ++-
3 files changed, 20 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2012-12-23 21:49:09 pgsql: Adjust many backend functions to return OID rather than void.
Previous Message Tom Lane 2012-12-22 20:01:55 pgsql: Fix documentation typo.