X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/6c1977b448e8b195bf96b6144674ffe0527e79de..2cb5e7b0cc7225daa81ca872449370727bbef07b:/utils/setup.php?ds=inline diff --git a/utils/setup.php b/utils/setup.php index c6cc7773..b93e4f82 100755 --- a/utils/setup.php +++ b/utils/setup.php @@ -540,10 +540,8 @@ if ($aCMDResult['calculate-postcodes'] || $aCMDResult['all']) { $sSQL .= ' FROM us_postcode WHERE postcode NOT IN'; $sSQL .= ' (SELECT postcode FROM location_postcode'; $sSQL .= " WHERE country_code = 'us')"; - } else { - $sSQL .= 'TRUNCATE TABLE us_postcode'; + if (!pg_query($oDB->connection, $sSQL)) fail(pg_last_error($oDB->connection)); } - if (!pg_query($oDB->connection, $sSQL)) fail(pg_last_error($oDB->connection)); // add missing postcodes for GB (if available) $sSQL = 'INSERT INTO location_postcode'; @@ -657,6 +655,7 @@ if ($aCMDResult['drop']) { 'import_polygon_*', 'import_status', 'place_addressline', + 'location_postcode', 'location_property*', 'placex', 'search_name', @@ -664,7 +663,6 @@ if ($aCMDResult['drop']) { 'word', 'query_log', 'new_query_log', - 'gb_postcode', 'spatial_ref_sys', 'country_name', 'place_classtype_*'