pgsql: Ensure that xpath() escapes special characters in string values.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Ensure that xpath() escapes special characters in string values.
Date: 2011-07-20 22:45:01
Message-ID: E1QjfVl-0000eb-PC@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Ensure that xpath() escapes special characters in string values.

Without this it's possible for the output to not be legal XML, as
illustrated by the added regression test cases.

NB: this change will need to be called out as an incompatibility in the
9.2 release notes, since it's possible somebody was relying on the old
behavior, even though it's clearly wrong.

Florian Pflug, reviewed by Radoslaw Smogura

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/aaf15e5c1cf8d2c27d2f9841343f00027762cb4e

Modified Files
--------------
src/backend/utils/adt/xml.c | 6 +++++-
src/test/regress/expected/xml.out | 12 ++++++++++++
src/test/regress/expected/xml_1.out | 12 ++++++++++++
src/test/regress/sql/xml.sql | 2 ++
4 files changed, 31 insertions(+), 1 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-07-21 15:33:10 pgsql: Make xpath() do something useful with XPath expressions that ret
Previous Message Bruce Momjian 2011-07-20 22:31:36 pgsql: In pg_upgrade, fix the -l/log option to work on Windows.