| From: | Jim Jones <jim(dot)jones(at)uni-muenster(dot)de> |
|---|---|
| To: | Marcos Pegoraro <marcos(at)f10(dot)com(dot)br> |
| 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-28 20:07:34 |
| Message-ID: | 8266dac8-5b21-423d-ad67-64537f602b6c@uni-muenster.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mihail Nikalayeu | 2025-11-28 20:12:15 | Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY |
| Previous Message | Heikki Linnakangas | 2025-11-28 19:51:41 | Re: IPC/MultixactCreation on the Standby server |