mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-12-28 23:42:59 +03:00
disable unused function get_coonected_ways()
interferes with testing because of a reverse dependency on planet_osm_ways
This commit is contained in:
parent
fcc731dcd4
commit
a27bf64a55
@ -2336,29 +2336,29 @@ 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_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 $$
|
||||
|
Loading…
Reference in New Issue
Block a user