]> granicus.if.org Git - postgresql/commit
Prevent failure when RowExpr or XmlExpr is parse-analyzed twice.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 23 Dec 2012 19:07:31 +0000 (14:07 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 23 Dec 2012 19:07:31 +0000 (14:07 -0500)
commitde4cf42af954a03957d3fd7afc1314b45af786e8
tree2ff02d1a1eaec4081289a7341aa6479a798dda67
parent97e1db771ccd64e84081b4576d285d0ddcfbae03
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
src/backend/parser/gram.y
src/backend/parser/parse_expr.c
src/include/nodes/primnodes.h