]> git.openstreetmap.org Git - nominatim.git/commitdiff
update: getPostgresVersion requires a database connection
authorChristian von Roques <roques@mti.ag>
Tue, 4 Apr 2017 16:09:28 +0000 (18:09 +0200)
committerChristian von Roques <roques@mti.ag>
Sat, 15 Apr 2017 17:12:25 +0000 (19:12 +0200)
utils/update.php

index 232a23c97dc57dca322381e14da2b3d282d268b8..52577d8889a31e235b8c1980b2479db2f6e484d3 100755 (executable)
@@ -156,12 +156,12 @@ if ($bHaveDiff) {
 }
 
 if ($aResult['deduplicate']) {
-    //
-    if (getPostgresVersion() < 9.3) {
+    $oDB =& getDB();
+
+    if (getPostgresVersion($oDB) < 9.3) {
         fail("ERROR: deduplicate is only currently supported in postgresql 9.3");
     }
 
-    $oDB =& getDB();
     $sSQL = 'select partition from country_name order by country_code';
     $aPartitions = chksql($oDB->getCol($sSQL));
     $aPartitions[] = 0;