public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andrew Dunstan <[email protected]>
To: Michael Paquier <[email protected]>
Cc: Jim Jones <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: Pavel Stehule <[email protected]>
Subject: Re: Missing [NO] INDENT flag in XMLSerialize backward parsing
Date: Fri, 21 Feb 2025 05:46:52 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>




> On Feb 21, 2025, at 4:55 AM, Michael Paquier <[email protected]> wrote:
> 
> 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?s
> 
> 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
> @@ -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?

I think so. Looks good to me 

Cheers 

Andrew





view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Missing [NO] INDENT flag in XMLSerialize backward parsing
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox