]> granicus.if.org Git - postgis/commitdiff
[check-all-upgrades] Fix retrival of :auto version
authorSandro Santilli <strk@kbt.io>
Thu, 22 Aug 2019 06:47:50 +0000 (06:47 +0000)
committerSandro Santilli <strk@kbt.io>
Thu, 22 Aug 2019 06:47:50 +0000 (06:47 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@17751 b70326c6-7e19-0410-871a-916f4a2858ee

utils/check_all_upgrades.sh

index 683cc3d7e0470fb8cfa35f788dc65effda615a77..8e8a885e1aabf29d380c97c5585737b06f4b1534 100755 (executable)
@@ -17,7 +17,8 @@ fi
 to_version_param="$1"
 to_version=$to_version_param
 if expr $to_version : ':auto' >/dev/null; then
-  to_version=`psql -XAtc "select default_version from pg_available_extensions where name = 'postgis'"`
+  export PGDATABASE=template1
+  to_version=`psql -XAtc "select default_version from pg_available_extensions where name = 'postgis'"` || exit 1
 fi