]> git.openstreetmap.org Git - nominatim.git/blobdiff - sql/functions/placex_triggers.sql
details html page: no longer use place_id in URLs
[nominatim.git] / sql / functions / placex_triggers.sql
index cedbb6080f9e0d38a4736dd772391d121d8db00d..9803e815e80fdedc024492ee4885aaf82bd01891 100644 (file)
@@ -225,6 +225,7 @@ BEGIN
       WHERE make_standard_name(name->'name') = bnd_name
         AND placex.rank_address = bnd.rank_address
         AND placex.osm_type = 'N'
+        AND placex.rank_search < 26 -- needed to select the right index
         AND st_covers(geometry, placex.geometry)
     LOOP
       --DEBUG: RAISE WARNING 'Found matching place node %', linkedPlacex.osm_id;
@@ -235,7 +236,7 @@ BEGIN
   RETURN NULL;
 END;
 $$
-LANGUAGE plpgsql;
+LANGUAGE plpgsql STABLE;
 
 CREATE OR REPLACE FUNCTION placex_insert()
   RETURNS TRIGGER