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 20:43:56
Message-ID: 772182.1720385036@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> I saw that one. It would be good to have a replacement for
> xmlParseBalancedChunkMemory, because after looking at the libxml2
> sources I realize that that's classed as a SAX1 function, which means
> it will likely go away at some point (maybe it's already not there in
> some builds). That's a long-term consideration though.

Actually ... after nosing around in libxml2 some more, I noticed
xmlParseInNodeContext, which is the only other function specified
to parse a Well Balanced Chunk. It requires a context node,
but AFAICS we can just gin up a dummy root node and use that.
It's existed for plenty long enough for our purposes, and it's
not semi-deprecated, and it lacks the bug at hand. So I'm now
thinking about the attached.

As far as the errcontext changes go: I think we have to just bite
the bullet and accept them. It looks like 2.13 has a completely
different mechanism than prior versions for deciding when to issue
XML_ERR_NOT_WELL_BALANCED. And it's not even clear that it's wrong;
for example, in our first failing case

DETAIL: line 1: xmlParseEntityRef: no name
<invalidentity>&</invalidentity>
^
-line 1: chunk is not well balanced
-<invalidentity>&</invalidentity>
- ^

it's kind of hard to argue that the chunk isn't well-balanced.

So we can either suppress errdetails from the expected output,
or set up an additional expected-file. I'm leaning to the
"\set VERBOSITY terse" solution.

regards, tom lane

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii.Yuki@df.MitsubishiElectric.co.jp 2024-07-07 21:46:31 RE: Partial aggregates pushdown
Previous Message Joel Jacobson 2024-07-07 20:39:46 Thoughts on NBASE=100000000