Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vPKDm-00FM3R-1v for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Nov 2025 12:38:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vPKDl-00Eh2Y-0Y for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Nov 2025 12:38:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vPKDk-00Eh2Q-2h for pgsql-hackers@lists.postgresql.org; Sat, 29 Nov 2025 12:38:37 +0000 Received: from udcm-wwu2.uni-muenster.de ([128.176.118.28]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vPKDj-0029V9-0m for pgsql-hackers@lists.postgresql.org; Sat, 29 Nov 2025 12:38:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uni-muenster.de; i=@uni-muenster.de; q=dns/txt; s=uniout; t=1764419915; x=1795955915; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=L+VklksuKWRNliaSQJU8zZw0qHvl9+qZfBLxqE61Ekg=; b=mxhkR9cQHEDqxoASPHLd931QV0gEstr9F2wJgJx06drG3WXzbsaJbrrl uLHdssUhstFOdsHPBSRFbRekg33VwRwLLVY+nGTVX6fNqp8FQ5lQwx2Eh oqYAnoFAgUAm1igrnbIfCnx2TjWObznrFMZnglYJtCnk1o2ev+jYsiSux IDt2Pc1rTQzf0kDDRDKvJFpY/eJclN5igqaRKagGuum0JDZt2fcLF5QS8 xj0ud8CyALmLvbJEJuDLo+Yf25yDr3yxBYcPox+HOK3uwYkU8vqsNE7TO aJ5yCY1O3EPBS8Xbb7/5B3wjtsYHC8+kmT4+qtheyahc/Ehkf7Vue0znJ w==; X-CSE-ConnectionGUID: FSQ4y0SqThq6up09Tydx/g== X-CSE-MsgGUID: xKOq0QkyTBGf1r+YapeQbA== X-IronPort-AV: E=Sophos;i="6.20,236,1758578400"; d="scan'208";a="376684431" Received: from secmail.uni-muenster.de ([128.176.118.4]) by UDCM-RELAY2.UNI-MUENSTER.DE with ESMTP; 29 Nov 2025 13:38:34 +0100 Received: from [192.168.178.27] (dynamic-080-171-060-079.80.171.pool.telefonica.de [80.171.60.79]) by SECMAIL.UNI-MUENSTER.DE (Postfix) with ESMTPSA id 16ED120ADF00; Sat, 29 Nov 2025 13:38:33 +0100 (CET) Message-ID: <531ef48a-c566-400a-b753-e4a349e3c987@uni-muenster.de> Date: Sat, 29 Nov 2025 13:38:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PoC] XMLCast (SQL/XML X025) To: Marcos Pegoraro Cc: Robert Haas , pgsql-hackers@lists.postgresql.org, Vik Fearing References: <7b99d466-985f-4d27-8c93-9b98c6945ebb@uni-muenster.de> <389e2c5b-9d6d-4629-9c59-7f5bd526e791@uni-muenster.de> <576df37b-914b-4276-8bd8-3e8d682f32b2@uni-muenster.de> <48a98e56-6192-42de-8b32-d13935646ef3@uni-muenster.de> <2d0ce5ac-d0c4-49d1-b736-4a3bd0d07571@uni-muenster.de> <14999734-ac92-4b21-8466-c698cde105d0@uni-muenster.de> <88535aaf-3fa8-478a-ba17-2b36e1566403@uni-muenster.de> <30fec692-76d9-453b-b6c3-84d522f1564c@uni-muenster.de> <8266dac8-5b21-423d-ad67-64537f602b6c@uni-muenster.de> Content-Language: de-DE, en-GB From: Jim Jones In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 29/11/2025 12:38, Marcos Pegoraro wrote: > Em sex., 28 de nov. de 2025 às 17:07, Jim Jones 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