+ result.address := result.address - '_unlisted_place'::TEXT;
+ result.name := p.name;
+ result.class := p.class;
+ result.type := p.type;
+ result.country_code := p.country_code;
+ result.rank_address := p.rank_address;
+
+ -- Names of linked places need to be merged in, so search for a linkable
+ -- place already here.
+ SELECT * INTO location FROM find_linked_place(p);
+
+ IF location.place_id is not NULL THEN
+ result.linked_place_id := location.place_id;
+
+ IF NOT location.name IS NULL THEN
+ result.name := location.name || result.name;
+ END IF;
+ END IF;