pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Don't request pretty-printed output from xmlNodeDump().
Date: Tue, 23 Apr 2019 14:51:13 +0000
Message-ID: <E1hIwlN-00041I-Ck@gemulon.postgresql.org> (raw)

Don't request pretty-printed output from xmlNodeDump().

xml.c passed format = 1 to xmlNodeDump(), resulting in sometimes getting
extra whitespace (newlines + spaces) in the output.  We don't really want
that, first because whitespace might be semantically significant in some
XML uses, and second because it happens only very inconsistently.  Only
one case in our regression tests is affected.

This potentially affects the results of xpath() and the XMLTABLE construct,
when emitting nodeset values.

Note that the older code in contrib/xml2 doesn't do this; it seems
to have been an aboriginal bad decision in commit ea3b212fe.

While this definitely seems like a bug to me, the small number of
complaints to date argues against back-patching a behavioral change.
Hence, fix in HEAD only, at least for now.

Per report from Jean-Marc Voillequin.

Discussion: https://postgr.es/m/1EC8157EB499BF459A516ADCF135ADCE3A23A9CA@LON-WGMSX712.ad.moodys.net

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c06e3550dc4163c3ff29a87283b605f0beb50bed

Modified Files
--------------
src/backend/utils/adt/xml.c         | 2 +-
src/test/regress/expected/xml.out   | 9 +++------
src/test/regress/expected/xml_2.out | 9 +++------
3 files changed, 7 insertions(+), 13 deletions(-)



Message-ID: <E1hIwlN-00041I-Ck@gemulon.postgresql.org>
Permalink:  ../E1hIwlN-00041I-Ck@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hIwlN-00041I-Ck@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Don't request pretty-printed output from xmlNodeDump().
  In-Reply-To: <E1hIwlN-00041I-Ck@gemulon.postgresql.org>
  References: <E1hIwlN-00041I-Ck@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox