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

From: Andrey Rachitskiy <pl0h0yp1(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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-30 03:08:19
Message-ID: CAB8bMivhR6_d33YFc-cAKT-Qa8Vj8MHicVUexyJSySTi+c4k_g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

вс, 30 авг. 2026 г. в 02:44, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:

> 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.
>

Dear Tom,

I think you're right. Fixed it in v3.

--
Regards,
Rachitskiy Andrey

Attachment Content-Type Size
v3-0001-Fold-immutable-XmlExpr-forms-in-eval_const_expressions.patch text/x-patch 4.4 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexander Lakhin 2026-08-30 04:00:00 Re: BUG #19595: Three memory-safety defects in src/backend/tsearch/spell.c (dictionary loader), PG 18.3
Previous 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