On 28/11/2025 19:27, Marcos Pegoraro wrote:
> You wrote character only on the SGML part, all others are text. When
> you write numeric, the user understands that it can be bigint, integer,
> numeric, etc, so users can get confused about TEXT and CHAR(N), because
> the only place you wrote character is on SGML.


Character data type in this sentence means the character types[1] as a
category, not the type character or character varying.

"It supports casting between xml and character, numeric, date/time,
binary, and boolean data types."

Sorry if I'm misunderstanding your point.

> And interval is still not on that list.


Interval is already part of the date/time types[1]


> 
> And about domains
> + switch (xexpr->targetType)
> + {
> + case XMLOID:
> ...
> + case INT4OID:
> 
> Does this shape capture this type ?
> CREATE DOMAIN i32 AS integer;

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.

Thanks!

Best, Jim

[1] https://www.postgresql.org/docs/current/datatype-character.html
[2] https://www.postgresql.org/docs/current/datatype-datetime.html


Reply via email to