bf-xversion-operator-hotfix.patch
text/x-patch
Filename: bf-xversion-operator-hotfix.patch
Type: text/x-patch
Part: 0
Patch
Format: unified
| File | + | − |
|---|---|---|
| PGBuild/Modules/TestUpgradeXversion.pm | 32 | 0 |
diff --git a/PGBuild/Modules/TestUpgradeXversion.pm b/PGBuild/Modules/TestUpgradeXversion.pm
index 8bc226f..bb9e560 100644
--- a/PGBuild/Modules/TestUpgradeXversion.pm
+++ b/PGBuild/Modules/TestUpgradeXversion.pm
@@ -434,6 +434,38 @@ sub test_upgrade ## no critic (Subroutines::ProhibitManyArgs)
}
}
+ # operators not supported from release 14
+ if ( ($this_branch gt 'REL_13_STABLE' || $this_branch eq 'HEAD')
+ && ($oversion le 'REL_13_STABLE' && $oversion ne 'HEAD'))
+ {
+ my $prstmt = join(';',
+ 'drop operator if exists #@# (bigint,NONE)',
+ 'drop operator if exists #%# (bigint,NONE)',
+ 'drop operator if exists !=- (bigint,NONE)',
+ 'drop operator if exists #@%# (bigint,NONE)');
+
+ system( "$other_branch/inst/bin/psql -X -e "
+ . " -c '$prstmt' "
+ . "regression "
+ . ">> '$upgrade_loc/$oversion-copy.log' 2>&1");
+ return if $?;
+
+ if ($oversion le 'REL9_4_STABLE')
+ {
+ # this is fixed in 9.5 and later
+ $prstmt = join(';',
+ 'drop operator @#@ (NONE, bigint)',
+ 'CREATE OPERATOR @#@ (' .
+ 'PROCEDURE = factorial, ' .
+ 'RIGHTARG = bigint )');
+ system( "$other_branch/inst/bin/psql -X -e "
+ . " -c '$prstmt' "
+ . "regression "
+ . ">> '$upgrade_loc/$oversion-copy.log' 2>&1");
+ return if $?;
+ }
+ }
+
my $extra_digits = "";
if ( $oversion ne 'HEAD'