]> git.openstreetmap.org Git - nominatim.git/commitdiff
remove unused nearfeature types
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 26 Feb 2020 09:42:30 +0000 (10:42 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 26 Feb 2020 10:01:29 +0000 (11:01 +0100)
Also move the remaining nearfeaturecentr type close to the
function that is using it.

sql/partition-functions.src.sql
sql/partition-tables.src.sql

index dbe34363d70b5147053ec42b27ca1253f867af43..07e99c97b97b21fa33e8c499452e038ea469b002 100644 (file)
@@ -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;
index 57806898e14bb57a5c38fe4ea45798a753f3326f..8749243e5f8fb94402685d52463912cd1253a1bf 100644 (file)
@@ -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,