Skip to content

Commit 514d47d

Browse files
committed
Fix cross-version upgrades with XMLSERIALIZE(NO INDENT)
Dumps from versions older than v16 do not know about NO INDENT in a XMLSERIALIZE() clause. This commit adjusts AdjustUpgrade.pm so as NO INDENT is discarded in the contents of the new dump adjusted for comparison when the old version is v15 or older. This should be enough to make the cross-version upgrade tests pass. Per report from buildfarm member crake. Oversight in 984410b. Reviewed-by: Andrew Dunstan <andrew@dunslane.net> Discussion: https://postgr.es/m/88b183f1-ebf9-4f51-9144-3704380ccae7@dunslane.net Backpatch-through: 16
1 parent 1c2a235 commit 514d47d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,12 @@ sub adjust_new_dumpfile
603603
# Version comments will certainly not match.
604604
$dump =~ s/^-- Dumped from database version.*\n//mg;
605605

606+
# pre-v16 dumps do not know about XMLSERIALIZE(NO INDENT).
607+
if ($old_version < 16)
608+
{
609+
$dump =~ s/XMLSERIALIZE\((.*)? NO INDENT\)/XMLSERIALIZE\($1\)/mg;
610+
}
611+
606612
if ($old_version < 14)
607613
{
608614
# Suppress noise-word uses of IN in CREATE/ALTER PROCEDURE.

0 commit comments

Comments
 (0)