]> git.openstreetmap.org Git - nominatim.git/commitdiff
restrict change propagation to interpolation lines
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 28 Jan 2022 10:05:37 +0000 (11:05 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 28 Jan 2022 10:05:37 +0000 (11:05 +0100)
Also means that Postgresql will use the right index for the query.

lib-sql/functions/place_triggers.sql

index a472d26d898e5b9df70e06014ca55b936e28eb5c..0bbd775e302344cf934b236dae7b7651693a335c 100644 (file)
@@ -156,6 +156,7 @@ BEGIN
         SELECT DISTINCT osm_id, address, geometry FROM place, planet_osm_ways w
         WHERE NEW.geometry && place.geometry
               and place.osm_type = 'W'
         SELECT DISTINCT osm_id, address, geometry FROM place, planet_osm_ways w
         WHERE NEW.geometry && place.geometry
               and place.osm_type = 'W'
+              and place.address ? 'interpolation'
               and exists (SELECT * FROM location_property_osmline
                           WHERE osm_id = place.osm_id
                                 and indexed_status in (0, 2))
               and exists (SELECT * FROM location_property_osmline
                           WHERE osm_id = place.osm_id
                                 and indexed_status in (0, 2))