Re: Use \if/\endif to remove non-libxml2 expected output in regression tests

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Daniel Gustafsson <daniel@yesql.se>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-06-14T23:26:38Z
Lists: pgsql-hackers
On Sun, Jun 14, 2026 at 07:12:24PM -0400, Tom Lane wrote:
> Michael Paquier <michael@paquier.xyz> writes:
>> I would also like to drop xml_1.out with the previous trick \if, but
>> at the end if you feel that there is still value in keeping some
>> coverage for the multiple NO_XML_SUPPORT() paths, that's fine by me.
>> Removing half of the regression output update pain is still better
>> than removing none of it.
> 
> I think it's worth covering, say, one of those paths, but we don't
> have to hit every one of the duplicate copies.  So what do you think
> of putting the early-exit \if after the first test that produces
> one of those failures?

Positioning the \if after the three initial INSERT queries (\if query
that counts the number of tuples inserted), like in the patch I have
posted upthread, is able to hit NO_XML_SUPPORT() in xmlin().  That
would be enough.  Would you agree with that?
--
Michael

Commits

  1. Trim regression test expected output for xml

  2. Add an expected-file to match behavior of latest libxml2.