diff options
| author | Daniel Gustafsson | 2023-11-06 08:38:29 +0000 |
|---|---|---|
| committer | Daniel Gustafsson | 2023-11-06 08:38:29 +0000 |
| commit | 526fe0d79914b2dfcfd79effd1ab26ff62469248 (patch) | |
| tree | 7d25dbd45a49eeba488ae7d1f57520babda7e336 /src/include | |
| parent | 7b5275eec3a50d55f5750357b8a223cf5f0bb59f (diff) | |
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.jones@uni-muenster.de>
Reviewed-by: Vik Fearing <vik@postgresfriends.org>
Discussion: https://postgr.es/m/86617a66-ec95-581f-8d54-08059cca8885@uni-muenster.de
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/catalog/pg_proc.dat | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat index 091f7e343c3..f14aed422a7 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -8793,6 +8793,9 @@ { oid => '2922', descr => 'serialize an XML value to a character string', proname => 'text', prorettype => 'text', proargtypes => 'xml', prosrc => 'xmltotext' }, +{ oid => '3813', descr => 'generate XML text node', + proname => 'xmltext', proisstrict => 't', prorettype => 'xml', + proargtypes => 'text', prosrc => 'xmltext' }, { oid => '2923', descr => 'map table contents to XML', proname => 'table_to_xml', procost => '100', provolatile => 's', |
