- IF searchpostcode IS NOT NULL THEN
- location := ROW(null, null, null, hstore('ref', searchpostcode), 'place',
- 'postcode', null, false, postcode_isaddress, 5, 0)::addressline;
+ IF place.address is not null and place.address ? '_unlisted_place' THEN
+ RETURN NEXT ROW(null, null, null, hstore('name', place.address->'_unlisted_place'),
+ 'place', 'locality', null, null, true, true, 25, 0)::addressline;
+ END IF;
+
+ IF place.postcode is not null THEN
+ location := ROW(null, null, null, hstore('ref', place.postcode), 'place',
+ 'postcode', null, null, false, true, 5, 0)::addressline;