mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-11 05:14:07 +00:00
update ref for postcode boundaries
Fixes https://trac.openstreetmap.org/ticket/5140
This commit is contained in:
@@ -2258,6 +2258,16 @@ BEGIN
|
|||||||
geometry = NEW.geometry
|
geometry = NEW.geometry
|
||||||
where osm_type = NEW.osm_type and osm_id = NEW.osm_id and class = NEW.class and type = NEW.type;
|
where osm_type = NEW.osm_type and osm_id = NEW.osm_id and class = NEW.class and type = NEW.type;
|
||||||
|
|
||||||
|
IF NEW.class in ('place','boundary') AND NEW.type in ('postcode','postal_code') THEN
|
||||||
|
IF NEW.postcode IS NULL THEN
|
||||||
|
-- postcode was deleted, no longer retain in placex
|
||||||
|
DELETE FROM placex where place_id = existingplacex.place_id;
|
||||||
|
RETURN NULL;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
NEW.name := hstore('ref', NEW.postcode);
|
||||||
|
END IF;
|
||||||
|
|
||||||
update placex set
|
update placex set
|
||||||
name = NEW.name,
|
name = NEW.name,
|
||||||
housenumber = NEW.housenumber,
|
housenumber = NEW.housenumber,
|
||||||
|
|||||||
Reference in New Issue
Block a user