Re: [PoC] XMLCast (SQL/XML X025) - Mailing list pgsql-hackers

From Marcos Pegoraro
Subject Re: [PoC] XMLCast (SQL/XML X025)
Date
Msg-id CAB-JLwZQcOKx086-kQEyxgjjVZhtjuZo4=2XqWr3_fCkYrAxFA@mail.gmail.com
Whole thread Raw
In response to Re: [PoC] XMLCast (SQL/XML X025)  (Jim Jones <jim.jones@uni-muenster.de>)
Responses Re: [PoC] XMLCast (SQL/XML X025)
List pgsql-hackers
Em sáb., 29 de nov. de 2025 às 09:38, Jim Jones <jim.jones@uni-muenster.de> escreveu:
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.

If we link to them, then the user will not have any doubts of what datatypes we work

+          It supports casting between <type>xml</type> and <link linkend="datatype-character-table">character</link>, <link linkend="datatype-numeric">numeric</link>, <link linkend="datatype-datetime">date/time</link>, <link linkend="datatype-boolean">boolean</link> and <link linkend="datatype-binary">binary</link> data types. 
 

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?

I think being explicit in the previous paragraph then is fine to not mention domains.

regards
Marcos

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Simplify code building the LR conflict messages
Next
From: Jeff Davis
Date:
Subject: Re: Remaining dependency on setlocale()