Re: [PoC] XMLCast (SQL/XML X025)

From: Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>
To: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Vik Fearing <vik(at)postgresfriends(dot)org>
Subject: Re: [PoC] XMLCast (SQL/XML X025)
Date: 2025-11-29 19:39:18
Message-ID: CAB-JLwZQcOKx086-kQEyxgjjVZhtjuZo4=2XqWr3_fCkYrAxFA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em sáb., 29 de nov. de 2025 às 09:38, Jim Jones <jim(dot)jones(at)uni-muenster(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2025-11-29 20:50:56 Re: Remaining dependency on setlocale()
Previous Message Tom Lane 2025-11-29 18:21:00 Re: Simplify code building the LR conflict messages