Fixed tests
This commit is contained in:
parent
603d691017
commit
8a8970efa8
@ -2,16 +2,16 @@
|
|||||||
-- Add to the search path the schema
|
-- Add to the search path the schema
|
||||||
SET search_path TO public,cartodb,cdb_dataservices_client;
|
SET search_path TO public,cartodb,cdb_dataservices_client;
|
||||||
-- Mock the server function
|
-- Mock the server function
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_admin0_polygon(username text, orgname text, country_name text)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_admin0_polygon(username text, orgname text, appname text, country_name text)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_admin0_polygon invoked with params (%, %, %)', username, orgname, country_name;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_admin0_polygon invoked with params (%, %, %, %)', username, orgname, appname, country_name;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
-- Exercise the public and the proxied function
|
-- Exercise the public and the proxied function
|
||||||
SELECT cdb_geocode_admin0_polygon('Spain');
|
SELECT cdb_geocode_admin0_polygon('Spain');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_admin0_polygon(3): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_admin0_polygon invoked with params (test_user, <NULL>, Spain)
|
NOTICE: cdb_dataservices_client._cdb_geocode_admin0_polygon(4): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_admin0_polygon invoked with params (test_user, <NULL>, <NULL>, Spain)
|
||||||
cdb_geocode_admin0_polygon
|
cdb_geocode_admin0_polygon
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
|
@ -2,30 +2,30 @@
|
|||||||
-- Add to the search path the schema
|
-- Add to the search path the schema
|
||||||
SET search_path TO public,cartodb,cdb_dataservices_client;
|
SET search_path TO public,cartodb,cdb_dataservices_client;
|
||||||
-- Mock the server functions
|
-- Mock the server functions
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_admin1_polygon(username text, orgname text, admin1_name text)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_admin1_polygon(username text, orgname text, appname text, admin1_name text)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_admin1_polygon invoked with params (%, %, %)', username, orgname, admin1_name;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_admin1_polygon invoked with params (%, %, %, %)', username, orgname, appname, admin1_name;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_admin1_polygon(username text, orgname text, admin1_name text, country_name text)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_admin1_polygon(username text, orgname text, appname text, admin1_name text, country_name text)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_admin1_polygon invoked with params (%, %, %, %)', username, orgname, admin1_name, country_name;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_admin1_polygon invoked with params (%, %, %, %, %)', username, orgname, appname, admin1_name, country_name;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
-- Exercise the public and the proxied function
|
-- Exercise the public and the proxied function
|
||||||
SELECT cdb_geocode_admin1_polygon('California');
|
SELECT cdb_geocode_admin1_polygon('California');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_admin1_polygon(3): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_admin1_polygon invoked with params (test_user, <NULL>, California)
|
NOTICE: cdb_dataservices_client._cdb_geocode_admin1_polygon(4): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_admin1_polygon invoked with params (test_user, <NULL>, <NULL>, California)
|
||||||
cdb_geocode_admin1_polygon
|
cdb_geocode_admin1_polygon
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_admin1_polygon('California', 'United States');
|
SELECT cdb_geocode_admin1_polygon('California', 'United States');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_admin1_polygon(4): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_admin1_polygon invoked with params (test_user, <NULL>, California, United States)
|
NOTICE: cdb_dataservices_client._cdb_geocode_admin1_polygon(5): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_admin1_polygon invoked with params (test_user, <NULL>, <NULL>, California, United States)
|
||||||
cdb_geocode_admin1_polygon
|
cdb_geocode_admin1_polygon
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
|
@ -2,20 +2,20 @@
|
|||||||
SET client_min_messages TO warning;
|
SET client_min_messages TO warning;
|
||||||
SET search_path TO public,cartodb,cdb_dataservices_client;
|
SET search_path TO public,cartodb,cdb_dataservices_client;
|
||||||
-- Mock the server functions to raise exceptions
|
-- Mock the server functions to raise exceptions
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_street_point (username text, orgname text, searchtext text, city text DEFAULT NULL, state_province text DEFAULT NULL, country text DEFAULT NULL)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_street_point (username text, orgname text, appname text, searchtext text, city text DEFAULT NULL, state_province text DEFAULT NULL, country text DEFAULT NULL)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE EXCEPTION 'Not enough quota or any other exception whatsoever.';
|
RAISE EXCEPTION 'Not enough quota or any other exception whatsoever.';
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_isodistance(username text, orgname text, source geometry, mode text, range integer[], options text[] DEFAULT ARRAY[]::text[])
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_isodistance(username text, orgname text, appname text, source geometry, mode text, range integer[], options text[] DEFAULT ARRAY[]::text[])
|
||||||
RETURNS SETOF isoline AS $$
|
RETURNS SETOF isoline AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE EXCEPTION 'Not enough quota or any other exception whatsoever.';
|
RAISE EXCEPTION 'Not enough quota or any other exception whatsoever.';
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_route_point_to_point (username text, orgname text, origin geometry(Point, 4326), destination geometry(Point, 4326), mode TEXT, options text[] DEFAULT ARRAY[]::text[], units text DEFAULT 'kilometers')
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_route_point_to_point (username text, orgname text, appname text, origin geometry(Point, 4326), destination geometry(Point, 4326), mode TEXT, options text[] DEFAULT ARRAY[]::text[], units text DEFAULT 'kilometers')
|
||||||
RETURNS cdb_dataservices_client.simple_route AS $$
|
RETURNS cdb_dataservices_client.simple_route AS $$
|
||||||
DECLARE
|
DECLARE
|
||||||
ret cdb_dataservices_client.simple_route;
|
ret cdb_dataservices_client.simple_route;
|
||||||
@ -31,20 +31,20 @@ $$ LANGUAGE 'plpgsql';
|
|||||||
SET ROLE test_regular_user;
|
SET ROLE test_regular_user;
|
||||||
-- Exercise the exception safe and the proxied functions
|
-- Exercise the exception safe and the proxied functions
|
||||||
SELECT _cdb_geocode_street_point_exception_safe('One street, 1');
|
SELECT _cdb_geocode_street_point_exception_safe('One street, 1');
|
||||||
WARNING: cdb_dataservices_client._cdb_geocode_street_point(6): [contrib_regression] REMOTE ERROR: Not enough quota or any other exception whatsoever.
|
WARNING: cdb_dataservices_client._cdb_geocode_street_point(7): [contrib_regression] REMOTE ERROR: Not enough quota or any other exception whatsoever.
|
||||||
_cdb_geocode_street_point_exception_safe
|
_cdb_geocode_street_point_exception_safe
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT * FROM _cdb_isodistance_exception_safe('POINT(-3.70568 40.42028)'::geometry, 'walk', ARRAY[300]::integer[]);
|
SELECT * FROM _cdb_isodistance_exception_safe('POINT(-3.70568 40.42028)'::geometry, 'walk', ARRAY[300]::integer[]);
|
||||||
WARNING: cdb_dataservices_client._cdb_isodistance(6): [contrib_regression] REMOTE ERROR: Not enough quota or any other exception whatsoever.
|
WARNING: cdb_dataservices_client._cdb_isodistance(7): [contrib_regression] REMOTE ERROR: Not enough quota or any other exception whatsoever.
|
||||||
center | data_range | the_geom
|
center | data_range | the_geom
|
||||||
--------+------------+----------
|
--------+------------+----------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
SELECT * FROM _cdb_route_point_to_point_exception_safe('POINT(-3.70237112 40.41706163)'::geometry,'POINT(-3.69909883 40.41236875)'::geometry, 'car', ARRAY['mode_type=shortest']::text[]);
|
SELECT * FROM _cdb_route_point_to_point_exception_safe('POINT(-3.70237112 40.41706163)'::geometry,'POINT(-3.69909883 40.41236875)'::geometry, 'car', ARRAY['mode_type=shortest']::text[]);
|
||||||
WARNING: cdb_dataservices_client._cdb_route_point_to_point(7): [contrib_regression] REMOTE ERROR: Not enough quota or any other exception whatsoever.
|
WARNING: cdb_dataservices_client._cdb_route_point_to_point(8): [contrib_regression] REMOTE ERROR: Not enough quota or any other exception whatsoever.
|
||||||
shape | length | duration
|
shape | length | duration
|
||||||
-------+--------+----------
|
-------+--------+----------
|
||||||
| |
|
| |
|
||||||
|
@ -2,44 +2,44 @@
|
|||||||
-- Add to the search path the schema
|
-- Add to the search path the schema
|
||||||
SET search_path TO public,cartodb,cdb_dataservices_client;
|
SET search_path TO public,cartodb,cdb_dataservices_client;
|
||||||
-- Mock the server functions
|
-- Mock the server functions
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_namedplace_point(username text, orgname text, city_name text)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_namedplace_point(username text, orgname text, appname text, city_name text)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (%, %, %)', username, orgname, city_name;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (%, %, %, %)', username, orgname, appname, city_name;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_namedplace_point(username text, orgname text, city_name text, country_name text)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_namedplace_point(username text, orgname text, appname text, city_name text, country_name text)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (%, %, %, %)', username, orgname, city_name, country_name;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (%, %, %, %, %)', username, orgname, appname, city_name, country_name;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_namedplace_point(username text, orgname text, city_name text, admin1_name text, country_name text)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_namedplace_point(username text, orgname text, appname text, city_name text, admin1_name text, country_name text)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (%, %, %, %, %)', username, orgname, city_name, admin1_name, country_name;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (%, %, %, %, %, %)', username, orgname, appname, city_name, admin1_name, country_name;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
-- Exercise the public and the proxied function
|
-- Exercise the public and the proxied function
|
||||||
SELECT cdb_geocode_namedplace_point('Elx');
|
SELECT cdb_geocode_namedplace_point('Elx');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_namedplace_point(3): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (test_user, <NULL>, Elx)
|
NOTICE: cdb_dataservices_client._cdb_geocode_namedplace_point(4): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (test_user, <NULL>, <NULL>, Elx)
|
||||||
cdb_geocode_namedplace_point
|
cdb_geocode_namedplace_point
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_namedplace_point('Elx', 'Spain');
|
SELECT cdb_geocode_namedplace_point('Elx', 'Spain');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_namedplace_point(4): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (test_user, <NULL>, Elx, Spain)
|
NOTICE: cdb_dataservices_client._cdb_geocode_namedplace_point(5): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (test_user, <NULL>, <NULL>, Elx, Spain)
|
||||||
cdb_geocode_namedplace_point
|
cdb_geocode_namedplace_point
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_namedplace_point('Elx', 'Valencia', 'Spain');
|
SELECT cdb_geocode_namedplace_point('Elx', 'Valencia', 'Spain');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_namedplace_point(5): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (test_user, <NULL>, Elx, Valencia, Spain)
|
NOTICE: cdb_dataservices_client._cdb_geocode_namedplace_point(6): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (test_user, <NULL>, <NULL>, Elx, Valencia, Spain)
|
||||||
cdb_geocode_namedplace_point
|
cdb_geocode_namedplace_point
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
|
@ -2,30 +2,30 @@
|
|||||||
-- Add to the search path the schema
|
-- Add to the search path the schema
|
||||||
SET search_path TO public,cartodb,cdb_dataservices_client;
|
SET search_path TO public,cartodb,cdb_dataservices_client;
|
||||||
-- Mock the server functions
|
-- Mock the server functions
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_postalcode_polygon(username text, orgname text, postal_code text, country_name text)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_postalcode_polygon(username text, orgname text, appname text, postal_code text, country_name text)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_postalcode_polygon invoked with params (%, %, %, %)', username, orgname, postal_code, country_name;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_postalcode_polygon invoked with params (%, %, %, %, %)', username, orgname, appname, postal_code, country_name;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_postalcode_point(username text, orgname text, postal_code text, country_name text)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_postalcode_point(username text, orgname text, appname text, postal_code text, country_name text)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_postalcode_point invoked with params (%, %, %, %)', username, orgname, postal_code, country_name;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_postalcode_point invoked with params (%, %, %, %, %)', username, orgname, appname, postal_code, country_name;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
-- Exercise the public and the proxied function
|
-- Exercise the public and the proxied function
|
||||||
SELECT cdb_geocode_postalcode_polygon('03204', 'Spain');
|
SELECT cdb_geocode_postalcode_polygon('03204', 'Spain');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_postalcode_polygon(4): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_postalcode_polygon invoked with params (test_user, <NULL>, 03204, Spain)
|
NOTICE: cdb_dataservices_client._cdb_geocode_postalcode_polygon(5): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_postalcode_polygon invoked with params (test_user, <NULL>, <NULL>, 03204, Spain)
|
||||||
cdb_geocode_postalcode_polygon
|
cdb_geocode_postalcode_polygon
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_postalcode_point('03204', 'Spain');
|
SELECT cdb_geocode_postalcode_point('03204', 'Spain');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_postalcode_point(4): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_postalcode_point invoked with params (test_user, <NULL>, 03204, Spain)
|
NOTICE: cdb_dataservices_client._cdb_geocode_postalcode_point(5): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_postalcode_point invoked with params (test_user, <NULL>, <NULL>, 03204, Spain)
|
||||||
cdb_geocode_postalcode_point
|
cdb_geocode_postalcode_point
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
|
@ -2,16 +2,16 @@
|
|||||||
-- Add to the search path the schema
|
-- Add to the search path the schema
|
||||||
SET search_path TO public,cartodb,cdb_dataservices_client;
|
SET search_path TO public,cartodb,cdb_dataservices_client;
|
||||||
-- Mock the server functions
|
-- Mock the server functions
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_ipaddress_point(username text, orgname text, ip_address text)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_ipaddress_point(username text, orgname text, appname text, ip_address text)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_ipaddress_point invoked with params (%, %, %)', username, orgname, ip_address;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_ipaddress_point invoked with params (%, %, %, %)', username, orgname, appname, ip_address;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
-- Exercise the public and the proxied function
|
-- Exercise the public and the proxied function
|
||||||
SELECT cdb_geocode_ipaddress_point('8.8.8.8');
|
SELECT cdb_geocode_ipaddress_point('8.8.8.8');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_ipaddress_point(3): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_ipaddress_point invoked with params (test_user, <NULL>, 8.8.8.8)
|
NOTICE: cdb_dataservices_client._cdb_geocode_ipaddress_point(4): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_ipaddress_point invoked with params (test_user, <NULL>, <NULL>, 8.8.8.8)
|
||||||
cdb_geocode_ipaddress_point
|
cdb_geocode_ipaddress_point
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
|
@ -2,79 +2,79 @@
|
|||||||
-- Add to the search path the schema
|
-- Add to the search path the schema
|
||||||
SET search_path TO public,cartodb,cdb_dataservices_client;
|
SET search_path TO public,cartodb,cdb_dataservices_client;
|
||||||
-- Mock the server functions
|
-- Mock the server functions
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_street_point (username text, orgname text, searchtext text, city text DEFAULT NULL, state_province text DEFAULT NULL, country text DEFAULT NULL)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_street_point (username text, orgname text, appname text, searchtext text, city text DEFAULT NULL, state_province text DEFAULT NULL, country text DEFAULT NULL)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (%, %, %, %, %, %)', username, orgname, searchtext, city, state_province, country;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (%, %, %, %, %, %, %)', username, orgname, appname, searchtext, city, state_province, country;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
-- Exercise the public and the proxied function
|
-- Exercise the public and the proxied function
|
||||||
SELECT cdb_geocode_street_point('One street, 1');
|
SELECT cdb_geocode_street_point('One street, 1');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(6): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, One street, 1, <NULL>, <NULL>, <NULL>)
|
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(7): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, <NULL>, One street, 1, <NULL>, <NULL>, <NULL>)
|
||||||
cdb_geocode_street_point
|
cdb_geocode_street_point
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_street_point('One street', 'city');
|
SELECT cdb_geocode_street_point('One street', 'city');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(6): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, One street, city, <NULL>, <NULL>)
|
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(7): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, <NULL>, One street, city, <NULL>, <NULL>)
|
||||||
cdb_geocode_street_point
|
cdb_geocode_street_point
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_street_point('One street', 'city', 'state');
|
SELECT cdb_geocode_street_point('One street', 'city', 'state');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(6): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, One street, city, state, <NULL>)
|
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(7): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, <NULL>, One street, city, state, <NULL>)
|
||||||
cdb_geocode_street_point
|
cdb_geocode_street_point
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_street_point('One street', 'city', 'state', 'country');
|
SELECT cdb_geocode_street_point('One street', 'city', 'state', 'country');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(6): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, One street, city, state, country)
|
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(7): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, <NULL>, One street, city, state, country)
|
||||||
cdb_geocode_street_point
|
cdb_geocode_street_point
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_street_point('One street', 'city', NULL, 'country');
|
SELECT cdb_geocode_street_point('One street', 'city', NULL, 'country');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(6): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, One street, city, <NULL>, country)
|
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(7): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, <NULL>, One street, city, <NULL>, country)
|
||||||
cdb_geocode_street_point
|
cdb_geocode_street_point
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_street_point('One street, 1');
|
SELECT cdb_geocode_street_point('One street, 1');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(6): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, One street, 1, <NULL>, <NULL>, <NULL>)
|
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(7): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, <NULL>, One street, 1, <NULL>, <NULL>, <NULL>)
|
||||||
cdb_geocode_street_point
|
cdb_geocode_street_point
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_street_point('One street', 'city');
|
SELECT cdb_geocode_street_point('One street', 'city');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(6): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, One street, city, <NULL>, <NULL>)
|
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(7): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, <NULL>, One street, city, <NULL>, <NULL>)
|
||||||
cdb_geocode_street_point
|
cdb_geocode_street_point
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_street_point('One street', 'city', 'state');
|
SELECT cdb_geocode_street_point('One street', 'city', 'state');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(6): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, One street, city, state, <NULL>)
|
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(7): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, <NULL>, One street, city, state, <NULL>)
|
||||||
cdb_geocode_street_point
|
cdb_geocode_street_point
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_street_point('One street', 'city', 'state', 'country');
|
SELECT cdb_geocode_street_point('One street', 'city', 'state', 'country');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(6): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, One street, city, state, country)
|
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(7): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, <NULL>, One street, city, state, country)
|
||||||
cdb_geocode_street_point
|
cdb_geocode_street_point
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_street_point('One street', 'city', NULL, 'country');
|
SELECT cdb_geocode_street_point('One street', 'city', NULL, 'country');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(6): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, One street, city, <NULL>, country)
|
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(7): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, <NULL>, One street, city, <NULL>, country)
|
||||||
cdb_geocode_street_point
|
cdb_geocode_street_point
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
|
@ -2,64 +2,64 @@
|
|||||||
-- Add to the search path the schema
|
-- Add to the search path the schema
|
||||||
SET search_path TO public,cartodb,cdb_dataservices_client;
|
SET search_path TO public,cartodb,cdb_dataservices_client;
|
||||||
-- Mock the server functions
|
-- Mock the server functions
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_route_point_to_point (username text, orgname text, origin geometry(Point, 4326), destination geometry(Point, 4326), mode TEXT, options text[] DEFAULT ARRAY[]::text[], units text DEFAULT 'kilometers')
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_route_point_to_point (username text, orgname text, appname text, origin geometry(Point, 4326), destination geometry(Point, 4326), mode TEXT, options text[] DEFAULT ARRAY[]::text[], units text DEFAULT 'kilometers')
|
||||||
RETURNS cdb_dataservices_client.simple_route AS $$
|
RETURNS cdb_dataservices_client.simple_route AS $$
|
||||||
DECLARE
|
DECLARE
|
||||||
ret cdb_dataservices_client.simple_route;
|
ret cdb_dataservices_client.simple_route;
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_route_point_to_point invoked with params (%, %, %, %, %, %, %)', username, orgname, origin, destination, mode, options, units;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_route_point_to_point invoked with params (%, %, %, %, %, %, %, %)', username, orgname, appname, origin, destination, mode, options, units;
|
||||||
SELECT NULL, 5.33, 100 INTO ret;
|
SELECT NULL, 5.33, 100 INTO ret;
|
||||||
RETURN ret;
|
RETURN ret;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_route_with_waypoints(username text, orgname text, waypoints geometry(Point, 4326)[], mode TEXT, options text[] DEFAULT ARRAY[]::text[], units text DEFAULT 'kilometers')
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_route_with_waypoints(username text, orgname text, appname text, waypoints geometry(Point, 4326)[], mode TEXT, options text[] DEFAULT ARRAY[]::text[], units text DEFAULT 'kilometers')
|
||||||
RETURNS cdb_dataservices_client.simple_route AS $$
|
RETURNS cdb_dataservices_client.simple_route AS $$
|
||||||
DECLARE
|
DECLARE
|
||||||
ret cdb_dataservices_client.simple_route;
|
ret cdb_dataservices_client.simple_route;
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_route_with_waypoints invoked with params (%, %, %, %, %, %)', username, orgname, waypoints, mode, options, units;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_route_with_waypoints invoked with params (%, %, %, %, %, %, %)', username, orgname, appname, waypoints, mode, options, units;
|
||||||
SELECT NULL, 2.22, 500 INTO ret;
|
SELECT NULL, 2.22, 500 INTO ret;
|
||||||
RETURN ret;
|
RETURN ret;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
-- Exercise the public and the proxied functions
|
-- Exercise the public and the proxied functions
|
||||||
SELECT cdb_route_point_to_point('POINT(-87.81406 41.89308)'::geometry,'POINT(-87.79209 41.86138)'::geometry, 'car');
|
SELECT cdb_route_point_to_point('POINT(-87.81406 41.89308)'::geometry,'POINT(-87.79209 41.86138)'::geometry, 'car');
|
||||||
NOTICE: cdb_dataservices_client._cdb_route_point_to_point(7): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_route_point_to_point invoked with params (test_user, <NULL>, 0101000000D53E1D8F19F455C0185B087250F24440, 0101000000465F419AB1F255C0D8B628B341EE4440, car, {}, kilometers)
|
NOTICE: cdb_dataservices_client._cdb_route_point_to_point(8): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_route_point_to_point invoked with params (test_user, <NULL>, <NULL>, 0101000000D53E1D8F19F455C0185B087250F24440, 0101000000465F419AB1F255C0D8B628B341EE4440, car, {}, kilometers)
|
||||||
cdb_route_point_to_point
|
cdb_route_point_to_point
|
||||||
--------------------------
|
--------------------------
|
||||||
(,5.33,100)
|
(,5.33,100)
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_route_point_to_point('POINT(-87.81406 41.89308)'::geometry,'POINT(-87.79209 41.86138)'::geometry, 'car', ARRAY['mode_type=shortest']::text[]);
|
SELECT cdb_route_point_to_point('POINT(-87.81406 41.89308)'::geometry,'POINT(-87.79209 41.86138)'::geometry, 'car', ARRAY['mode_type=shortest']::text[]);
|
||||||
NOTICE: cdb_dataservices_client._cdb_route_point_to_point(7): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_route_point_to_point invoked with params (test_user, <NULL>, 0101000000D53E1D8F19F455C0185B087250F24440, 0101000000465F419AB1F255C0D8B628B341EE4440, car, {mode_type=shortest}, kilometers)
|
NOTICE: cdb_dataservices_client._cdb_route_point_to_point(8): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_route_point_to_point invoked with params (test_user, <NULL>, <NULL>, 0101000000D53E1D8F19F455C0185B087250F24440, 0101000000465F419AB1F255C0D8B628B341EE4440, car, {mode_type=shortest}, kilometers)
|
||||||
cdb_route_point_to_point
|
cdb_route_point_to_point
|
||||||
--------------------------
|
--------------------------
|
||||||
(,5.33,100)
|
(,5.33,100)
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_route_point_to_point('POINT(-87.81406 41.89308)'::geometry,'POINT(-87.79209 41.86138)'::geometry, 'car', ARRAY[]::text[], 'miles');
|
SELECT cdb_route_point_to_point('POINT(-87.81406 41.89308)'::geometry,'POINT(-87.79209 41.86138)'::geometry, 'car', ARRAY[]::text[], 'miles');
|
||||||
NOTICE: cdb_dataservices_client._cdb_route_point_to_point(7): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_route_point_to_point invoked with params (test_user, <NULL>, 0101000000D53E1D8F19F455C0185B087250F24440, 0101000000465F419AB1F255C0D8B628B341EE4440, car, {}, miles)
|
NOTICE: cdb_dataservices_client._cdb_route_point_to_point(8): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_route_point_to_point invoked with params (test_user, <NULL>, <NULL>, 0101000000D53E1D8F19F455C0185B087250F24440, 0101000000465F419AB1F255C0D8B628B341EE4440, car, {}, miles)
|
||||||
cdb_route_point_to_point
|
cdb_route_point_to_point
|
||||||
--------------------------
|
--------------------------
|
||||||
(,5.33,100)
|
(,5.33,100)
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_route_with_waypoints(Array['POINT(-87.81406 41.89308)'::geometry,'POINT(-87.80406 41.87308)'::geometry,'POINT(-87.79209 41.86138)'::geometry], 'car');
|
SELECT cdb_route_with_waypoints(Array['POINT(-87.81406 41.89308)'::geometry,'POINT(-87.80406 41.87308)'::geometry,'POINT(-87.79209 41.86138)'::geometry], 'car');
|
||||||
NOTICE: cdb_dataservices_client._cdb_route_with_waypoints(6): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_route_with_waypoints invoked with params (test_user, <NULL>, {0101000000D53E1D8F19F455C0185B087250F24440:0101000000650113B875F355C05665DF15C1EF4440:0101000000465F419AB1F255C0D8B628B341EE4440}, car, {}, kilometers)
|
NOTICE: cdb_dataservices_client._cdb_route_with_waypoints(7): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_route_with_waypoints invoked with params (test_user, <NULL>, <NULL>, {0101000000D53E1D8F19F455C0185B087250F24440:0101000000650113B875F355C05665DF15C1EF4440:0101000000465F419AB1F255C0D8B628B341EE4440}, car, {}, kilometers)
|
||||||
cdb_route_with_waypoints
|
cdb_route_with_waypoints
|
||||||
--------------------------
|
--------------------------
|
||||||
(,2.22,500)
|
(,2.22,500)
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_route_with_waypoints(Array['POINT(-87.81406 41.89308)'::geometry,'POINT(-87.80406 41.87308)'::geometry,'POINT(-87.79209 41.86138)'::geometry], 'car', ARRAY['mode_type=shortest']::text[]);
|
SELECT cdb_route_with_waypoints(Array['POINT(-87.81406 41.89308)'::geometry,'POINT(-87.80406 41.87308)'::geometry,'POINT(-87.79209 41.86138)'::geometry], 'car', ARRAY['mode_type=shortest']::text[]);
|
||||||
NOTICE: cdb_dataservices_client._cdb_route_with_waypoints(6): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_route_with_waypoints invoked with params (test_user, <NULL>, {0101000000D53E1D8F19F455C0185B087250F24440:0101000000650113B875F355C05665DF15C1EF4440:0101000000465F419AB1F255C0D8B628B341EE4440}, car, {mode_type=shortest}, kilometers)
|
NOTICE: cdb_dataservices_client._cdb_route_with_waypoints(7): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_route_with_waypoints invoked with params (test_user, <NULL>, <NULL>, {0101000000D53E1D8F19F455C0185B087250F24440:0101000000650113B875F355C05665DF15C1EF4440:0101000000465F419AB1F255C0D8B628B341EE4440}, car, {mode_type=shortest}, kilometers)
|
||||||
cdb_route_with_waypoints
|
cdb_route_with_waypoints
|
||||||
--------------------------
|
--------------------------
|
||||||
(,2.22,500)
|
(,2.22,500)
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_route_with_waypoints(Array['POINT(-87.81406 41.89308)'::geometry,'POINT(-87.80406 41.87308)'::geometry,'POINT(-87.79209 41.86138)'::geometry], 'car', ARRAY[]::text[], 'miles');
|
SELECT cdb_route_with_waypoints(Array['POINT(-87.81406 41.89308)'::geometry,'POINT(-87.80406 41.87308)'::geometry,'POINT(-87.79209 41.86138)'::geometry], 'car', ARRAY[]::text[], 'miles');
|
||||||
NOTICE: cdb_dataservices_client._cdb_route_with_waypoints(6): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_route_with_waypoints invoked with params (test_user, <NULL>, {0101000000D53E1D8F19F455C0185B087250F24440:0101000000650113B875F355C05665DF15C1EF4440:0101000000465F419AB1F255C0D8B628B341EE4440}, car, {}, miles)
|
NOTICE: cdb_dataservices_client._cdb_route_with_waypoints(7): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_route_with_waypoints invoked with params (test_user, <NULL>, <NULL>, {0101000000D53E1D8F19F455C0185B087250F24440:0101000000650113B875F355C05665DF15C1EF4440:0101000000465F419AB1F255C0D8B628B341EE4440}, car, {}, miles)
|
||||||
cdb_route_with_waypoints
|
cdb_route_with_waypoints
|
||||||
--------------------------
|
--------------------------
|
||||||
(,2.22,500)
|
(,2.22,500)
|
||||||
|
@ -6,102 +6,102 @@ SET search_path TO public,cartodb,cdb_dataservices_client;
|
|||||||
-- Exercise the public function
|
-- Exercise the public function
|
||||||
-- it is public, it shall work
|
-- it is public, it shall work
|
||||||
SELECT cdb_geocode_admin0_polygon('Spain');
|
SELECT cdb_geocode_admin0_polygon('Spain');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_admin0_polygon(3): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_admin0_polygon invoked with params (test_user, <NULL>, Spain)
|
NOTICE: cdb_dataservices_client._cdb_geocode_admin0_polygon(4): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_admin0_polygon invoked with params (test_user, <NULL>, <NULL>, Spain)
|
||||||
cdb_geocode_admin0_polygon
|
cdb_geocode_admin0_polygon
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_admin1_polygon('California');
|
SELECT cdb_geocode_admin1_polygon('California');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_admin1_polygon(3): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_admin1_polygon invoked with params (test_user, <NULL>, California)
|
NOTICE: cdb_dataservices_client._cdb_geocode_admin1_polygon(4): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_admin1_polygon invoked with params (test_user, <NULL>, <NULL>, California)
|
||||||
cdb_geocode_admin1_polygon
|
cdb_geocode_admin1_polygon
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_admin1_polygon('California', 'United States');
|
SELECT cdb_geocode_admin1_polygon('California', 'United States');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_admin1_polygon(4): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_admin1_polygon invoked with params (test_user, <NULL>, California, United States)
|
NOTICE: cdb_dataservices_client._cdb_geocode_admin1_polygon(5): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_admin1_polygon invoked with params (test_user, <NULL>, <NULL>, California, United States)
|
||||||
cdb_geocode_admin1_polygon
|
cdb_geocode_admin1_polygon
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_namedplace_point('Elx');
|
SELECT cdb_geocode_namedplace_point('Elx');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_namedplace_point(3): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (test_user, <NULL>, Elx)
|
NOTICE: cdb_dataservices_client._cdb_geocode_namedplace_point(4): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (test_user, <NULL>, <NULL>, Elx)
|
||||||
cdb_geocode_namedplace_point
|
cdb_geocode_namedplace_point
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_namedplace_point('Elx', 'Valencia');
|
SELECT cdb_geocode_namedplace_point('Elx', 'Valencia');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_namedplace_point(4): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (test_user, <NULL>, Elx, Valencia)
|
NOTICE: cdb_dataservices_client._cdb_geocode_namedplace_point(5): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (test_user, <NULL>, <NULL>, Elx, Valencia)
|
||||||
cdb_geocode_namedplace_point
|
cdb_geocode_namedplace_point
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_namedplace_point('Elx', 'Valencia', 'Spain');
|
SELECT cdb_geocode_namedplace_point('Elx', 'Valencia', 'Spain');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_namedplace_point(5): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (test_user, <NULL>, Elx, Valencia, Spain)
|
NOTICE: cdb_dataservices_client._cdb_geocode_namedplace_point(6): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (test_user, <NULL>, <NULL>, Elx, Valencia, Spain)
|
||||||
cdb_geocode_namedplace_point
|
cdb_geocode_namedplace_point
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_postalcode_polygon('03204', 'Spain');
|
SELECT cdb_geocode_postalcode_polygon('03204', 'Spain');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_postalcode_polygon(4): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_postalcode_polygon invoked with params (test_user, <NULL>, 03204, Spain)
|
NOTICE: cdb_dataservices_client._cdb_geocode_postalcode_polygon(5): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_postalcode_polygon invoked with params (test_user, <NULL>, <NULL>, 03204, Spain)
|
||||||
cdb_geocode_postalcode_polygon
|
cdb_geocode_postalcode_polygon
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_postalcode_point('03204', 'Spain');
|
SELECT cdb_geocode_postalcode_point('03204', 'Spain');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_postalcode_point(4): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_postalcode_point invoked with params (test_user, <NULL>, 03204, Spain)
|
NOTICE: cdb_dataservices_client._cdb_geocode_postalcode_point(5): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_postalcode_point invoked with params (test_user, <NULL>, <NULL>, 03204, Spain)
|
||||||
cdb_geocode_postalcode_point
|
cdb_geocode_postalcode_point
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_ipaddress_point('8.8.8.8');
|
SELECT cdb_geocode_ipaddress_point('8.8.8.8');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_ipaddress_point(3): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_ipaddress_point invoked with params (test_user, <NULL>, 8.8.8.8)
|
NOTICE: cdb_dataservices_client._cdb_geocode_ipaddress_point(4): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_ipaddress_point invoked with params (test_user, <NULL>, <NULL>, 8.8.8.8)
|
||||||
cdb_geocode_ipaddress_point
|
cdb_geocode_ipaddress_point
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_geocode_street_point('one street, 1');
|
SELECT cdb_geocode_street_point('one street, 1');
|
||||||
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(6): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, one street, 1, <NULL>, <NULL>, <NULL>)
|
NOTICE: cdb_dataservices_client._cdb_geocode_street_point(7): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (test_user, <NULL>, <NULL>, one street, 1, <NULL>, <NULL>, <NULL>)
|
||||||
cdb_geocode_street_point
|
cdb_geocode_street_point
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cdb_route_point_to_point('POINT(-87.81406 41.89308)'::geometry,'POINT(-87.79209 41.86138)'::geometry, 'car');
|
SELECT cdb_route_point_to_point('POINT(-87.81406 41.89308)'::geometry,'POINT(-87.79209 41.86138)'::geometry, 'car');
|
||||||
NOTICE: cdb_dataservices_client._cdb_route_point_to_point(7): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_route_point_to_point invoked with params (test_user, <NULL>, 0101000000D53E1D8F19F455C0185B087250F24440, 0101000000465F419AB1F255C0D8B628B341EE4440, car, {}, kilometers)
|
NOTICE: cdb_dataservices_client._cdb_route_point_to_point(8): [contrib_regression] REMOTE NOTICE: cdb_dataservices_server.cdb_route_point_to_point invoked with params (test_user, <NULL>, <NULL>, 0101000000D53E1D8F19F455C0185B087250F24440, 0101000000465F419AB1F255C0D8B628B341EE4440, car, {}, kilometers)
|
||||||
cdb_route_point_to_point
|
cdb_route_point_to_point
|
||||||
--------------------------
|
--------------------------
|
||||||
(,5.33,100)
|
(,5.33,100)
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- Check the regular user has no permissions on private functions
|
-- Check the regular user has no permissions on private functions
|
||||||
SELECT _cdb_geocode_admin0_polygon('evil_user', 'evil_orgname', 'Hell');
|
SELECT _cdb_geocode_admin0_polygon('evil_user', 'evil_orgname', 'evil_appname', 'Hell');
|
||||||
ERROR: permission denied for function _cdb_geocode_admin0_polygon
|
ERROR: permission denied for function _cdb_geocode_admin0_polygon
|
||||||
SELECT _cdb_geocode_admin1_polygon('evil_user', 'evil_orgname', 'Hell');
|
SELECT _cdb_geocode_admin1_polygon('evil_user', 'evil_orgname', 'evil_appname', 'Hell');
|
||||||
ERROR: permission denied for function _cdb_geocode_admin1_polygon
|
ERROR: permission denied for function _cdb_geocode_admin1_polygon
|
||||||
SELECT _cdb_geocode_admin1_polygon('evil_user', 'evil_orgname', 'Sheol', 'Hell');
|
SELECT _cdb_geocode_admin1_polygon('evil_user', 'evil_orgname', 'evil_appname', 'Sheol', 'Hell');
|
||||||
ERROR: permission denied for function _cdb_geocode_admin1_polygon
|
ERROR: permission denied for function _cdb_geocode_admin1_polygon
|
||||||
SELECT _cdb_geocode_namedplace_point('evil_user', 'evil_orgname', 'Sheol');
|
SELECT _cdb_geocode_namedplace_point('evil_user', 'evil_orgname', 'evil_appname', 'Sheol');
|
||||||
ERROR: permission denied for function _cdb_geocode_namedplace_point
|
ERROR: permission denied for function _cdb_geocode_namedplace_point
|
||||||
SELECT _cdb_geocode_namedplace_point('evil_user', 'evil_orgname', 'Sheol', 'Hell');
|
SELECT _cdb_geocode_namedplace_point('evil_user', 'evil_orgname', 'evil_appname', 'Sheol', 'Hell');
|
||||||
ERROR: permission denied for function _cdb_geocode_namedplace_point
|
ERROR: permission denied for function _cdb_geocode_namedplace_point
|
||||||
SELECT _cdb_geocode_namedplace_point('evil_user', 'evil_orgname', 'Sheol', 'Hell', 'Ugly world');
|
SELECT _cdb_geocode_namedplace_point('evil_user', 'evil_orgname', 'evil_appname', 'Sheol', 'Hell', 'Ugly world');
|
||||||
ERROR: permission denied for function _cdb_geocode_namedplace_point
|
ERROR: permission denied for function _cdb_geocode_namedplace_point
|
||||||
SELECT _cdb_geocode_postalcode_polygon('evil_user', 'evil_orgname', '66666', 'Hell');
|
SELECT _cdb_geocode_postalcode_polygon('evil_user', 'evil_orgname', 'evil_appname', '66666', 'Hell');
|
||||||
ERROR: permission denied for function _cdb_geocode_postalcode_polygon
|
ERROR: permission denied for function _cdb_geocode_postalcode_polygon
|
||||||
SELECT _cdb_geocode_postalcode_point('evil_user', 'evil_orgname', '66666', 'Hell');
|
SELECT _cdb_geocode_postalcode_point('evil_user', 'evil_orgname', 'evil_appname', '66666', 'Hell');
|
||||||
ERROR: permission denied for function _cdb_geocode_postalcode_point
|
ERROR: permission denied for function _cdb_geocode_postalcode_point
|
||||||
SELECT _cdb_geocode_ipaddress_point('evil_user', 'evil_orgname', '8.8.8.8');
|
SELECT _cdb_geocode_ipaddress_point('evil_user', 'evil_orgname', 'evil_appname', '8.8.8.8');
|
||||||
ERROR: permission denied for function _cdb_geocode_ipaddress_point
|
ERROR: permission denied for function _cdb_geocode_ipaddress_point
|
||||||
SELECT _cdb_geocode_street_point('evil_user', 'evil_orgname', 'one street, 1');
|
SELECT _cdb_geocode_street_point('evil_user', 'evil_orgname', 'evil_appname', 'one street, 1');
|
||||||
ERROR: permission denied for function _cdb_geocode_street_point
|
ERROR: permission denied for function _cdb_geocode_street_point
|
||||||
SELECT _cdb_route_point_to_point('evil_user', 'evil_orgname', 'POINT(-87.81406 41.89308)'::geometry,'POINT(-87.79209 41.86138)'::geometry, 'car');
|
SELECT _cdb_route_point_to_point('evil_user', 'evil_orgname', 'evil_appname', 'POINT(-87.81406 41.89308)'::geometry,'POINT(-87.79209 41.86138)'::geometry, 'car');
|
||||||
ERROR: permission denied for function _cdb_route_point_to_point
|
ERROR: permission denied for function _cdb_route_point_to_point
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
SET search_path TO public,cartodb,cdb_dataservices_client;
|
SET search_path TO public,cartodb,cdb_dataservices_client;
|
||||||
|
|
||||||
-- Mock the server function
|
-- Mock the server function
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_admin0_polygon(username text, orgname text, country_name text)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_admin0_polygon(username text, orgname text, appname text, country_name text)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_admin0_polygon invoked with params (%, %, %)', username, orgname, country_name;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_admin0_polygon invoked with params (%, %, %, %)', username, orgname, appname, country_name;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
|
@ -3,18 +3,18 @@
|
|||||||
SET search_path TO public,cartodb,cdb_dataservices_client;
|
SET search_path TO public,cartodb,cdb_dataservices_client;
|
||||||
|
|
||||||
-- Mock the server functions
|
-- Mock the server functions
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_admin1_polygon(username text, orgname text, admin1_name text)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_admin1_polygon(username text, orgname text, appname text, admin1_name text)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_admin1_polygon invoked with params (%, %, %)', username, orgname, admin1_name;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_admin1_polygon invoked with params (%, %, %, %)', username, orgname, appname, admin1_name;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_admin1_polygon(username text, orgname text, admin1_name text, country_name text)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_admin1_polygon(username text, orgname text, appname text, admin1_name text, country_name text)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_admin1_polygon invoked with params (%, %, %, %)', username, orgname, admin1_name, country_name;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_admin1_polygon invoked with params (%, %, %, %, %)', username, orgname, appname, admin1_name, country_name;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
|
@ -3,7 +3,7 @@ SET client_min_messages TO warning;
|
|||||||
SET search_path TO public,cartodb,cdb_dataservices_client;
|
SET search_path TO public,cartodb,cdb_dataservices_client;
|
||||||
|
|
||||||
-- Mock the server functions to raise exceptions
|
-- Mock the server functions to raise exceptions
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_street_point (username text, orgname text, searchtext text, city text DEFAULT NULL, state_province text DEFAULT NULL, country text DEFAULT NULL)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_street_point (username text, orgname text, appname text, searchtext text, city text DEFAULT NULL, state_province text DEFAULT NULL, country text DEFAULT NULL)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE EXCEPTION 'Not enough quota or any other exception whatsoever.';
|
RAISE EXCEPTION 'Not enough quota or any other exception whatsoever.';
|
||||||
@ -11,14 +11,14 @@ BEGIN
|
|||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_isodistance(username text, orgname text, source geometry, mode text, range integer[], options text[] DEFAULT ARRAY[]::text[])
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_isodistance(username text, orgname text, appname text, source geometry, mode text, range integer[], options text[] DEFAULT ARRAY[]::text[])
|
||||||
RETURNS SETOF isoline AS $$
|
RETURNS SETOF isoline AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE EXCEPTION 'Not enough quota or any other exception whatsoever.';
|
RAISE EXCEPTION 'Not enough quota or any other exception whatsoever.';
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_route_point_to_point (username text, orgname text, origin geometry(Point, 4326), destination geometry(Point, 4326), mode TEXT, options text[] DEFAULT ARRAY[]::text[], units text DEFAULT 'kilometers')
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_route_point_to_point (username text, orgname text, appname text, origin geometry(Point, 4326), destination geometry(Point, 4326), mode TEXT, options text[] DEFAULT ARRAY[]::text[], units text DEFAULT 'kilometers')
|
||||||
RETURNS cdb_dataservices_client.simple_route AS $$
|
RETURNS cdb_dataservices_client.simple_route AS $$
|
||||||
DECLARE
|
DECLARE
|
||||||
ret cdb_dataservices_client.simple_route;
|
ret cdb_dataservices_client.simple_route;
|
||||||
|
@ -3,26 +3,26 @@
|
|||||||
SET search_path TO public,cartodb,cdb_dataservices_client;
|
SET search_path TO public,cartodb,cdb_dataservices_client;
|
||||||
|
|
||||||
-- Mock the server functions
|
-- Mock the server functions
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_namedplace_point(username text, orgname text, city_name text)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_namedplace_point(username text, orgname text, appname text, city_name text)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (%, %, %)', username, orgname, city_name;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (%, %, %, %)', username, orgname, appname, city_name;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_namedplace_point(username text, orgname text, city_name text, country_name text)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_namedplace_point(username text, orgname text, appname text, city_name text, country_name text)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (%, %, %, %)', username, orgname, city_name, country_name;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (%, %, %, %, %)', username, orgname, appname, city_name, country_name;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_namedplace_point(username text, orgname text, city_name text, admin1_name text, country_name text)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_namedplace_point(username text, orgname text, appname text, city_name text, admin1_name text, country_name text)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (%, %, %, %, %)', username, orgname, city_name, admin1_name, country_name;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_namedplace_point invoked with params (%, %, %, %, %, %)', username, orgname, appname, city_name, admin1_name, country_name;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
|
@ -3,18 +3,18 @@
|
|||||||
SET search_path TO public,cartodb,cdb_dataservices_client;
|
SET search_path TO public,cartodb,cdb_dataservices_client;
|
||||||
|
|
||||||
-- Mock the server functions
|
-- Mock the server functions
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_postalcode_polygon(username text, orgname text, postal_code text, country_name text)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_postalcode_polygon(username text, orgname text, appname text, postal_code text, country_name text)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_postalcode_polygon invoked with params (%, %, %, %)', username, orgname, postal_code, country_name;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_postalcode_polygon invoked with params (%, %, %, %, %)', username, orgname, appname, postal_code, country_name;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_postalcode_point(username text, orgname text, postal_code text, country_name text)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_postalcode_point(username text, orgname text, appname text, postal_code text, country_name text)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_postalcode_point invoked with params (%, %, %, %)', username, orgname, postal_code, country_name;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_postalcode_point invoked with params (%, %, %, %, %)', username, orgname, appname, postal_code, country_name;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
SET search_path TO public,cartodb,cdb_dataservices_client;
|
SET search_path TO public,cartodb,cdb_dataservices_client;
|
||||||
|
|
||||||
-- Mock the server functions
|
-- Mock the server functions
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_ipaddress_point(username text, orgname text, ip_address text)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_ipaddress_point(username text, orgname text, appname text, ip_address text)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_ipaddress_point invoked with params (%, %, %)', username, orgname, ip_address;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_ipaddress_point invoked with params (%, %, %, %)', username, orgname, appname, ip_address;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
SET search_path TO public,cartodb,cdb_dataservices_client;
|
SET search_path TO public,cartodb,cdb_dataservices_client;
|
||||||
|
|
||||||
-- Mock the server functions
|
-- Mock the server functions
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_street_point (username text, orgname text, searchtext text, city text DEFAULT NULL, state_province text DEFAULT NULL, country text DEFAULT NULL)
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_street_point (username text, orgname text, appname text, searchtext text, city text DEFAULT NULL, state_province text DEFAULT NULL, country text DEFAULT NULL)
|
||||||
RETURNS Geometry AS $$
|
RETURNS Geometry AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (%, %, %, %, %, %)', username, orgname, searchtext, city, state_province, country;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_geocode_geocoder_street_point invoked with params (%, %, %, %, %, %, %)', username, orgname, appname, searchtext, city, state_province, country;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
|
@ -4,24 +4,24 @@ SET search_path TO public,cartodb,cdb_dataservices_client;
|
|||||||
|
|
||||||
-- Mock the server functions
|
-- Mock the server functions
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_route_point_to_point (username text, orgname text, origin geometry(Point, 4326), destination geometry(Point, 4326), mode TEXT, options text[] DEFAULT ARRAY[]::text[], units text DEFAULT 'kilometers')
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_route_point_to_point (username text, orgname text, appname text, origin geometry(Point, 4326), destination geometry(Point, 4326), mode TEXT, options text[] DEFAULT ARRAY[]::text[], units text DEFAULT 'kilometers')
|
||||||
RETURNS cdb_dataservices_client.simple_route AS $$
|
RETURNS cdb_dataservices_client.simple_route AS $$
|
||||||
DECLARE
|
DECLARE
|
||||||
ret cdb_dataservices_client.simple_route;
|
ret cdb_dataservices_client.simple_route;
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_route_point_to_point invoked with params (%, %, %, %, %, %, %)', username, orgname, origin, destination, mode, options, units;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_route_point_to_point invoked with params (%, %, %, %, %, %, %, %)', username, orgname, appname, origin, destination, mode, options, units;
|
||||||
SELECT NULL, 5.33, 100 INTO ret;
|
SELECT NULL, 5.33, 100 INTO ret;
|
||||||
RETURN ret;
|
RETURN ret;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql';
|
$$ LANGUAGE 'plpgsql';
|
||||||
|
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_route_with_waypoints(username text, orgname text, waypoints geometry(Point, 4326)[], mode TEXT, options text[] DEFAULT ARRAY[]::text[], units text DEFAULT 'kilometers')
|
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_route_with_waypoints(username text, orgname text, appname text, waypoints geometry(Point, 4326)[], mode TEXT, options text[] DEFAULT ARRAY[]::text[], units text DEFAULT 'kilometers')
|
||||||
RETURNS cdb_dataservices_client.simple_route AS $$
|
RETURNS cdb_dataservices_client.simple_route AS $$
|
||||||
DECLARE
|
DECLARE
|
||||||
ret cdb_dataservices_client.simple_route;
|
ret cdb_dataservices_client.simple_route;
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'cdb_dataservices_server.cdb_route_with_waypoints invoked with params (%, %, %, %, %, %)', username, orgname, waypoints, mode, options, units;
|
RAISE NOTICE 'cdb_dataservices_server.cdb_route_with_waypoints invoked with params (%, %, %, %, %, %, %)', username, orgname, appname, waypoints, mode, options, units;
|
||||||
SELECT NULL, 2.22, 500 INTO ret;
|
SELECT NULL, 2.22, 500 INTO ret;
|
||||||
RETURN ret;
|
RETURN ret;
|
||||||
END;
|
END;
|
||||||
|
@ -20,14 +20,14 @@ SELECT cdb_geocode_street_point('one street, 1');
|
|||||||
SELECT cdb_route_point_to_point('POINT(-87.81406 41.89308)'::geometry,'POINT(-87.79209 41.86138)'::geometry, 'car');
|
SELECT cdb_route_point_to_point('POINT(-87.81406 41.89308)'::geometry,'POINT(-87.79209 41.86138)'::geometry, 'car');
|
||||||
|
|
||||||
-- Check the regular user has no permissions on private functions
|
-- Check the regular user has no permissions on private functions
|
||||||
SELECT _cdb_geocode_admin0_polygon('evil_user', 'evil_orgname', 'Hell');
|
SELECT _cdb_geocode_admin0_polygon('evil_user', 'evil_orgname', 'evil_appname', 'Hell');
|
||||||
SELECT _cdb_geocode_admin1_polygon('evil_user', 'evil_orgname', 'Hell');
|
SELECT _cdb_geocode_admin1_polygon('evil_user', 'evil_orgname', 'evil_appname', 'Hell');
|
||||||
SELECT _cdb_geocode_admin1_polygon('evil_user', 'evil_orgname', 'Sheol', 'Hell');
|
SELECT _cdb_geocode_admin1_polygon('evil_user', 'evil_orgname', 'evil_appname', 'Sheol', 'Hell');
|
||||||
SELECT _cdb_geocode_namedplace_point('evil_user', 'evil_orgname', 'Sheol');
|
SELECT _cdb_geocode_namedplace_point('evil_user', 'evil_orgname', 'evil_appname', 'Sheol');
|
||||||
SELECT _cdb_geocode_namedplace_point('evil_user', 'evil_orgname', 'Sheol', 'Hell');
|
SELECT _cdb_geocode_namedplace_point('evil_user', 'evil_orgname', 'evil_appname', 'Sheol', 'Hell');
|
||||||
SELECT _cdb_geocode_namedplace_point('evil_user', 'evil_orgname', 'Sheol', 'Hell', 'Ugly world');
|
SELECT _cdb_geocode_namedplace_point('evil_user', 'evil_orgname', 'evil_appname', 'Sheol', 'Hell', 'Ugly world');
|
||||||
SELECT _cdb_geocode_postalcode_polygon('evil_user', 'evil_orgname', '66666', 'Hell');
|
SELECT _cdb_geocode_postalcode_polygon('evil_user', 'evil_orgname', 'evil_appname', '66666', 'Hell');
|
||||||
SELECT _cdb_geocode_postalcode_point('evil_user', 'evil_orgname', '66666', 'Hell');
|
SELECT _cdb_geocode_postalcode_point('evil_user', 'evil_orgname', 'evil_appname', '66666', 'Hell');
|
||||||
SELECT _cdb_geocode_ipaddress_point('evil_user', 'evil_orgname', '8.8.8.8');
|
SELECT _cdb_geocode_ipaddress_point('evil_user', 'evil_orgname', 'evil_appname', '8.8.8.8');
|
||||||
SELECT _cdb_geocode_street_point('evil_user', 'evil_orgname', 'one street, 1');
|
SELECT _cdb_geocode_street_point('evil_user', 'evil_orgname', 'evil_appname', 'one street, 1');
|
||||||
SELECT _cdb_route_point_to_point('evil_user', 'evil_orgname', 'POINT(-87.81406 41.89308)'::geometry,'POINT(-87.79209 41.86138)'::geometry, 'car');
|
SELECT _cdb_route_point_to_point('evil_user', 'evil_orgname', 'evil_appname', 'POINT(-87.81406 41.89308)'::geometry,'POINT(-87.79209 41.86138)'::geometry, 'car');
|
||||||
|
Loading…
Reference in New Issue
Block a user