Re: [PATCH] Add XMLText function (SQL/XML X038)

From: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Add XMLText function (SQL/XML X038)
Date: 2023-03-25 12:25:23
Message-ID: 524d15f3-b16c-dba0-2b76-cb66d09430f2@uni-muenster.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 25.03.23 12:53, Pavel Stehule wrote:
>
> so 25. 3. 2023 v 12:49 odesílatel Jim Jones
> <jim(dot)jones(at)uni-muenster(dot)de> napsal:
>
> 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 &amp; &lt;bar&gt;
(1 row)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2023-03-25 12:46:42 meson/msys2 fails with plperl/Strawberry
Previous Message Pavel Stehule 2023-03-25 11:53:10 Re: [PATCH] Add XMLText function (SQL/XML X038)