[postgis-tickets] r15193 - Fix aggregates upgrade

Sandro Santilli strk at kbt.io
Sat Oct 8 02:04:22 PDT 2016


Author: strk
Date: 2016-10-08 02:04:21 -0700 (Sat, 08 Oct 2016)
New Revision: 15193

Added:
   branches/2.2/utils/check_all_upgrades.sh
Modified:
   branches/2.2/.drone.yml
   branches/2.2/NEWS
   branches/2.2/postgis/postgis.sql.in
Log:
Fix aggregates upgrade

Fixes #3656 (aggregate upgrades)

Enables automated ugprade testing

Modified: branches/2.2/.drone.yml
===================================================================
--- branches/2.2/.drone.yml	2016-10-07 21:27:06 UTC (rev 15192)
+++ branches/2.2/.drone.yml	2016-10-08 09:04:21 UTC (rev 15193)
@@ -19,3 +19,5 @@
     commands:
       - service postgresql start
       - make check
+      - make install
+      - utils/check_all_upgrades.sh 2.4.0dev

Modified: branches/2.2/NEWS
===================================================================
--- branches/2.2/NEWS	2016-10-07 21:27:06 UTC (rev 15192)
+++ branches/2.2/NEWS	2016-10-08 09:04:21 UTC (rev 15193)
@@ -1,7 +1,11 @@
 PostGIS 2.2.4
 xxxx/xx/xx
 
+ * Bug Fixes *
 
+ - #3656, Fix upgrade of aggregates from 2.2 or lower version
+
+
 PostGIS 2.2.3
 2016/10/06
 

Modified: branches/2.2/postgis/postgis.sql.in
===================================================================
--- branches/2.2/postgis/postgis.sql.in	2016-10-07 21:27:06 UTC (rev 15192)
+++ branches/2.2/postgis/postgis.sql.in	2016-10-08 09:04:21 UTC (rev 15193)
@@ -3544,6 +3544,7 @@
 
 
 -- Availability: 1.2.2
+-- Changed: 2.2.0 to use non-deprecated ST_CombineBBox (r13535)
 CREATE AGGREGATE ST_Extent(
 	sfunc = ST_CombineBBox,
 	finalfunc = box2d,
@@ -3552,6 +3553,7 @@
 	);
 
 -- Availability: 2.0.0
+-- Changed: 2.2.0 to use non-deprecated ST_CombineBBox (r13535)
 CREATE AGGREGATE ST_3DExtent(
 	sfunc = ST_CombineBBox,
 	basetype = geometry,

Added: branches/2.2/utils/check_all_upgrades.sh
===================================================================
--- branches/2.2/utils/check_all_upgrades.sh	                        (rev 0)
+++ branches/2.2/utils/check_all_upgrades.sh	2016-10-08 09:04:21 UTC (rev 15193)
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+if test -z "$1"; then
+  echo "Usage: $0 <to_version>" >&2
+  exit 1
+fi
+to_version="$1"
+
+BUILDDIR=$PWD
+EXTDIR=`pg_config --sharedir`/extension/
+
+cd $EXTDIR
+'ls' postgis--* | grep -v -- '--.*--' |
+sed 's/^postgis--\(.*\)\.sql/\1/' | while read fname; do
+  from_version="$fname"
+  UPGRADE_PATH="${from_version}--${to_version}"
+  if test -e postgis--${UPGRADE_PATH}.sql; then
+    echo "Testing upgrade $UPGRADE_PATH"
+    export RUNTESTFLAGS="-v --extension --upgrade-path=${UPGRADE_PATH}"
+    make -C ${BUILDDIR}/regress check || exit 1
+  else
+    echo "Missing script for $UPGRADE_PATH upgrade" >&2
+  fi
+done


Property changes on: branches/2.2/utils/check_all_upgrades.sh
___________________________________________________________________
Added: svn:executable
   + *



More information about the postgis-tickets mailing list