From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Jim Jones <jim(dot)jones(at)uni-muenster(dot)de> |
Cc: | Chapman Flack <jcflack(at)acm(dot)org>, Robert Treat <rob(at)xzilla(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: XMLDocument (SQL/XML X030) |
Date: | 2025-01-24 15:27:38 |
Message-ID: | CAFj8pRD1zE9FT_HFfrnWxPNED_yZRi889h9uwQ3+W4GTDcPeCw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
pá 24. 1. 2025 v 14:48 odesílatel Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
napsal:
>
> On 24.01.25 13:48, Pavel Stehule wrote:
> > Lot of users use XML functions without XMLDOCUMENT now. The doc should to
> > help with a reply to question where and when I need (I can) use this
> > function. This should
> > be in context of Postgres where every XML expr returns XML value, so
> > sentence
> > creates an XML value from XML expression is still very confusing
> >
> > What some like
> >
> > "SQL/XML introduces XMLDOCUMENT function to returns a document node
> > from XML tree of some XML value.
> > This has not any sense (because XML in Postgres is always materialized
> > to string) in PostgreSQL implementation of XML, and the function just
> > returns
> > input value". Or some like that.
>
>
> I see. I tried to incorporate your suggestion in the text:
>
> In the SQL/XML specification, the XMLDocument (X030) function is
> designed to return a document node from a given XML value expression.
> Since PostgreSQL handles XML values as materialized strings rather than
> tree structures, this function does not produce a document node
> structure but instead returns the validated input <type>xml</type> value
> as-is. The input <type>xml</type> value can include any valid XML
> content, such as elements, text, or a mixture of both. This function
> does not require the input to have a single root element and does not
> wrap the result in one. Validation of the <type>xml</type> input value
> depends on the current <xref linkend="guc-xmloption"/> setting. If the
> input <type>xml</type> value is NULL, the function returns NULL. This
> function ensures compatibility with the SQL/XML specification, making it
> particularly useful when migrating SQL queries from other database
> systems that also implement this standard.
>
> Let me know if it is still confusing ...
>
it is ok for me now. Thank you
Pavel
>
> Thanks!
>
> Best, Jim
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Nazir Bilal Yavuz | 2025-01-24 15:29:46 | Re: Show WAL write and fsync stats in pg_stat_io |
Previous Message | Benoit Lobréau | 2025-01-24 15:26:23 | Re: Proposal to Enable/Disable Index using ALTER INDEX (with patch) |