From fbc8884693121ce58167ddd6a7c595bcc0651d82 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Fri, 28 Jan 2022 11:05:37 +0100 Subject: [PATCH] restrict change propagation to interpolation lines Also means that Postgresql will use the right index for the query. --- lib-sql/functions/place_triggers.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/lib-sql/functions/place_triggers.sql b/lib-sql/functions/place_triggers.sql index a472d26d..0bbd775e 100644 --- a/lib-sql/functions/place_triggers.sql +++ b/lib-sql/functions/place_triggers.sql @@ -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' + and place.address ? 'interpolation' and exists (SELECT * FROM location_property_osmline WHERE osm_id = place.osm_id and indexed_status in (0, 2)) -- 2.39.5