Re: Missing [NO] INDENT flag in XMLSerialize backward parsing - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Missing [NO] INDENT flag in XMLSerialize backward parsing
Date
Msg-id Z7hNimpV405ClyWx@paquier.xyz
Whole thread Raw
In response to Re: Missing [NO] INDENT flag in XMLSerialize backward parsing  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Missing [NO] INDENT flag in XMLSerialize backward parsing
List pgsql-hackers
On Fri, Feb 21, 2025 at 04:36:07AM -0500, Andrew Dunstan wrote:
> The fix has broken cross version upgrade test. Maybe we need to filter out
> NO INDENT in releases prior to 16 in AdjustUpgrade.pm?

Yes, I was just looking at that.  The regex I am finishing with in
AdjustUpgrade.pm is something like that, which is enough to discard
the NO INDENT clause in an XMLSERIALIZE:
--- src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm
+++ src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm
@@ -628,6 +628,12 @@ sub adjust_new_dumpfile
                         \s+FUNCTION\s2\s\(text,\stext\)\spublic\.part_hashtext_length\(text,bigint\);} {}mxg;
     }

+    # pre-v16 dumps do not know about XMLSERIALIZE(NO INDENT).
+    if ($old_version < 16)
+    {
+        $dump =~ s/XMLSERIALIZE\((.*)? NO INDENT\)/XMLSERIALIZE\($1\)/mg;
+    }

This needs to be applied in adjust_new_dumpfile() so as the comparison
with the old dump will be stable, is that right?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Zharkov Roman
Date:
Subject: Re: TAP test started using meson, can get a tcp port already used by another test.
Next
From: Ilia Evdokimov
Date:
Subject: Remove vardata parameters from eqjoinsel_inner