Adds limit 1 to _geocode_ip_point
This commit is contained in:
parent
66fd33da37
commit
24c0e01b06
@ -30,10 +30,13 @@ CREATE OR REPLACE FUNCTION _geocode_ip_point(ip TEXT)
|
|||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
DECLARE
|
DECLARE
|
||||||
ret Geometry;
|
ret Geometry;
|
||||||
|
|
||||||
|
LIM INTEGER := 1;
|
||||||
BEGIN
|
BEGIN
|
||||||
SELECT ips.the_geom as geom INTO ret
|
SELECT ips.the_geom as geom INTO ret
|
||||||
FROM public.ip_address_locations ips
|
FROM public.ip_address_locations ips
|
||||||
WHERE ips.network_start_ip = ip::inet;
|
WHERE ips.network_start_ip = ip::inet
|
||||||
|
LIMIT LIM;
|
||||||
|
|
||||||
RETURN ret;
|
RETURN ret;
|
||||||
END
|
END
|
||||||
|
Loading…
Reference in New Issue
Block a user