mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 02:58:13 +00:00
extratags should become null when empty
Removing the artifical entries in the extratags may lead to an empty hstore. Set it to null in that case. Fixes #3055.
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) 2022 by the Nominatim developer community.
|
-- Copyright (C) 2024 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.
|
||||||
|
|
||||||
-- Trigger functions for the placex table.
|
-- Trigger functions for the placex table.
|
||||||
@@ -794,6 +794,9 @@ BEGIN
|
|||||||
result := deleteLocationArea(NEW.partition, NEW.place_id, NEW.rank_search);
|
result := deleteLocationArea(NEW.partition, NEW.place_id, NEW.rank_search);
|
||||||
|
|
||||||
NEW.extratags := NEW.extratags - 'linked_place'::TEXT;
|
NEW.extratags := NEW.extratags - 'linked_place'::TEXT;
|
||||||
|
IF NEW.extratags = ''::hstore THEN
|
||||||
|
NEW.extratags := NULL;
|
||||||
|
END IF;
|
||||||
|
|
||||||
-- NEW.linked_place_id contains the precomputed linkee. Save this and restore
|
-- NEW.linked_place_id contains the precomputed linkee. Save this and restore
|
||||||
-- the previous link status.
|
-- the previous link status.
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ Feature: Updates of linked places
|
|||||||
When marking for delete N1
|
When marking for delete N1
|
||||||
Then placex contains
|
Then placex contains
|
||||||
| object | extratags |
|
| object | extratags |
|
||||||
| R1 | |
|
| R1 | - |
|
||||||
|
|
||||||
Scenario: Update linked_place info when linkee type changes
|
Scenario: Update linked_place info when linkee type changes
|
||||||
Given the 0.1 grid
|
Given the 0.1 grid
|
||||||
|
|||||||
Reference in New Issue
Block a user