[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-168-gc7c8f05d8

git at osgeo.org git at osgeo.org
Wed Oct 5 15:37:52 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  c7c8f05d8f397cc92b9f61c76eb19c13939fc1fa (commit)
      from  44d72533269d4729b4f2e2474ed4e503b5ddce4b (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 c7c8f05d8f397cc92b9f61c76eb19c13939fc1fa
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu Oct 6 00:35:08 2022 +0200

    Fix PostgreSQL upgrade paths availability test (connect to template1)
    
    Or we'd be getting an error from psql, which would now be also
    intercepted

diff --git a/utils/check_all_upgrades.sh b/utils/check_all_upgrades.sh
index bfcec355d..c16436546 100755
--- a/utils/check_all_upgrades.sh
+++ b/utils/check_all_upgrades.sh
@@ -14,6 +14,9 @@ cd $(dirname $0)/..
 SRCDIR=$PWD # TODO: allow override ?
 cd - > /dev/null
 
+# This is useful to run database queries
+export PGDATABASE=template1
+
 
 if test "$1" = "-s"; then
   EXIT_ON_FIRST_FAILURE=1
@@ -129,7 +132,6 @@ compatible_upgrade()
 to_version_param="$1"
 to_version=$to_version_param
 if expr $to_version : ':auto' >/dev/null; then
-  export PGDATABASE=template1
   to_version=`psql -XAtc "select default_version from pg_available_extensions where name = 'postgis'"` || exit 1
 elif expr $to_version : '.*!$' >/dev/null; then
   to_version=$(echo "${to_version}" | sed 's/\!$//')
@@ -183,7 +185,7 @@ for EXT in ${INSTALLED_EXTENSIONS}; do
         FROM pg_catalog.pg_extension_update_paths('${EXT}')
         WHERE source = '${from_version}'
         AND target = '${to_version}'
-    " )
+    " ) || exit 1
     if test -z "${path}"; then
       echo "SKIP: ${test_label} (no upgrade path from ${from_version} to ${to_version} known by postgresql)"
       continue
@@ -211,7 +213,7 @@ for EXT in ${INSTALLED_EXTENSIONS}; do
         FROM pg_catalog.pg_extension_update_paths('${EXT}')
         WHERE source = 'unpackaged'
         AND target = '${to_version}'
-    " )
+    " ) || exit 1
     if test -z "${path}"; then
       echo "SKIP: ${test_label} (no upgrade path from unpackaged to ${to_version} known by postgresql)"
       continue

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

Summary of changes:
 utils/check_all_upgrades.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list