From 9d34884ac55202bfad6e27eaa3f62060e6b9a323 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 24 Sep 2018 10:18:15 +0000 Subject: [PATCH] [run_test] Drop raster if needed when enforced by extension git-svn-id: http://svn.osgeo.org/postgis/trunk@16840 b70326c6-7e19-0410-871a-916f4a2858ee --- regress/run_test.pl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/regress/run_test.pl b/regress/run_test.pl index 1376d5cb3..d1af06753 100755 --- a/regress/run_test.pl +++ b/regress/run_test.pl @@ -1509,6 +1509,30 @@ sub upgrade_spatial_extensions } } } + else + { + # Raster support was not requested, so drop it if + # left unpackaged + if ( $OPT_UPGRADE_FROM + && ! has_split_raster_ext($OPT_UPGRADE_FROM) ) + { + $sql = "CREATE EXTENSION postgis_raster VERSION '${nextver}' FROM unpackaged"; + $cmd = "psql $psql_opts -c \"" . $sql . "\" $DB >> $REGRESS_LOG 2>&1"; + $rv = system($cmd); + if ( $rv ) { + fail "Error encountered creating EXTENSION POSTGIS_RASTER from unpackaged on upgrade", $REGRESS_LOG; + die; + } + + $sql = "DROP EXTENSION postgis_raster"; + $cmd = "psql $psql_opts -c \"" . $sql . "\" $DB >> $REGRESS_LOG 2>&1"; + $rv = system($cmd); + if ( $rv ) { + fail "Error encountered dropping EXTENSION POSTGIS_RASTER on upgrade", $REGRESS_LOG; + die; + } + } + } if ( $OPT_WITH_TOPO ) { -- 2.40.0