From: Sarah Hoffmann Date: Thu, 23 Jan 2020 21:24:41 +0000 (+0100) Subject: rename functions where return parameter changed X-Git-Tag: v3.5.0~96^2~1 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/5ec25122f64523509b0cbc804c1be1f5f215c45c?ds=sidebyside rename functions where return parameter changed Postgresql cannot cleanly reimport these functions when upgrading, so simply rename to avoid errors. --- diff --git a/sql/functions/aux_property.sql b/sql/functions/aux_property.sql index 841f240a..cee5cfb2 100644 --- a/sql/functions/aux_property.sql +++ b/sql/functions/aux_property.sql @@ -23,7 +23,7 @@ BEGIN address_street_word_ids := word_ids_from_name(in_street); IF address_street_word_ids IS NOT NULL THEN - out_parent_place_id := getNearestNamedRoadFeature(out_partition, place_centroid, + out_parent_place_id := getNearestNamedRoadPlaceId(out_partition, place_centroid, address_street_word_ids); END IF; diff --git a/sql/functions/utils.sql b/sql/functions/utils.sql index 741a3969..6371e9ad 100644 --- a/sql/functions/utils.sql +++ b/sql/functions/utils.sql @@ -262,7 +262,7 @@ BEGIN -- Note that addr:street links can only be indexed, once the street itself is indexed word_ids := word_ids_from_name(street); IF word_ids is not null THEN - parent_place_id := getNearestNamedRoadFeature(partition, centroid, word_ids); + parent_place_id := getNearestNamedRoadPlaceId(partition, centroid, word_ids); IF parent_place_id is not null THEN --DEBUG: RAISE WARNING 'Get parent form addr:street: %', parent.place_id; RETURN parent_place_id; @@ -274,7 +274,7 @@ BEGIN IF place is not null THEN word_ids := word_ids_from_name(place); IF word_ids is not null THEN - parent_place_id := getNearestNamedPlaceFeature(partition, centroid, word_ids); + parent_place_id := getNearestNamedPlacePlaceId(partition, centroid, word_ids); IF parent_place_id is not null THEN --DEBUG: RAISE WARNING 'Get parent form addr:place: %', parent.place_id; RETURN parent_place_id; diff --git a/sql/partition-functions.src.sql b/sql/partition-functions.src.sql index 50f50db4..41758c83 100644 --- a/sql/partition-functions.src.sql +++ b/sql/partition-functions.src.sql @@ -82,7 +82,7 @@ END $$ LANGUAGE plpgsql; -CREATE OR REPLACE FUNCTION getNearestNamedRoadFeature(in_partition INTEGER, +CREATE OR REPLACE FUNCTION getNearestNamedRoadPlaceId(in_partition INTEGER, point GEOMETRY, isin_token INTEGER[]) RETURNS BIGINT @@ -108,7 +108,7 @@ END $$ LANGUAGE plpgsql STABLE; -CREATE OR REPLACE FUNCTION getNearestNamedPlaceFeature(in_partition INTEGER, +CREATE OR REPLACE FUNCTION getNearestNamedPlacePlaceId(in_partition INTEGER, point GEOMETRY, isin_token INTEGER[]) RETURNS BIGINT diff --git a/sql/tiger_import_start.sql b/sql/tiger_import_start.sql index c5246854..b9c4fcfc 100644 --- a/sql/tiger_import_start.sql +++ b/sql/tiger_import_start.sql @@ -58,7 +58,7 @@ BEGIN address_street_word_ids := word_ids_from_name(in_street); IF address_street_word_ids IS NOT NULL THEN - out_parent_place_id := getNearestNamedRoadFeature(out_partition, place_centroid, + out_parent_place_id := getNearestNamedRoadPlaceId(out_partition, place_centroid, address_street_word_ids); END IF;