From: | Daniel Gustafsson <dgustafsson(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Add XMLText function (SQL/XML X038) |
Date: | 2023-11-06 08:57:32 |
Message-ID: | E1qzvQJ-0049ss-W1@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Add XMLText function (SQL/XML X038)
This function implements the standard XMLTest function, which
converts text into xml text nodes. It uses the libxml2 function
xmlEncodeSpecialChars to escape predefined entities (&"<>), so
that those do not cause any conflict when concatenating the text
node output with existing xml documents.
This also adds a note in features.sgml about not supporting
XML(SEQUENCE). The SQL specification defines a RETURNING clause
to a set of XML functions, where RETURNING CONTENT or RETURNING
SEQUENCE can be defined. Since PostgreSQL doesn't support
XML(SEQUENCE) all of these functions operate with an
implicit RETURNING CONTENT.
Author: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
Reviewed-by: Vik Fearing <vik(at)postgresfriends(dot)org>
Discussion: https://postgr.es/m/86617a66-ec95-581f-8d54-08059cca8885@uni-muenster.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/526fe0d79914b2dfcfd79effd1ab26ff62469248
Modified Files
--------------
doc/src/sgml/features.sgml | 9 +++++++++
doc/src/sgml/func.sgml | 30 ++++++++++++++++++++++++++++++
src/backend/catalog/sql_features.txt | 2 +-
src/backend/utils/adt/xml.c | 22 ++++++++++++++++++++++
src/include/catalog/pg_proc.dat | 3 +++
src/test/regress/expected/xml.out | 36 ++++++++++++++++++++++++++++++++++++
src/test/regress/expected/xml_1.out | 23 +++++++++++++++++++++++
src/test/regress/expected/xml_2.out | 36 ++++++++++++++++++++++++++++++++++++
src/test/regress/sql/xml.sql | 7 +++++++
9 files changed, 167 insertions(+), 1 deletion(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2023-11-06 10:31:23 | Re: pgsql: Migrate logical slots to the new node during an upgrade. |
Previous Message | Peter Eisentraut | 2023-11-06 08:17:21 | pgsql: pg_resetwal: Add more tests and test coverage |