]> git.openstreetmap.org Git - nominatim.git/commitdiff
remove unused functions
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 16 Jan 2015 20:36:35 +0000 (21:36 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 16 Jan 2015 20:36:35 +0000 (21:36 +0100)
sql/functions.sql

index a4a7f116e187d065fc462a598f3b6c0da0777315..fc83f9a171c257d1e5ee949622c502847b6605b7 100644 (file)
@@ -474,31 +474,6 @@ END;
 $$
 LANGUAGE plpgsql IMMUTABLE;
 
-CREATE OR REPLACE FUNCTION get_word_score(wordscores wordscore[], words text[]) RETURNS integer
-  AS $$
-DECLARE
-  idxword integer;
-  idxscores integer;
-  result integer;
-BEGIN
-  IF (wordscores is null OR words is null) THEN
-    RETURN 0;
-  END IF;
-
-  result := 0;
-  FOR idxword in 1 .. array_upper(words, 1) LOOP
-    FOR idxscores in 1 .. array_upper(wordscores, 1) LOOP
-      IF wordscores[idxscores].word = words[idxword] THEN
-        result := result + wordscores[idxscores].score;
-      END IF;
-    END LOOP;
-  END LOOP;
-
-  RETURN result;
-END;
-$$
-LANGUAGE plpgsql IMMUTABLE;
-
 CREATE OR REPLACE FUNCTION get_country_code(place geometry) RETURNS TEXT
   AS $$
 DECLARE
@@ -1248,8 +1223,6 @@ DECLARE
   search_maxdistance FLOAT[];
   search_mindistance FLOAT[];
   address_havelevel BOOLEAN[];
---  search_scores wordscore[];
---  search_scores_pos INTEGER;
 
   i INTEGER;
   iMax FLOAT;
@@ -2321,29 +2294,6 @@ END;
 $$
 LANGUAGE plpgsql IMMUTABLE;
 
---CREATE OR REPLACE FUNCTION get_connected_ways(way_ids INTEGER[]) RETURNS SETOF planet_osm_ways
---  AS $$
---DECLARE
---  searchnodes INTEGER[];
---  location RECORD;
---  j INTEGER;
---BEGIN
---
---  searchnodes := '{}';
---  FOR j IN 1..array_upper(way_ids, 1) LOOP
---    FOR location IN
---      select nodes from planet_osm_ways where id = way_ids[j] LIMIT 1
---    LOOP
---      IF not (ARRAY[location.nodes] <@ searchnodes) THEN
---        searchnodes := searchnodes || location.nodes;
---      END IF;
---    END LOOP;
---  END LOOP;
---
---  RETURN QUERY select * from planet_osm_ways where nodes && searchnodes and NOT ARRAY[id] <@ way_ids;
---END;
---$$
---LANGUAGE plpgsql IMMUTABLE;
 
 CREATE OR REPLACE FUNCTION get_address_postcode(for_place_id BIGINT) RETURNS TEXT
   AS $$