]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-sql/functions/address_lookup.sql
Merge pull request #2263 from AntoJvlt/special-phrases-autoupdate
[nominatim.git] / lib-sql / functions / address_lookup.sql
index f49bc93efd52d8fbce8e008d40817398ca038f53..5ec977d17552d7434bde9dc7fe88db9555b12c6c 100644 (file)
@@ -164,7 +164,10 @@ BEGIN
   -- POI objects in the placex table
   IF place IS NULL THEN
     SELECT parent_place_id as place_id, country_code,
-           housenumber, postcode,
+           coalesce(address->'housenumber',
+                    address->'streetnumber',
+                    address->'conscriptionnumber')::text as housenumber,
+           postcode,
            class, type,
            name, address,
            centroid
@@ -178,7 +181,7 @@ BEGIN
   -- place we should be using instead.
   IF place IS NULL THEN
     select coalesce(linked_place_id, place_id) as place_id,  country_code,
-           housenumber, postcode,
+           null::text as housenumber, postcode,
            class, type,
            null as name, address,
            null as centroid