[postgis-tickets] [SCM] PostGIS branch stable-3.0 updated. 3.0.6-23-g2c3d513c2

git at osgeo.org git at osgeo.org
Sat Aug 13 01:14:08 PDT 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, stable-3.0 has been updated
       via  2c3d513c28d24b9677d9984363ffcb1a222e78b4 (commit)
      from  6892696fa372f97005c1dffc794f660cb3266ddd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2c3d513c28d24b9677d9984363ffcb1a222e78b4
Author: Sandro Santilli <strk at kbt.io>
Date:   Sat Aug 13 09:49:22 2022 +0200

    run_test: fix --upgrade with no --upgrade-path with 3.0+ versions
    
    Fixes --extension --raster --upgrade tests where --upgrade-path
    is not given and default version is 3.0 or later

diff --git a/regress/run_test.pl b/regress/run_test.pl
index 4d852bdd6..aea1799f7 100755
--- a/regress/run_test.pl
+++ b/regress/run_test.pl
@@ -233,6 +233,14 @@ psql -tAc "
 " template1
 `));
 
+my $defextver = `
+psql -XtAc "
+	SELECT default_version
+	FROM pg_catalog.pg_available_extensions
+	WHERE name = 'postgis'
+" template1
+`;
+
 my $dbcount = @dblist;
 
 if ( $dbcount == 0 )
@@ -264,7 +272,6 @@ else
 
 my $pgvernum = sql("SELECT current_setting('server_version_num')");
 my $libver = sql("select postgis_lib_version()");
-my $defextver = sql("select default_version from pg_available_extensions where name = 'postgis'");
 
 if ( ! $libver )
 {
@@ -1470,7 +1477,8 @@ sub prepare_spatial_extensions
 		}
  	}
 
-	if ( $OPT_WITH_RASTER && has_split_raster_ext($OPT_UPGRADE_FROM) )
+	my $extver = $OPT_UPGRADE_FROM ? $OPT_UPGRADE_FROM : $OPT_UPGRADE_TO ? $OPT_UPGRADE_TO : $defextver;
+	if ( $OPT_WITH_RASTER && has_split_raster_ext($extver) )
 	{
 		my $sql = "CREATE EXTENSION postgis_raster";
 		if ( $OPT_UPGRADE_FROM ) {

-----------------------------------------------------------------------

Summary of changes:
 regress/run_test.pl | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list