X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/42cd021d0406970d6c96c029ab83d08dfbe02792..76c146f3269ff07fdad66cb1d2d74c2acbc2af91:/lib-sql/functions/placex_triggers.sql

diff --git a/lib-sql/functions/placex_triggers.sql b/lib-sql/functions/placex_triggers.sql
index e6f083c8..9463bb27 100644
--- a/lib-sql/functions/placex_triggers.sql
+++ b/lib-sql/functions/placex_triggers.sql
@@ -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;
