Re: Missing [NO] INDENT flag in XMLSerialize backward parsing

From: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Subject: Re: Missing [NO] INDENT flag in XMLSerialize backward parsing
Date: 2025-02-21 11:29:12
Message-ID: 6d146918-dbd6-4de2-bdd1-80471c1e0053@uni-muenster.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Michael & Andrew

On 21.02.25 11:46, Andrew Dunstan wrote:
>> On Feb 21, 2025, at 4:55 AM, Michael Paquier <michael(at)paquier(dot)xyz> 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

Thanks for the quick response!

For future reference, what’s the best way to verify this myself? The
buildfarm was all green.

Best regards, Jim

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Jones 2025-02-21 11:36:22 Re: [PoC] XMLCast (SQL/XML X025)
Previous Message Dmitry Dolgov 2025-02-21 11:07:25 Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning