- FOR r IN
- SELECT place_id, null, null, null,
- ST_Distance(geometry, line) as distance, null as isguess
- FROM location_road_-partition-
- WHERE ST_DWithin(line, geometry, search_diameter)
- ORDER BY (ST_distance(geometry, p1)+
- ST_distance(geometry, p2)+
- ST_distance(geometry, p3)) ASC limit 1
+ FOR r IN
+ SELECT place_id FROM location_road_-partition-
+ WHERE ST_DWithin(line, geometry, search_diameter)
+ ORDER BY (ST_distance(geometry, p1)+
+ ST_distance(geometry, p2)+
+ ST_distance(geometry, p3)) ASC limit 1