X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8e2ef2842ef6d854e87a27ff57043971765fdd8a..819b858ba70fa01484ec8547f3f34b654aa4181c:/utils/setup.php diff --git a/utils/setup.php b/utils/setup.php index 624c49a3..86630196 100755 --- a/utils/setup.php +++ b/utils/setup.php @@ -541,8 +541,10 @@ if ($aCMDResult['calculate-postcodes'] || $aCMDResult['all']) { $sSQL .= " (SELECT postcode FROM location_postcode"; $sSQL .= " WHERE country_code = 'us')"; - if (!pg_query($oDB->connection, $sSQL)) fail(pg_last_error($oDB->connection)); + } else { + $sSQL .= "TRUNCATE TABLE us_postcode"; } + if (!pg_query($oDB->connection, $sSQL)) fail(pg_last_error($oDB->connection)); // add missing postcodes for GB (if available) $sSQL = "INSERT INTO location_postcode";