mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-24 06:22:08 +03:00
restrict deferred delete to concerned place
Deleting by osm_type/osm_id goes wrong if the place was reimported because of a change in geometry, admin_level etc. The newly created place is deleted as well in this case.
This commit is contained in:
parent
a517dd0ccf
commit
44f5058deb
@ -1217,9 +1217,9 @@ BEGIN
|
|||||||
RETURN NEW;
|
RETURN NEW;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
-- defered delete
|
-- deferred delete
|
||||||
IF OLD.indexed_status = 100 THEN
|
IF OLD.indexed_status = 100 THEN
|
||||||
delete from placex where osm_type = OLD.osm_type and osm_id = OLD.osm_id and class = OLD.class and type = OLD.type;
|
delete from placex where place_id = OLD.place_id;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user