Re: BUG #19487: Error while executing SQL query involving XML parsing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrey Rachitskiy <pl0h0yp1(at)gmail(dot)com>
Cc: i(dot)portnov(at)compassplus(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19487: Error while executing SQL query involving XML parsing
Date: 2026-08-29 21:44:31
Message-ID: 255521.1788039871@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andrey Rachitskiy <pl0h0yp1(at)gmail(dot)com> 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2026-08-30 00:14:57 Re: BUG #19595: Three memory-safety defects in src/backend/tsearch/spell.c (dictionary loader), PG 18.3
Previous Message Andrey Rachitskiy 2026-08-29 10:54:42 Re: BUG #19487: Error while executing SQL query involving XML parsing