X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/9abb96fa6b87ba2086b0bf32eed0310690931cfe..d586b95ff11a45ab6223e83e1b0540f1db87b325:/sql/functions/aux_property.sql

diff --git a/sql/functions/aux_property.sql b/sql/functions/aux_property.sql
index cee5cfb2..6dd99eb2 100644
--- a/sql/functions/aux_property.sql
+++ b/sql/functions/aux_property.sql
@@ -28,8 +28,8 @@ BEGIN
   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;
 
