]> git.openstreetmap.org Git - nominatim.git/blobdiff - sql/functions/aux_property.sql
rename nominatim.admin to nominatim.tools
[nominatim.git] / sql / functions / aux_property.sql
index 841f240a091e24f255181f29f78cdb88fd1eeacb..6dd99eb241436e286c65602d3b5be3b94b1a133f 100644 (file)
@@ -23,13 +23,13 @@ BEGIN
 
   address_street_word_ids := word_ids_from_name(in_street);
   IF address_street_word_ids IS NOT NULL THEN
-    out_parent_place_id := getNearestNamedRoadFeature(out_partition, place_centroid,
+    out_parent_place_id := getNearestNamedRoadPlaceId(out_partition, place_centroid,
                                                       address_street_word_ids);
   END IF;
 
   IF out_parent_place_id IS NULL THEN
-    FOR location IN SELECT place_id FROM getNearestRoadFeature(out_partition, place_centroid) LOOP
-      out_parent_place_id := location.place_id;
+    SELECT getNearestRoadPlaceId(out_partition, place_centroid)
+      INTO out_parent_place_id;
     END LOOP;
   END IF;