Re: XMLDocument (SQL/XML X030)

From: Chapman Flack <jcflack(at)acm(dot)org>
To: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: 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 21:01:09
Message-ID: 6793FF95.7070205@acm.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/24/25 14:59, Jim Jones wrote:
> In the XML Query standard, a "document node" represents a relaxed
> version of an XML document structure. This corresponds to what
> PostgreSQL's single XML type allows, meaning that any valid non-null
> PostgreSQL XML value can be returned unchanged. Other systems may
> support more permissive XML data types, such as
> <literal>XML(SEQUENCE)</literal>, which allow values that do not conform
> to this structure. In PostgreSQL, every valid non-null value of the XML
> type already has that structure, making any additional processing by
> this function unnecessary.

My one question here would be, does the reader of that paragraph
sit back and wonder "why have we suddenly begun talking about
the XML Query standard?".

It seems to me the key connection there is that the ISO SQL standard
defines XMLDOCUMENT by equivalence to what `document { $expr }` means
in the W3 XML Query standard.

Once that connection is made, it is all smooth sailing.

Regards,
-Chap

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-01-24 21:07:40 Re: Convert sepgsql tests to TAP
Previous Message Robert Haas 2025-01-24 20:53:42 Re: Eager aggregation, take 3