mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
fix setup when no us_postcode is available
This commit is contained in:
@@ -540,10 +540,8 @@ if ($aCMDResult['calculate-postcodes'] || $aCMDResult['all']) {
|
|||||||
$sSQL .= ' FROM us_postcode WHERE postcode NOT IN';
|
$sSQL .= ' FROM us_postcode WHERE postcode NOT IN';
|
||||||
$sSQL .= ' (SELECT postcode FROM location_postcode';
|
$sSQL .= ' (SELECT postcode FROM location_postcode';
|
||||||
$sSQL .= " WHERE country_code = 'us')";
|
$sSQL .= " WHERE country_code = 'us')";
|
||||||
} else {
|
if (!pg_query($oDB->connection, $sSQL)) fail(pg_last_error($oDB->connection));
|
||||||
$sSQL .= 'TRUNCATE TABLE us_postcode';
|
|
||||||
}
|
}
|
||||||
if (!pg_query($oDB->connection, $sSQL)) fail(pg_last_error($oDB->connection));
|
|
||||||
|
|
||||||
// add missing postcodes for GB (if available)
|
// add missing postcodes for GB (if available)
|
||||||
$sSQL = 'INSERT INTO location_postcode';
|
$sSQL = 'INSERT INTO location_postcode';
|
||||||
|
|||||||
Reference in New Issue
Block a user