v3-0001-Fix-dumps-filtering.patch
text/x-patch
Filename: v3-0001-Fix-dumps-filtering.patch
Type: text/x-patch
Part: 0
Patch
Format: unified
Series: patch v3-0001
| File | + | − |
|---|---|---|
| src/bin/pg_upgrade/t/002_pg_upgrade.pl | 2 | 0 |
commit 602627daf32a6d33ae96ce8fbae918c9f00f0633
Author: Anton A. Melnikov <a.melnikov@postgrespro.ru>
Date: Mon Dec 26 06:21:32 2022 +0300
Fix dupms filtering in pg_upgrade test from older versions. Replace
specific privilegies in dumps with ALL due to b5d63824
and 60684dd8.
diff --git a/src/bin/pg_upgrade/t/002_pg_upgrade.pl b/src/bin/pg_upgrade/t/002_pg_upgrade.pl
index 4cc1469306..d23c4b2253 100644
--- a/src/bin/pg_upgrade/t/002_pg_upgrade.pl
+++ b/src/bin/pg_upgrade/t/002_pg_upgrade.pl
@@ -44,6 +44,8 @@ sub filter_dump
$dump_contents =~ s/^\-\-.*//mgx;
# Remove empty lines.
$dump_contents =~ s/^\n//mgx;
+ # Replace specific privilegies with ALL
+ $dump_contents =~ s/^(GRANT\s|REVOKE\s)(\S*)\s/$1ALL /mgx;
my $dump_file_filtered = "${dump_file}_filtered";
open(my $dh, '>', $dump_file_filtered)