]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/setup.php
replace ST_Line_Interpolate_Point with ST_LineInterpolatePoint (DB adaption needed)
[nominatim.git] / utils / setup.php
index fb16254dba4066acad970d3e93a763b75d598c2f..99d9e52628527643a332bb42dcfb1d3d9e980bfc 100755 (executable)
                } else {
                        pgsqlRunScript('CREATE EXTENSION postgis');
                }
+               if ($fPostgisVersion < 2.1) {
+                       // Function was renamed in 2.1 and throws an annoying deprecation warning
+                       pgsqlRunScript('ALTER FUNCTION st_line_interpolate_point(geometry, double precision) RENAME TO ST_LineInterpolatePoint');
+               }
                $sVersionString = $oDB->getOne('select postgis_full_version()');
                preg_match('#POSTGIS="([0-9]+)[.]([0-9]+)[.]([0-9]+)( r([0-9]+))?"#', $sVersionString, $aMatches);
                if (CONST_Postgis_Version != $aMatches[1].'.'.$aMatches[2])