From: Sandro Santilli Date: Tue, 1 Nov 2005 10:22:29 +0000 (+0000) Subject: Changed major-minor version numbers extraction to be compatible with postgresql 7... X-Git-Tag: pgis_1_1_0~177 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d979bcd7389a890802f2a8e69f8d3a915113d98;p=postgis Changed major-minor version numbers extraction to be compatible with postgresql 7.2.1 (relies on the fact that this information will always be in the first 4 characters - single digit per version) git-svn-id: http://svn.osgeo.org/postgis/trunk@2011 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/utils/postgis_proc_upgrade.pl b/utils/postgis_proc_upgrade.pl index c534c9980..077fb440c 100755 --- a/utils/postgis_proc_upgrade.pl +++ b/utils/postgis_proc_upgrade.pl @@ -99,8 +99,8 @@ DECLARE BEGIN SELECT into old_scripts postgis_scripts_installed(); SELECT into new_scripts ''NEWVERSION''; - SELECT into old_majmin substring(old_scripts from ''[^\.]*\.[^\.]*''); - SELECT into new_majmin substring(new_scripts from ''[^\.]*\.[^\.]*''); + SELECT into old_majmin substring(old_scripts from 1 for 4); + SELECT into new_majmin substring(new_scripts from 1 for 4); IF old_majmin != new_majmin THEN RAISE EXCEPTION ''Scripts upgrade from version % to version % requires a dump/reload. See postgis manual for instructions'', old_scripts, new_scripts;