]> git.openstreetmap.org Git - nominatim.git/commitdiff
Reset housenumber on every place update
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 3 Jul 2019 18:56:35 +0000 (20:56 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 3 Jul 2019 18:56:35 +0000 (20:56 +0200)
As it is a computed field, it needs to be computed from scratch
to take into account any surrounding changes.

Fixes #1395.

sql/functions.sql

index 0cfeaf0cff0ad9cf2f0414764625c31804c8df2d..2b3998755715cd7690047ab705cea704dcb53ee8 100644 (file)
@@ -1230,6 +1230,8 @@ BEGIN
   END IF;
 
   --DEBUG: RAISE WARNING 'Copy over address tags';
+  -- housenumber is a computed field, so start with an empty value
+  NEW.housenumber := NULL;
   IF NEW.address is not NULL THEN
       IF NEW.address ? 'conscriptionnumber' THEN
         i := getorcreate_housenumber_id(make_standard_name(NEW.address->'conscriptionnumber'));