mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 05:18:00 +00:00
simplify getNearestRoadFeature function
The function only ever returns one result of which only the place_id is used. So simplify it to return a single place_id only (or NULL if none is found). Rename funciton to avoid conflicts when updating an existing database.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user