]> git.openstreetmap.org Git - nominatim.git/commitdiff
release in postgis version string is optional
authorBrian Quinion <openstreetmap@brian.quinion.co.uk>
Tue, 18 Dec 2012 17:39:01 +0000 (17:39 +0000)
committerBrian Quinion <openstreetmap@brian.quinion.co.uk>
Tue, 18 Dec 2012 17:39:01 +0000 (17:39 +0000)
utils/setup.php

index 01aa806257f656be740396ca71dfb8d53615a3ce..ff890af97e074850403d964b9544ce569151e52c 100755 (executable)
 
                pgsqlRunScriptFile(CONST_Path_Postgresql_Postgis.'/postgis.sql');
                $sVersionString = $oDB->getOne('select postgis_full_version()');
-               preg_match('#POSTGIS="([0-9]+)[.]([0-9]+)[.]([0-9]+) r([0-9]+)"#', $sVersionString, $aMatches);
+               preg_match('#POSTGIS="([0-9]+)[.]([0-9]+)[.]([0-9]+)( r([0-9]+))?"#', $sVersionString, $aMatches);
                if (CONST_Postgis_Version != $aMatches[1].'.'.$aMatches[2])
                {
                        echo "ERROR: PostGIS version is not correct.  Expected ".CONST_Postgis_Version." found ".$aMatches[1].'.'.$aMatches[2]."\n";