mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
make sure array_merge() never returns null
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
--
|
--
|
||||||
-- This file is part of Nominatim. (https://nominatim.org)
|
-- This file is part of Nominatim. (https://nominatim.org)
|
||||||
--
|
--
|
||||||
-- Copyright (C) 2025 by the Nominatim developer community.
|
-- Copyright (C) 2026 by the Nominatim developer community.
|
||||||
-- For a full list of authors see the git log.
|
-- For a full list of authors see the git log.
|
||||||
|
|
||||||
-- Assorted helper functions for the triggers.
|
-- Assorted helper functions for the triggers.
|
||||||
@@ -46,10 +46,10 @@ DECLARE
|
|||||||
r INTEGER[];
|
r INTEGER[];
|
||||||
BEGIN
|
BEGIN
|
||||||
IF array_upper(a, 1) IS NULL THEN
|
IF array_upper(a, 1) IS NULL THEN
|
||||||
RETURN b;
|
RETURN COALESCE(b, '{}'::INTEGER[]);
|
||||||
END IF;
|
END IF;
|
||||||
IF array_upper(b, 1) IS NULL THEN
|
IF array_upper(b, 1) IS NULL THEN
|
||||||
RETURN a;
|
RETURN COALESCE(a, '{}'::INTEGER[]);
|
||||||
END IF;
|
END IF;
|
||||||
r := a;
|
r := a;
|
||||||
FOR i IN 1..array_upper(b, 1) LOOP
|
FOR i IN 1..array_upper(b, 1) LOOP
|
||||||
|
|||||||
Reference in New Issue
Block a user