From: Brian Quinion Date: Tue, 28 Aug 2012 18:05:01 +0000 (+0100) Subject: mark placex as needed re-indexin based on parent_place_id too X-Git-Tag: v2.0.0~27 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/b1bd98f07064ed0bf4ed99105ab6038434d48041?ds=inline;hp=--cc mark placex as needed re-indexin based on parent_place_id too --- b1bd98f07064ed0bf4ed99105ab6038434d48041 diff --git a/sql/functions.sql b/sql/functions.sql index 13c682ae..398c2ee6 100644 --- a/sql/functions.sql +++ b/sql/functions.sql @@ -1271,6 +1271,8 @@ BEGIN DELETE FROM place_boundingbox where place_id = NEW.place_id; result := deleteRoad(NEW.partition, NEW.place_id); result := deleteLocationArea(NEW.partition, NEW.place_id); + UPDATE placex set parent_place_id = null, indexed_status = 2 where parent_place_id = NEW.place_id and indexed_status = 0; + UPDATE placex set parent_place_id = null where parent_place_id = NEW.place_id; UPDATE placex set linked_place_id = null, indexed_status = 2 where linked_place_id = NEW.place_id and indexed_status = 0; UPDATE placex set linked_place_id = null where linked_place_id = NEW.place_id; END IF;