[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc1-10-g556f86824

git at osgeo.org git at osgeo.org
Sat Aug 13 01:16:37 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, master has been updated
       via  556f868249c835984560630e598123fb4dea58a4 (commit)
      from  5e87b721530008fce0e498666732da962184b246 (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 556f868249c835984560630e598123fb4dea58a4
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