1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Allow for arbitrary data types as content in XMLELEMENT. The original

coercion to type xml was a mistake.  Escape values so they are valid
XML character data.
This commit is contained in:
Peter Eisentraut
2007-01-12 16:29:24 +00:00
parent 1b1c6ed70a
commit fc568b9d8f
5 changed files with 149 additions and 19 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.205 2007/01/08 23:41:56 petere Exp $
* $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.206 2007/01/12 16:29:24 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -1455,10 +1455,6 @@ transformXmlExpr(ParseState *pstate, XmlExpr *x)
newe = coerce_to_specific_type(pstate, newe, XMLOID,
"XMLCONCAT");
break;
case IS_XMLELEMENT:
newe = coerce_to_specific_type(pstate, newe, XMLOID,
"XMLELEMENT");
break;
case IS_XMLFOREST:
newe = coerce_to_specific_type(pstate, newe, XMLOID,
"XMLFOREST");
@ -1488,7 +1484,7 @@ transformXmlExpr(ParseState *pstate, XmlExpr *x)
newx->args = lappend(newx->args, newe);
i++;
}
return (Node *) newx;
}