summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier2025-02-21 11:37:31 +0000
committerMichael Paquier2025-02-21 11:37:31 +0000
commit665cafe8a4bd23b4f14194b0671d3ef09dc55864 (patch)
tree30c4e19db34f1156317460066665be811326217c
parent329304c9012b2ac6d906afeb18062f9080dceef9 (diff)
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 984410b92326. Reviewed-by: Andrew Dunstan <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 16
-rw-r--r--src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm
index c6455427df5..64f1f910ebf 100644
--- a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm
+++ b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm
@@ -636,6 +636,12 @@ sub adjust_new_dumpfile
$dump =~ s ['version', '\d+'::integer,]
['version', '000000'::integer,]mg;
+ # pre-v16 dumps do not know about XMLSERIALIZE(NO INDENT).
+ if ($old_version < 16)
+ {
+ $dump =~ s/XMLSERIALIZE\((.*)? NO INDENT\)/XMLSERIALIZE\($1\)/mg;
+ }
+
if ($old_version < 14)
{
# Suppress noise-word uses of IN in CREATE/ALTER PROCEDURE.