On May31, 2011, at 20:50 , Florian Pflug wrote: > While trying to figure out sensible semantics for XPATH() and scalar-value > returning XPath expressions, I've stumbled upon a bug in XPATH() that allows > invalid XML values to be produced. This is a serious problem because should > such invalid values get inserted into an XML column, an un-restorable dump > ensues. > > Here's an example (REL9_0_STABLE as of a few days ago) > > template1=# SELECT (XPATH('/*/text()', '<root><</root>'))[1]; > xpath > ------- > < > > ... > > Patch is attached.
I've added two tests to the xml regression test which highlight the issue. Updated patch attached. best regards, Florian Pflug
pg_xpath_invalidxml.v2.patch
Description: Binary data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers