Re: XML test error on Arch Linux

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Erik Wienhold <ewie(at)ewie(dot)name>
Cc: Frank Streitzig <fstreitzig(at)gmx(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: XML test error on Arch Linux
Date: 2024-07-07 19:20:56
Message-ID: 723725.1720380056@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> I think we could work around it as attached. This relies on seeing
> that the 2.13 code will return a node list if and only if
> ctxt->wellFormed is true (and we already eliminated the empty-input
> case, so an empty node list shouldn't happen). But it's not a lot
> less ugly than your proposal.

> Also, this only fixes the two wrong-output-from-xmlserialize
> test cases. I'm not so stressed about the cases where the errdetail
> changes, but I think we need to find an answer for the places where
> it fails and didn't before, like:

> SELECT xmlparse(content '<invalidns xmlns=''&lt;''/>');
> - xmlparse
> ----------------------------
> - <invalidns xmlns='&lt;'/>
> -(1 row)
> -
> +ERROR: invalid XML content

Oh! That's actually the same bug, and my patch was faulty because
I didn't think about the case where the caller of xml_parse passes
parsed_nodes = NULL. (And it wasn't doing the right thing in the
other case either :-(.) The attached works significantly better,
and cleans up these bogus errors.

We're still left with missing "chunk is not well balanced" errcontext
entries, which we could live without if we have to, but I wonder why
those are not there.

regards, tom lane

Attachment Content-Type Size
v2-hacky-workaround-for-libxml2-2.13-bug.patch text/x-diff 1.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joel Jacobson 2024-07-07 19:46:20 Optimize mul_var() for var1ndigits >= 8
Previous Message Tom Lane 2024-07-07 18:28:21 Re: XML test error on Arch Linux