On 25.03.23 12:53, Pavel Stehule wrote:
Hi,
This small patch proposes the implementation of the standard SQL/XML
function XMLText (X038). It basically converts a text parameter into an
xml text node. It uses the libxml2 function xmlEncodeSpecialChars[1] to
escape possible predefined entities.
This patch also contains documentation and regression tests.
Any thoughts?
+1
Pavel
Thanks!
I just realized that I forgot to add a few examples to my last message :D
postgres=# SELECT xmltext('foo ´/[({bar?})]\`');
xmltext
--------------------
foo ´/[({bar?})]\`
(1 row)
postgres=# SELECT xmltext('foo & <bar>');
xmltext
-----------------------
foo & <bar>
(1 row)