force update of linker when linkee is updates

Potential name changes need to be added to the linker's
name hstore.

Fixes #170.
This commit is contained in:
Sarah Hoffmann
2017-06-06 23:46:44 +02:00
parent 9848381a04
commit 5a5691b5b7
3 changed files with 65 additions and 1 deletions

View File

@@ -2167,6 +2167,20 @@ BEGIN
update location_property_osmline p set indexed_status = 2 from planet_osm_ways w where p.linegeo && NEW.geometry and p.osm_id = w.id and NEW.osm_id = any(w.nodes);
END IF;
-- linked places should get potential new naming and addresses
IF existingplacex.linked_place_id is not NULL THEN
update placex x set
name = p.name,
extratags = p.extratags,
indexed_status = 2
from place p
where x.place_id = existingplacex.linked_place_id
and x.indexed_status = 0
and x.osm_type = p.osm_type
and x.osm_id = p.osm_id
and x.class = p.class;
END IF;
END IF;
-- Abort the add (we modified the existing place instead)