[postgis-tickets] r16926 - [run_test.pl] Properly upgrade raster from unpackaged

Sandro Santilli strk at kbt.io
Thu Oct 18 03:16:41 PDT 2018


Author: strk
Date: 2018-10-18 15:16:41 -0700 (Thu, 18 Oct 2018)
New Revision: 16926

Modified:
   trunk/regress/run_test.pl
Log:
[run_test.pl] Properly upgrade raster from unpackaged

Modified: trunk/regress/run_test.pl
===================================================================
--- trunk/regress/run_test.pl	2018-10-18 22:16:36 UTC (rev 16925)
+++ trunk/regress/run_test.pl	2018-10-18 22:16:41 UTC (rev 16926)
@@ -1482,7 +1482,7 @@
     if ( $OPT_WITH_RASTER )
     {
       if ( $OPT_UPGRADE_FROM
-           && !  has_split_raster_ext($OPT_UPGRADE_FROM)
+           && ! has_split_raster_ext($OPT_UPGRADE_FROM)
          )
       {
         # upgrade of postgis must have unpackaged raster, so
@@ -1502,6 +1502,10 @@
       {
         my $sql = "ALTER EXTENSION postgis_raster UPDATE TO '${nextver}'";
 
+        if ( $OPT_UPGRADE_FROM eq "unpackaged" ) {
+          $sql = "CREATE EXTENSION postgis_raster VERSION '${nextver}' FROM unpackaged";
+        }
+
         print "Upgrading PostGIS Raster in '${DB}' using: ${sql}\n" ;
 
         my $cmd = "psql $psql_opts -c \"" . $sql . "\" $DB >> $REGRESS_LOG 2>&1";



More information about the postgis-tickets mailing list