summaryrefslogtreecommitdiff
path: root/src/include/nodes/primnodes.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-12-23 14:07:36 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2012-12-23 14:07:36 -0500
commit628ea7ea51e046bade9ce7f15dc9c41118e29f13 (patch)
tree498d460f6ca04d23a76f651928c05e04a7f3a6f9 /src/include/nodes/primnodes.h
parent14aa55df29ea69e453be4c46f8546d49365fc06b (diff)
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
Diffstat (limited to 'src/include/nodes/primnodes.h')
-rw-r--r--src/include/nodes/primnodes.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h
index f1e20ef937c..5815139447a 100644
--- a/src/include/nodes/primnodes.h
+++ b/src/include/nodes/primnodes.h
@@ -944,7 +944,8 @@ typedef struct MinMaxExpr
*
* Note: result type/typmod/collation are not stored, but can be deduced
* from the XmlExprOp. The type/typmod fields are just used for display
- * purposes, and are NOT the true result type of the node.
+ * purposes, and are NOT necessarily the true result type of the node.
+ * (We also use type == InvalidOid to mark a not-yet-parse-analyzed XmlExpr.)
*/
typedef enum XmlExprOp
{