Re: [PoC] XMLCast (SQL/XML X025)
Jim Jones <jim.jones@uni-muenster.de>
From: Jim Jones <jim.jones@uni-muenster.de>
To: Marcos Pegoraro <marcos@f10.com.br>
Cc: Robert Haas <robertmhaas@gmail.com>, pgsql-hackers@lists.postgresql.org,
Vik Fearing <vik@postgresfriends.org>
Date: 2025-11-29T12:38:32Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add missing deparsing of [NO] IDENT to XMLSERIALIZE()
- 984410b92326 18.0 cited
On 29/11/2025 12:38, Marcos Pegoraro wrote: > Em sex., 28 de nov. de 2025 às 17:07, Jim Jones <jim.jones@uni- > muenster.de <mailto:jim.jones@uni-muenster.de>> escreveu: > > Character data type in this sentence means the character types[1] as a > category, not the type character or character varying. > > Yes, I understand that, but saying character confuses me a bit. Perhaps listing the data types would make things easier to understand? Something like: * Casting is supported between xml and the built-in character (character, character varying, or text), numeric, boolean, binary, and date/time types. The date/time types (date, time with time zone, timestamp with time zone, and interval) are converted to their corresponding XML Schema types: xs:date, xs:time, xs:dateTime, and xs:duration. A bit too verbose for my taste, but I could live with it. XMLSerialize does something similar: "type can be character, character varying, or text..." What do you think? > Not really. XMLCast implements the type-specific lexical and semantic > rules defined by SQL/XML, which apply only to base (non-domain) data > types. Although the grammar permits a domain name as a target, the > standard does not define any XML-specific semantics for domains. > Supporting them would go beyond the scope of this patch, and users > who need a domain can IMHO cast the XMLCast result afterward. > > Correct. So maybe would be fine to explain this on SGML part, because a > domain is sometimes used just as an alias of a base type, without > checking or any other feature. If the user gets a "ERROR: unsupported target data type for XMLCast" using a domain (being an alias for a base type or not) and the documentation clearly lists the supported types, wouldn't that be enough? If not, do you have anything in mind that we could add to the docs? Thanks for the review Best, Jim