aboutsummaryrefslogtreecommitdiff
path: root/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm')
-rw-r--r--src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm
index 38c96f76fbf..264c33b45d0 100644
--- a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm
+++ b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm
@@ -294,6 +294,11 @@ sub adjust_old_dumpfile
# Version comments will certainly not match.
$dump =~ s/^-- Dumped from database version.*\n//mg;
+ # Same with version argument to pg_restore_relation_stats() or
+ # pg_restore_attribute_stats().
+ $dump =~ s ['version', '${old_version}\d{4}'::integer,]
+ ['version', '000000'::integer,]mg;
+
if ($old_version < 16)
{
# Fix up some view queries that no longer require table-qualification.
@@ -626,6 +631,11 @@ sub adjust_new_dumpfile
# Version comments will certainly not match.
$dump =~ s/^-- Dumped from database version.*\n//mg;
+ # Same with version argument to pg_restore_relation_stats() or
+ # pg_restore_attribute_stats().
+ $dump =~ s ['version', '\d{6}'::integer,]
+ ['version', '000000'::integer,]mg;
+
if ($old_version < 14)
{
# Suppress noise-word uses of IN in CREATE/ALTER PROCEDURE.