]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-sql/functions/placex_triggers.sql
make sure outputs take into account linked place names
[nominatim.git] / lib-sql / functions / placex_triggers.sql
index e6f083c894aa1d3d517f4eddd96551eaec4de9dc..9463bb27a8ed4e50f04cfcc4850ba7b830936fe4 100644 (file)
@@ -85,7 +85,10 @@ BEGIN
         FROM each(location.name - result.name);
       {% if debug %}RAISE WARNING 'Extra names: %', extra_names;{% endif %}
 
-      result.name := location.name || result.name || extra_names;
+      IF extra_names is not null THEN
+          result.name := result.name || extra_names;
+      END IF;
+
       {% if debug %}RAISE WARNING 'Final names: %', result.name;{% endif %}
     END IF;
   END IF;