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