[postgis-tickets] r17382 - Allow postgis_extensions_upgrade() to upgrade from '%next' version

Sandro Santilli strk at kbt.io
Thu Apr 11 06:10:57 PDT 2019


Author: strk
Date: 2019-04-11 06:10:57 -0700 (Thu, 11 Apr 2019)
New Revision: 17382

Modified:
   trunk/postgis/postgis.sql.in
Log:
Allow postgis_extensions_upgrade() to upgrade from '%next' version

Would otherwise not even attempt to fix the "next" temporary version

Modified: trunk/postgis/postgis.sql.in
===================================================================
--- trunk/postgis/postgis.sql.in	2019-04-10 16:15:55 UTC (rev 17381)
+++ trunk/postgis/postgis.sql.in	2019-04-11 13:10:57 UTC (rev 17382)
@@ -2831,7 +2831,7 @@
 			ELSE
 				RAISE NOTICE 'Extension % is not available or not packagable for some reason', rec.name;
 			END IF;
-		ELSIF rec.default_version > rec.installed_version
+		ELSIF rec.default_version != rec.installed_version
 		THEN
 			sql = 'ALTER EXTENSION ' || rec.name || ' UPDATE TO ' ||
 						quote_ident(rec.default_version)   || ';';
@@ -2840,7 +2840,7 @@
 			RAISE DEBUG '%', sql;
 			EXECUTE sql;
 		ELSIF rec.default_version = rec.installed_version AND
-					rec.installed_version ILIKE '%dev%'
+					rec.installed_version ILIKE '%dev'
 		THEN
 			-- we need to upgrade to next and back
 			RAISE NOTICE 'Updating dev extension % %',



More information about the postgis-tickets mailing list