fix addr:place lookup

This commit is contained in:
Sarah Hoffmann 2014-04-28 21:52:24 +02:00
parent 6a1e599f31
commit 00768d321e

View File

@ -1529,7 +1529,7 @@ BEGIN
END IF; END IF;
IF NEW.parent_place_id IS NULL AND NEW.addr_place IS NOT NULL THEN IF NEW.parent_place_id IS NULL AND NEW.addr_place IS NOT NULL THEN
address_street_word_ids := get_name_id(make_standard_name(NEW.addr_place)); address_street_word_ids := get_name_ids(make_standard_name(NEW.addr_place));
IF address_street_word_ids IS NOT NULL THEN IF address_street_word_ids IS NOT NULL THEN
FOR location IN SELECT * from getNearestNamedPlaceFeature(NEW.partition, place_centroid, address_street_word_ids) LOOP FOR location IN SELECT * from getNearestNamedPlaceFeature(NEW.partition, place_centroid, address_street_word_ids) LOOP
NEW.parent_place_id := location.place_id; NEW.parent_place_id := location.place_id;