]> git.openstreetmap.org Git - nominatim.git/commitdiff
revert using stricter uniqueness constraint on place
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 24 Feb 2020 21:42:03 +0000 (22:42 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 24 Feb 2020 21:55:03 +0000 (22:55 +0100)
Multiple objects with the same (osm_type, osm_id, class) may
exist when we hold back deleting an area because it is so
large.

Fixes #1695.

sql/indices_updates.src.sql

index 99f59cdbf5fc066dc87a5a262b9039ddc8041ac7..175bfba229104fb91639d4fbdd67a7ac1094916a 100644 (file)
@@ -6,4 +6,4 @@ CREATE INDEX CONCURRENTLY idx_placex_pendingsector ON placex USING BTREE (rank_s
 CREATE INDEX CONCURRENTLY idx_location_area_country_place_id ON location_area_country USING BTREE (place_id) {ts:address-index};
 
 DROP INDEX CONCURRENTLY IF EXISTS place_id_idx;
-CREATE UNIQUE INDEX CONCURRENTLY idx_place_osm_unique on place using btree(osm_id,osm_type,class) {ts:address-index};
+CREATE UNIQUE INDEX CONCURRENTLY idx_place_osm_unique on place using btree(osm_id,osm_type,class,type) {ts:address-index};