From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Support [NO] INDENT option in XMLSERIALIZE().
Date: Wed, 15 Mar 2023 20:59:19 +0000
Message-ID: <E1pcYDP-003iQY-E2@gemulon.postgresql.org> (raw)
Support [NO] INDENT option in XMLSERIALIZE().
This adds the ability to pretty-print XML documents ... according to
libxml's somewhat idiosyncratic notions of what's pretty, anyway.
One notable divergence from a strict reading of the spec is that
libxml is willing to collapse empty nodes "<node></node>" to just
"<node/>", whereas SQL and the underlying XML spec say that this
option should only result in whitespace tweaks. Nonetheless,
it seems close enough to justify using the SQL-standard syntax.
Jim Jones, reviewed by Peter Smith and myself
Discussion: https://postgr.es/m/2f5df461-dad8-6d7d-4568-08e10608a69b@uni-muenster.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/483bdb2afec9e33ff05fd48a00e2656e30e714b7
Modified Files
--------------
doc/src/sgml/datatype.sgml | 9 +-
src/backend/catalog/sql_features.txt | 2 +-
src/backend/executor/execExprInterp.c | 6 +-
src/backend/parser/gram.y | 14 ++-
src/backend/parser/parse_expr.c | 1 +
src/backend/utils/adt/xml.c | 212 ++++++++++++++++++++++++++++++++--
src/include/catalog/catversion.h | 2 +-
src/include/nodes/parsenodes.h | 1 +
src/include/nodes/primnodes.h | 4 +-
src/include/parser/kwlist.h | 1 +
src/include/utils/xml.h | 3 +-
src/test/regress/expected/xml.out | 186 +++++++++++++++++++++++++++++
src/test/regress/expected/xml_1.out | 134 +++++++++++++++++++++
src/test/regress/expected/xml_2.out | 186 +++++++++++++++++++++++++++++
src/test/regress/sql/xml.sql | 36 ++++++
15 files changed, 775 insertions(+), 22 deletions(-)
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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Support [NO] INDENT option in XMLSERIALIZE().
In-Reply-To: <E1pcYDP-003iQY-E2@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