]> git.openstreetmap.org Git - nominatim.git/commitdiff
mark placex as needed re-indexin based on parent_place_id too
authorBrian Quinion <openstreetmap@brian.quinion.co.uk>
Tue, 28 Aug 2012 18:05:01 +0000 (19:05 +0100)
committerBrian Quinion <openstreetmap@brian.quinion.co.uk>
Tue, 28 Aug 2012 18:05:01 +0000 (19:05 +0100)
sql/functions.sql

index 13c682aeab58210bd6874c5da249a02205cf1dc1..398c2ee62dc4860077a277fbe18d7dde6f5b240a 100644 (file)
@@ -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;