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 1x0Qr4-004dPh-1K for pgsql-bugs@arkaria.postgresql.org; Sat, 29 Aug 2026 21:44:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x0Qr3-00CHuF-12 for pgsql-bugs@arkaria.postgresql.org; Sat, 29 Aug 2026 21:44:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x0Qr3-00CHty-0D for pgsql-bugs@lists.postgresql.org; Sat, 29 Aug 2026 21:44:49 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x0Qr0-000000033wy-2C8S for pgsql-bugs@lists.postgresql.org; Sat, 29 Aug 2026 21:44:48 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 67TLiVhq255522; Sat, 29 Aug 2026 17:44:31 -0400 From: Tom Lane To: Andrey Rachitskiy cc: i.portnov@compassplus.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19487: Error while executing SQL query involving XML parsing In-reply-to: References: <19487-367258bc497b923a@postgresql.org> <1589702.1787946553@sss.pgh.pa.us> Comments: In-reply-to Andrey Rachitskiy message dated "Sat, 29 Aug 2026 15:54:42 +0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <255520.1788039871.1@sss.pgh.pa.us> Date: Sat, 29 Aug 2026 17:44:31 -0400 Message-ID: <255521.1788039871@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrey Rachitskiy writes: > In v2, I tried to take all the points into account and expanded the tests. Hmm, I think it might be better to drop map_sql_value_to_xml_is_immutable and just treat XMLELEMENT and XMLFOREST as non-immutable. Trying to be smarter adds quite a bit of complexity to this patch as well as long-term maintenance risk (ie, needing to keep map_sql_value_to_xml_is_immutable in step with the actual behavior of map_sql_value_to_xml; if we mess that up, the mistake will be very non-obvious, and these test cases are unlikely to catch it). For my money it's not worth it. regards, tom lane