Thread: pgsql: Allow for arbitrary data types as content in XMLELEMENT.

pgsql: Allow for arbitrary data types as content in XMLELEMENT.

From
petere@postgresql.org (Peter Eisentraut)
Date:
Log Message:
-----------
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.

Modified Files:
--------------
    pgsql/src/backend/parser:
        parse_expr.c (r1.205 -> r1.206)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_expr.c.diff?r1=1.205&r2=1.206)
    pgsql/src/backend/utils/adt:
        xml.c (r1.14 -> r1.15)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/xml.c.diff?r1=1.14&r2=1.15)
    pgsql/src/test/regress/expected:
        xml.out (r1.5 -> r1.6)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/xml.out.diff?r1=1.5&r2=1.6)
        xml_1.out (r1.6 -> r1.7)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/xml_1.out.diff?r1=1.6&r2=1.7)
    pgsql/src/test/regress/sql:
        xml.sql (r1.5 -> r1.6)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/xml.sql.diff?r1=1.5&r2=1.6)

Re: pgsql: Allow for arbitrary data types as content

From
Neil Conway
Date:
On Fri, 2007-01-12 at 12:29 -0400, Peter Eisentraut wrote:
> 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.

parse_expr.c: In function 'transformXmlExpr':
parse_expr.c:1452: warning: enumeration value 'IS_XMLELEMENT' not
handled in switch
% gcc --version
gcc (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)

-Neil