X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/35fdb7af0f535a2d3bdeada3fde6693282b51004..c325e1b0398ad786ab46f98707a641fbcd67739a:/utils/setup.php diff --git a/utils/setup.php b/utils/setup.php index 1deb060a..4de5953f 100755 --- a/utils/setup.php +++ b/utils/setup.php @@ -274,6 +274,19 @@ if (!pg_query($oDB->connection, 'CREATE SEQUENCE seq_place start 100000')) fail(pg_last_error($oDB->connection)); echo '.'; + $sSQL = 'select partition from country_name order by country_code'; + $aPartitions = $oDB->getCol($sSQL); + if (PEAR::isError($aPartitions)) + { + fail($aPartitions->getMessage()); + } + $aPartitions[] = 0; + foreach($aPartitions as $sPartition) + { + if (!pg_query($oDB->connection, 'TRUNCATE location_road_'.$sPartition)) fail(pg_last_error($oDB->connection)); + echo '.'; + } + // pre-create the word list if (!$aCMDResult['disable-token-precalc']) {