From: Sarah Hoffmann Date: Wed, 26 Feb 2020 09:42:30 +0000 (+0100) Subject: remove unused nearfeature types X-Git-Tag: v3.5.0~71^2~1 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/bdaa39573ffe032214ec31f763ec0110401d7e4f?ds=sidebyside remove unused nearfeature types Also move the remaining nearfeaturecentr type close to the function that is using it. --- diff --git a/sql/partition-functions.src.sql b/sql/partition-functions.src.sql index dbe34363..07e99c97 100644 --- a/sql/partition-functions.src.sql +++ b/sql/partition-functions.src.sql @@ -1,3 +1,15 @@ +DROP TYPE IF EXISTS nearfeaturecentr CASCADE; +CREATE TYPE nearfeaturecentr AS ( + place_id BIGINT, + keywords int[], + rank_address smallint, + rank_search smallint, + distance float, + isguess boolean, + postcode TEXT, + centroid GEOMETRY +); + create or replace function getNearFeatures(in_partition INTEGER, feature GEOMETRY, maxrank INTEGER, isin_tokens INT[]) RETURNS setof nearfeaturecentr AS $$ DECLARE r nearfeaturecentr%rowtype; diff --git a/sql/partition-tables.src.sql b/sql/partition-tables.src.sql index 57806898..8749243e 100644 --- a/sql/partition-tables.src.sql +++ b/sql/partition-tables.src.sql @@ -1,30 +1,3 @@ -drop type if exists nearplace cascade; -create type nearplace as ( - place_id BIGINT -); - -drop type if exists nearfeature cascade; -create type nearfeature as ( - place_id BIGINT, - keywords int[], - rank_address smallint, - rank_search smallint, - distance float, - isguess boolean -); - -drop type if exists nearfeaturecentr cascade; -create type nearfeaturecentr as ( - place_id BIGINT, - keywords int[], - rank_address smallint, - rank_search smallint, - distance float, - isguess boolean, - postcode TEXT, - centroid GEOMETRY -); - drop table IF EXISTS search_name_blank CASCADE; CREATE TABLE search_name_blank ( place_id BIGINT,