Re: XMLDocument (SQL/XML X030) - Mailing list pgsql-hackers

From Robert Treat
Subject Re: XMLDocument (SQL/XML X030)
Date
Msg-id CAJSLCQ0We1ofJ55JROwZu7z7r7giJFKj0zjHkvGuH67xB-kGfQ@mail.gmail.com
Whole thread Raw
In response to XMLDocument (SQL/XML X030)  (Jim Jones <jim.jones@uni-muenster.de>)
Responses Re: XMLDocument (SQL/XML X030)
List pgsql-hackers
On Sat, Jan 25, 2025 at 6:45 AM Jim Jones <jim.jones@uni-muenster.de> wrote:
> On 25.01.25 11:50, Pavel Stehule wrote:
> > you still forces detoasting (inside PG_GETARG_XML_P)
>
>
> Ah, ok .. I overlooked it. You meant _DATUM instead of _XML_P
>
> Fixed in v8.
>

Was playing around with the patch and was thinking about this wording:
"The xmldocument function returns the input argument
 unchanged... and is provided for compatibility."

When I run an example similar to the db2 example you gave earlier:

pagila=# SELECT xmldocument(xmlforest(10 as X, 20 as Y));
    xmldocument
--------------------
 <x>10</x><y>20</y>

In the db2 case, this is preserved as UPPER (which is to say, db2 case
folds UPPER, and the input happens to match that), but we case fold
lower, because we do; presumably you'd get the opposite effect in db2
running the input with unquoted lower field names(?). In any case (no
pun intended), SQL folks probably don't care much about that
discrepancy, but given xml is case sensitive, maybe xml people do?


Robert Treat
https://xzilla.net



pgsql-hackers by date:

Previous
From: Srinath Reddy
Date:
Subject: Re: Non-text mode for pg_dumpall
Next
From: Mahendra Singh Thalor
Date:
Subject: Re: Non-text mode for pg_dumpall