Re: XMLDocument (SQL/XML X030)

From: Robert Treat <rob(at)xzilla(dot)net>
To: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Chapman Flack <jcflack(at)acm(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: XMLDocument (SQL/XML X030)
Date: 2025-01-28 04:54:20
Message-ID: CAJSLCQ0We1ofJ55JROwZu7z7r7giJFKj0zjHkvGuH67xB-kGfQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jan 25, 2025 at 6:45 AM Jim Jones <jim(dot)jones(at)uni-muenster(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-01-28 05:02:43 Re: An improvement of ProcessTwoPhaseBuffer logic
Previous Message Srinath Reddy 2025-01-28 04:49:11 Re: Non-text mode for pg_dumpall