diff --git a/client/cdb_dataservices_client--0.1.0--0.2.0.sql b/client/cdb_dataservices_client--0.1.0--0.2.0.sql index b298066..14b50bd 100644 --- a/client/cdb_dataservices_client--0.1.0--0.2.0.sql +++ b/client/cdb_dataservices_client--0.1.0--0.2.0.sql @@ -1,7 +1,12 @@ +CREATE TYPE cdb_dataservices_client.isoline AS ( + center geometry(Geometry,4326), + data_range integer, + the_geom geometry(Multipolygon,4326) +); + CREATE OR REPLACE FUNCTION cdb_dataservices_client.cdb_isodistance (source geometry(Geometry, 4326), mode text, range integer[], options text[] DEFAULT NULL) -RETURNS SETOF isoline AS $$ +RETURNS SETOF cdb_dataservices_client.isoline AS $$ DECLARE - ret SETOF isoline; username text; orgname text; BEGIN @@ -13,23 +18,22 @@ BEGIN IF username IS NULL OR username = '' OR username = '""' THEN RAISE EXCEPTION 'Username is a mandatory argument, check it out'; END IF; - SELECT cdb_dataservices_client._cdb_isodistance(username, orgname, source, mode, range, options) INTO ret; - RETURN ret; + RETURN QUERY + SELECT * FROM cdb_dataservices_client._cdb_isodistance(username, orgname, source, mode, range, options); END; $$ LANGUAGE 'plpgsql' SECURITY DEFINER; CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_isodistance (username text, organization_name text, source geometry(Geometry, 4326), mode text, range integer[], options text[] DEFAULT NULL) -RETURNS SETOF isoline AS $$ +RETURNS SETOF cdb_dataservices_client.isoline AS $$ CONNECT cdb_dataservices_client._server_conn_str(); - SELECT cdb_dataservices_server.cdb_isodistance (username, organization_name, source, mode, range, options); + SELECT * FROM cdb_dataservices_server.cdb_isodistance (username, organization_name, source, mode, range, options); $$ LANGUAGE plproxy; GRANT EXECUTE ON FUNCTION cdb_dataservices_client.cdb_isodistance(source geometry(Geometry, 4326), mode text, range integer[], options text[]) TO publicuser; CREATE OR REPLACE FUNCTION cdb_dataservices_client.cdb_isochrone (source geometry(Geometry, 4326), mode text, range integer[], options text[] DEFAULT NULL) -RETURNS SETOF isoline AS $$ +RETURNS SETOF cdb_dataservices_client.isoline AS $$ DECLARE - ret SETOF isoline; username text; orgname text; BEGIN @@ -41,14 +45,14 @@ BEGIN IF username IS NULL OR username = '' OR username = '""' THEN RAISE EXCEPTION 'Username is a mandatory argument, check it out'; END IF; - SELECT cdb_dataservices_client._cdb_isochrone(username, orgname, source, mode, range, options) INTO ret; - RETURN ret; + + RETURN QUERY + SELECT * FROM cdb_dataservices_client._cdb_isochrone(username, orgname, source, mode, range, options); END; $$ LANGUAGE 'plpgsql' SECURITY DEFINER; - CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_isochrone (username text, organization_name text, source geometry(Geometry, 4326), mode text, range integer[], options text[] DEFAULT NULL) -RETURNS SETOF isoline AS $$ +RETURNS SETOF cdb_dataservices_client.isoline AS $$ CONNECT cdb_dataservices_client._server_conn_str(); SELECT cdb_dataservices_server.cdb_isochrone (username, organization_name, source, mode, range, options); $$ LANGUAGE plproxy; diff --git a/client/cdb_dataservices_client--0.2.0--0.1.0.sql b/client/cdb_dataservices_client--0.2.0--0.1.0.sql index f752659..3fe2211 100644 --- a/client/cdb_dataservices_client--0.2.0--0.1.0.sql +++ b/client/cdb_dataservices_client--0.2.0--0.1.0.sql @@ -1,5 +1,7 @@ DROP FUNCTION IF EXISTS cdb_dataservices_client.cdb_isochrone (geometry(Geometry, 4326), text, integer[], text[]); DROP FUNCTION IF EXISTS cdb_dataservices_client._cdb_isochrone (text, text, geometry(Geometry, 4326), text, integer[], text[]); -DROP FUNCTION IF EXISTS cdb_dataservices_client.cdb_isoline (geometry(Geometry, 4326), text, integer[], text[]); -DROP FUNCTION IF EXISTS cdb_dataservices_client._cdb_isoline (text, text, geometry(Geometry, 4326), text, integer[], text[]); +DROP FUNCTION IF EXISTS cdb_dataservices_client.cdb_isodistance (geometry(Geometry, 4326), text, integer[], text[]); +DROP FUNCTION IF EXISTS cdb_dataservices_client._cdb_isodistance (text, text, geometry(Geometry, 4326), text, integer[], text[]); + +DROP TYPE IF EXISTS cdb_dataservices_client.isoline; \ No newline at end of file diff --git a/client/cdb_dataservices_client--0.2.0.sql b/client/cdb_dataservices_client--0.2.0.sql index efc8424..bdf99bd 100644 --- a/client/cdb_dataservices_client--0.2.0.sql +++ b/client/cdb_dataservices_client--0.2.0.sql @@ -54,7 +54,11 @@ BEGIN RETURN result; END; $$ LANGUAGE 'plpgsql' SECURITY DEFINER; --- +CREATE TYPE cdb_dataservices_client.isoline AS ( + center geometry(Geometry,4326), + data_range integer, + the_geom geometry(Multipolygon,4326) +);-- -- Public geocoder API function -- -- These are the only ones with permissions to publicuser role @@ -75,8 +79,10 @@ BEGIN IF username IS NULL OR username = '' OR username = '""' THEN RAISE EXCEPTION 'Username is a mandatory argument, check it out'; END IF; - SELECT cdb_dataservices_client._cdb_geocode_admin0_polygon(username, orgname, country_name) INTO ret; - RETURN ret; + + SELECT cdb_dataservices_client._cdb_geocode_admin0_polygon(username, orgname, country_name) INTO ret; + RETURN ret; + END; $$ LANGUAGE 'plpgsql' SECURITY DEFINER; @@ -101,8 +107,10 @@ BEGIN IF username IS NULL OR username = '' OR username = '""' THEN RAISE EXCEPTION 'Username is a mandatory argument, check it out'; END IF; - SELECT cdb_dataservices_client._cdb_geocode_admin1_polygon(username, orgname, admin1_name) INTO ret; - RETURN ret; + + SELECT cdb_dataservices_client._cdb_geocode_admin1_polygon(username, orgname, admin1_name) INTO ret; + RETURN ret; + END; $$ LANGUAGE 'plpgsql' SECURITY DEFINER; @@ -127,8 +135,10 @@ BEGIN IF username IS NULL OR username = '' OR username = '""' THEN RAISE EXCEPTION 'Username is a mandatory argument, check it out'; END IF; - SELECT cdb_dataservices_client._cdb_geocode_admin1_polygon(username, orgname, admin1_name, country_name) INTO ret; - RETURN ret; + + SELECT cdb_dataservices_client._cdb_geocode_admin1_polygon(username, orgname, admin1_name, country_name) INTO ret; + RETURN ret; + END; $$ LANGUAGE 'plpgsql' SECURITY DEFINER; @@ -153,8 +163,10 @@ BEGIN IF username IS NULL OR username = '' OR username = '""' THEN RAISE EXCEPTION 'Username is a mandatory argument, check it out'; END IF; - SELECT cdb_dataservices_client._cdb_geocode_namedplace_point(username, orgname, city_name) INTO ret; - RETURN ret; + + SELECT cdb_dataservices_client._cdb_geocode_namedplace_point(username, orgname, city_name) INTO ret; + RETURN ret; + END; $$ LANGUAGE 'plpgsql' SECURITY DEFINER; @@ -179,8 +191,10 @@ BEGIN IF username IS NULL OR username = '' OR username = '""' THEN RAISE EXCEPTION 'Username is a mandatory argument, check it out'; END IF; - SELECT cdb_dataservices_client._cdb_geocode_namedplace_point(username, orgname, city_name, country_name) INTO ret; - RETURN ret; + + SELECT cdb_dataservices_client._cdb_geocode_namedplace_point(username, orgname, city_name, country_name) INTO ret; + RETURN ret; + END; $$ LANGUAGE 'plpgsql' SECURITY DEFINER; @@ -205,8 +219,10 @@ BEGIN IF username IS NULL OR username = '' OR username = '""' THEN RAISE EXCEPTION 'Username is a mandatory argument, check it out'; END IF; - SELECT cdb_dataservices_client._cdb_geocode_namedplace_point(username, orgname, city_name, admin1_name, country_name) INTO ret; - RETURN ret; + + SELECT cdb_dataservices_client._cdb_geocode_namedplace_point(username, orgname, city_name, admin1_name, country_name) INTO ret; + RETURN ret; + END; $$ LANGUAGE 'plpgsql' SECURITY DEFINER; @@ -231,8 +247,10 @@ BEGIN IF username IS NULL OR username = '' OR username = '""' THEN RAISE EXCEPTION 'Username is a mandatory argument, check it out'; END IF; - SELECT cdb_dataservices_client._cdb_geocode_postalcode_polygon(username, orgname, postal_code, country_name) INTO ret; - RETURN ret; + + SELECT cdb_dataservices_client._cdb_geocode_postalcode_polygon(username, orgname, postal_code, country_name) INTO ret; + RETURN ret; + END; $$ LANGUAGE 'plpgsql' SECURITY DEFINER; @@ -257,8 +275,10 @@ BEGIN IF username IS NULL OR username = '' OR username = '""' THEN RAISE EXCEPTION 'Username is a mandatory argument, check it out'; END IF; - SELECT cdb_dataservices_client._cdb_geocode_postalcode_point(username, orgname, postal_code, country_name) INTO ret; - RETURN ret; + + SELECT cdb_dataservices_client._cdb_geocode_postalcode_point(username, orgname, postal_code, country_name) INTO ret; + RETURN ret; + END; $$ LANGUAGE 'plpgsql' SECURITY DEFINER; @@ -283,8 +303,10 @@ BEGIN IF username IS NULL OR username = '' OR username = '""' THEN RAISE EXCEPTION 'Username is a mandatory argument, check it out'; END IF; - SELECT cdb_dataservices_client._cdb_geocode_ipaddress_point(username, orgname, ip_address) INTO ret; - RETURN ret; + + SELECT cdb_dataservices_client._cdb_geocode_ipaddress_point(username, orgname, ip_address) INTO ret; + RETURN ret; + END; $$ LANGUAGE 'plpgsql' SECURITY DEFINER; @@ -309,8 +331,10 @@ BEGIN IF username IS NULL OR username = '' OR username = '""' THEN RAISE EXCEPTION 'Username is a mandatory argument, check it out'; END IF; - SELECT cdb_dataservices_client._cdb_geocode_street_point(username, orgname, searchtext, city, state_province, country) INTO ret; - RETURN ret; + + SELECT cdb_dataservices_client._cdb_geocode_street_point(username, orgname, searchtext, city, state_province, country) INTO ret; + RETURN ret; + END; $$ LANGUAGE 'plpgsql' SECURITY DEFINER; @@ -321,9 +345,9 @@ $$ LANGUAGE 'plpgsql' SECURITY DEFINER; -- and should also be the only ones with SECURITY DEFINER CREATE OR REPLACE FUNCTION cdb_dataservices_client.cdb_isodistance (source geometry(Geometry, 4326), mode text, range integer[], options text[] DEFAULT NULL) -RETURNS SETOF isoline AS $$ +RETURNS SETOF cdb_dataservices_client.isoline AS $$ DECLARE - ret SETOF isoline; + username text; orgname text; BEGIN @@ -335,8 +359,10 @@ BEGIN IF username IS NULL OR username = '' OR username = '""' THEN RAISE EXCEPTION 'Username is a mandatory argument, check it out'; END IF; - SELECT cdb_dataservices_client._cdb_isodistance(username, orgname, source, mode, range, options) INTO ret; - RETURN ret; + + RETURN QUERY + SELECT * FROM cdb_dataservices_client._cdb_isodistance(username, orgname, source, mode, range, options); + END; $$ LANGUAGE 'plpgsql' SECURITY DEFINER; @@ -347,9 +373,9 @@ $$ LANGUAGE 'plpgsql' SECURITY DEFINER; -- and should also be the only ones with SECURITY DEFINER CREATE OR REPLACE FUNCTION cdb_dataservices_client.cdb_isochrone (source geometry(Geometry, 4326), mode text, range integer[], options text[] DEFAULT NULL) -RETURNS SETOF isoline AS $$ +RETURNS SETOF cdb_dataservices_client.isoline AS $$ DECLARE - ret SETOF isoline; + username text; orgname text; BEGIN @@ -361,81 +387,107 @@ BEGIN IF username IS NULL OR username = '' OR username = '""' THEN RAISE EXCEPTION 'Username is a mandatory argument, check it out'; END IF; - SELECT cdb_dataservices_client._cdb_isochrone(username, orgname, source, mode, range, options) INTO ret; - RETURN ret; + + RETURN QUERY + SELECT * FROM cdb_dataservices_client._cdb_isochrone(username, orgname, source, mode, range, options); + END; $$ LANGUAGE 'plpgsql' SECURITY DEFINER; CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_geocode_admin0_polygon (username text, organization_name text, country_name text) RETURNS Geometry AS $$ CONNECT cdb_dataservices_client._server_conn_str(); + SELECT cdb_dataservices_server.cdb_geocode_admin0_polygon (username, organization_name, country_name); + $$ LANGUAGE plproxy; CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_geocode_admin1_polygon (username text, organization_name text, admin1_name text) RETURNS Geometry AS $$ CONNECT cdb_dataservices_client._server_conn_str(); + SELECT cdb_dataservices_server.cdb_geocode_admin1_polygon (username, organization_name, admin1_name); + $$ LANGUAGE plproxy; CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_geocode_admin1_polygon (username text, organization_name text, admin1_name text, country_name text) RETURNS Geometry AS $$ CONNECT cdb_dataservices_client._server_conn_str(); + SELECT cdb_dataservices_server.cdb_geocode_admin1_polygon (username, organization_name, admin1_name, country_name); + $$ LANGUAGE plproxy; CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_geocode_namedplace_point (username text, organization_name text, city_name text) RETURNS Geometry AS $$ CONNECT cdb_dataservices_client._server_conn_str(); + SELECT cdb_dataservices_server.cdb_geocode_namedplace_point (username, organization_name, city_name); + $$ LANGUAGE plproxy; CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_geocode_namedplace_point (username text, organization_name text, city_name text, country_name text) RETURNS Geometry AS $$ CONNECT cdb_dataservices_client._server_conn_str(); + SELECT cdb_dataservices_server.cdb_geocode_namedplace_point (username, organization_name, city_name, country_name); + $$ LANGUAGE plproxy; CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_geocode_namedplace_point (username text, organization_name text, city_name text, admin1_name text, country_name text) RETURNS Geometry AS $$ CONNECT cdb_dataservices_client._server_conn_str(); + SELECT cdb_dataservices_server.cdb_geocode_namedplace_point (username, organization_name, city_name, admin1_name, country_name); + $$ LANGUAGE plproxy; CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_geocode_postalcode_polygon (username text, organization_name text, postal_code text, country_name text) RETURNS Geometry AS $$ CONNECT cdb_dataservices_client._server_conn_str(); + SELECT cdb_dataservices_server.cdb_geocode_postalcode_polygon (username, organization_name, postal_code, country_name); + $$ LANGUAGE plproxy; CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_geocode_postalcode_point (username text, organization_name text, postal_code text, country_name text) RETURNS Geometry AS $$ CONNECT cdb_dataservices_client._server_conn_str(); + SELECT cdb_dataservices_server.cdb_geocode_postalcode_point (username, organization_name, postal_code, country_name); + $$ LANGUAGE plproxy; CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_geocode_ipaddress_point (username text, organization_name text, ip_address text) RETURNS Geometry AS $$ CONNECT cdb_dataservices_client._server_conn_str(); + SELECT cdb_dataservices_server.cdb_geocode_ipaddress_point (username, organization_name, ip_address); + $$ LANGUAGE plproxy; CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_geocode_street_point (username text, organization_name text, searchtext text, city text DEFAULT NULL, state_province text DEFAULT NULL, country text DEFAULT NULL) RETURNS Geometry AS $$ CONNECT cdb_dataservices_client._server_conn_str(); + SELECT cdb_dataservices_server.cdb_geocode_street_point (username, organization_name, searchtext, city, state_province, country); + $$ LANGUAGE plproxy; CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_isodistance (username text, organization_name text, source geometry(Geometry, 4326), mode text, range integer[], options text[] DEFAULT NULL) -RETURNS SETOF isoline AS $$ +RETURNS SETOF cdb_dataservices_client.isoline AS $$ CONNECT cdb_dataservices_client._server_conn_str(); - SELECT cdb_dataservices_server.cdb_isodistance (username, organization_name, source, mode, range, options); + + SELECT * FROM cdb_dataservices_server.cdb_isodistance (username, organization_name, source, mode, range, options); + $$ LANGUAGE plproxy; CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_isochrone (username text, organization_name text, source geometry(Geometry, 4326), mode text, range integer[], options text[] DEFAULT NULL) -RETURNS SETOF isoline AS $$ +RETURNS SETOF cdb_dataservices_client.isoline AS $$ CONNECT cdb_dataservices_client._server_conn_str(); - SELECT cdb_dataservices_server.cdb_isochrone (username, organization_name, source, mode, range, options); + + SELECT * FROM cdb_dataservices_server.cdb_isochrone (username, organization_name, source, mode, range, options); + $$ LANGUAGE plproxy; -- Make sure by default there are no permissions for publicuser diff --git a/client/renderer/interfaces/interface_0.2.0.yaml b/client/renderer/interfaces/interface_0.2.0.yaml index 3ae7c5a..e0bc968 100644 --- a/client/renderer/interfaces/interface_0.2.0.yaml +++ b/client/renderer/interfaces/interface_0.2.0.yaml @@ -60,7 +60,8 @@ - { name: country, type: text, default: 'NULL'} - name: cdb_isodistance - return_type: SETOF isoline + return_type: SETOF cdb_dataservices_client.isoline + multi_row: true params: - { name: source, type: "geometry(Geometry, 4326)" } - { name: mode, type: text } @@ -68,7 +69,8 @@ - { name: options, type: "text[]", default: 'NULL' } - name: cdb_isochrone - return_type: SETOF isoline + return_type: SETOF cdb_dataservices_client.isoline + multi_row: true params: - { name: source, type: "geometry(Geometry, 4326)" } - { name: mode, type: text } diff --git a/client/renderer/sql-template-renderer b/client/renderer/sql-template-renderer index e9d5be2..3e2dccc 100755 --- a/client/renderer/sql-template-renderer +++ b/client/renderer/sql-template-renderer @@ -28,6 +28,10 @@ class SqlTemplateRenderer @function_signature['return_type'] end + def multi_row + @function_signature['multi_row'] + end + def user_config_key @function_signature['user_config_key'] end diff --git a/client/renderer/templates/20_public_functions.erb b/client/renderer/templates/20_public_functions.erb index da1b81c..10755ea 100644 --- a/client/renderer/templates/20_public_functions.erb +++ b/client/renderer/templates/20_public_functions.erb @@ -7,7 +7,7 @@ CREATE OR REPLACE FUNCTION <%= DATASERVICES_CLIENT_SCHEMA %>.<%= name %> (<%= params_with_type_and_default %>) RETURNS <%= return_type %> AS $$ DECLARE - ret <%= return_type %>; + <% if not multi_row %>ret <%= return_type %>;<% end %> username text; orgname text; BEGIN @@ -19,8 +19,13 @@ BEGIN IF username IS NULL OR username = '' OR username = '""' THEN RAISE EXCEPTION 'Username is a mandatory argument, check it out'; END IF; - SELECT <%= DATASERVICES_CLIENT_SCHEMA %>._<%= name %>(username, orgname, <%= params %>) INTO ret; - RETURN ret; + <% if multi_row %> + RETURN QUERY + SELECT * FROM <%= DATASERVICES_CLIENT_SCHEMA %>._<%= name %>(username, orgname, <%= params %>); + <% else %> + SELECT <%= DATASERVICES_CLIENT_SCHEMA %>._<%= name %>(username, orgname, <%= params %>) INTO ret; + RETURN ret; + <% end %> END; $$ LANGUAGE 'plpgsql' SECURITY DEFINER; diff --git a/client/renderer/templates/30_plproxy_functions.erb b/client/renderer/templates/30_plproxy_functions.erb index 617547d..6e2909a 100644 --- a/client/renderer/templates/30_plproxy_functions.erb +++ b/client/renderer/templates/30_plproxy_functions.erb @@ -1,6 +1,10 @@ CREATE OR REPLACE FUNCTION <%= DATASERVICES_CLIENT_SCHEMA %>._<%= name %> (username text, organization_name text, <%= params_with_type_and_default %>) RETURNS <%= return_type %> AS $$ CONNECT <%= DATASERVICES_CLIENT_SCHEMA %>._server_conn_str(); + <% if multi_row %> + SELECT * FROM <%= DATASERVICES_SERVER_SCHEMA %>.<%= name %> (username, organization_name, <%= params %>); + <% else %> SELECT <%= DATASERVICES_SERVER_SCHEMA %>.<%= name %> (username, organization_name, <%= params %>); + <% end %> $$ LANGUAGE plproxy; diff --git a/client/sql/0.2.0/16_custom_types.sql b/client/sql/0.2.0/16_custom_types.sql new file mode 100644 index 0000000..5b37dde --- /dev/null +++ b/client/sql/0.2.0/16_custom_types.sql @@ -0,0 +1,5 @@ +CREATE TYPE cdb_dataservices_client.isoline AS ( + center geometry(Geometry,4326), + data_range integer, + the_geom geometry(Multipolygon,4326) +); \ No newline at end of file diff --git a/client/test/0.2.0/expected/10_admin0_test.out b/client/test/0.2.0/expected/10_admin0_test.out index 98fa0db..8d70ce3 100644 --- a/client/test/0.2.0/expected/10_admin0_test.out +++ b/client/test/0.2.0/expected/10_admin0_test.out @@ -12,7 +12,7 @@ $$ LANGUAGE 'plpgsql'; 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, , Spain) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_admin0_polygon(username, orgname, country_name)" -PL/pgSQL function cdb_geocode_admin0_polygon(text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_admin0_polygon(text) line 16 at SQL statement cdb_geocode_admin0_polygon ---------------------------- diff --git a/client/test/0.2.0/expected/20_admin1_test.out b/client/test/0.2.0/expected/20_admin1_test.out index 36486b5..a703109 100644 --- a/client/test/0.2.0/expected/20_admin1_test.out +++ b/client/test/0.2.0/expected/20_admin1_test.out @@ -19,7 +19,7 @@ $$ LANGUAGE 'plpgsql'; 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, , California) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_admin1_polygon(username, orgname, admin1_name)" -PL/pgSQL function cdb_geocode_admin1_polygon(text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_admin1_polygon(text) line 16 at SQL statement cdb_geocode_admin1_polygon ---------------------------- @@ -28,7 +28,7 @@ PL/pgSQL function cdb_geocode_admin1_polygon(text) line 15 at SQL statement 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, , California, United States) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_admin1_polygon(username, orgname, admin1_name, country_name)" -PL/pgSQL function cdb_geocode_admin1_polygon(text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_admin1_polygon(text,text) line 16 at SQL statement cdb_geocode_admin1_polygon ---------------------------- diff --git a/client/test/0.2.0/expected/30_namedplaces_test.out b/client/test/0.2.0/expected/30_namedplaces_test.out index c5db519..458ec3a 100644 --- a/client/test/0.2.0/expected/30_namedplaces_test.out +++ b/client/test/0.2.0/expected/30_namedplaces_test.out @@ -26,7 +26,7 @@ $$ LANGUAGE 'plpgsql'; 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, , Elx) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_namedplace_point(username, orgname, city_name)" -PL/pgSQL function cdb_geocode_namedplace_point(text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_namedplace_point(text) line 16 at SQL statement cdb_geocode_namedplace_point ------------------------------ @@ -35,7 +35,7 @@ PL/pgSQL function cdb_geocode_namedplace_point(text) line 15 at SQL statement 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, , Elx, Spain) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_namedplace_point(username, orgname, city_name, country_name)" -PL/pgSQL function cdb_geocode_namedplace_point(text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_namedplace_point(text,text) line 16 at SQL statement cdb_geocode_namedplace_point ------------------------------ @@ -44,7 +44,7 @@ PL/pgSQL function cdb_geocode_namedplace_point(text,text) line 15 at SQL stateme 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, , Elx, Valencia, Spain) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_namedplace_point(username, orgname, city_name, admin1_name, country_name)" -PL/pgSQL function cdb_geocode_namedplace_point(text,text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_namedplace_point(text,text,text) line 16 at SQL statement cdb_geocode_namedplace_point ------------------------------ diff --git a/client/test/0.2.0/expected/40_postalcodes_test.out b/client/test/0.2.0/expected/40_postalcodes_test.out index fae53ec..3be51df 100644 --- a/client/test/0.2.0/expected/40_postalcodes_test.out +++ b/client/test/0.2.0/expected/40_postalcodes_test.out @@ -19,7 +19,7 @@ $$ LANGUAGE 'plpgsql'; 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, , 03204, Spain) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_postalcode_polygon(username, orgname, postal_code, country_name)" -PL/pgSQL function cdb_geocode_postalcode_polygon(text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_postalcode_polygon(text,text) line 16 at SQL statement cdb_geocode_postalcode_polygon -------------------------------- @@ -28,7 +28,7 @@ PL/pgSQL function cdb_geocode_postalcode_polygon(text,text) line 15 at SQL state 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, , 03204, Spain) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_postalcode_point(username, orgname, postal_code, country_name)" -PL/pgSQL function cdb_geocode_postalcode_point(text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_postalcode_point(text,text) line 16 at SQL statement cdb_geocode_postalcode_point ------------------------------ diff --git a/client/test/0.2.0/expected/50_ipaddresses_test.out b/client/test/0.2.0/expected/50_ipaddresses_test.out index 18a18db..917b2b1 100644 --- a/client/test/0.2.0/expected/50_ipaddresses_test.out +++ b/client/test/0.2.0/expected/50_ipaddresses_test.out @@ -12,7 +12,7 @@ $$ LANGUAGE 'plpgsql'; 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, , 8.8.8.8) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_ipaddress_point(username, orgname, ip_address)" -PL/pgSQL function cdb_geocode_ipaddress_point(text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_ipaddress_point(text) line 16 at SQL statement cdb_geocode_ipaddress_point ----------------------------- diff --git a/client/test/0.2.0/expected/60_street_test.out b/client/test/0.2.0/expected/60_street_test.out index 72a11f4..9ebce2d 100644 --- a/client/test/0.2.0/expected/60_street_test.out +++ b/client/test/0.2.0/expected/60_street_test.out @@ -12,7 +12,7 @@ $$ LANGUAGE 'plpgsql'; 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, , One street, 1, , , ) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_street_point(username, orgname, searchtext, city, state_province, country)" -PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 16 at SQL statement cdb_geocode_street_point -------------------------- @@ -21,7 +21,7 @@ PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL s 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, , One street, city, , ) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_street_point(username, orgname, searchtext, city, state_province, country)" -PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 16 at SQL statement cdb_geocode_street_point -------------------------- @@ -30,7 +30,7 @@ PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL s 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, , One street, city, state, ) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_street_point(username, orgname, searchtext, city, state_province, country)" -PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 16 at SQL statement cdb_geocode_street_point -------------------------- @@ -39,7 +39,7 @@ PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL s 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, , One street, city, state, country) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_street_point(username, orgname, searchtext, city, state_province, country)" -PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 16 at SQL statement cdb_geocode_street_point -------------------------- @@ -48,7 +48,7 @@ PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL s 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, , One street, city, , country) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_street_point(username, orgname, searchtext, city, state_province, country)" -PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 16 at SQL statement cdb_geocode_street_point -------------------------- @@ -57,7 +57,7 @@ PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL s 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, , One street, 1, , , ) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_street_point(username, orgname, searchtext, city, state_province, country)" -PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 16 at SQL statement cdb_geocode_street_point -------------------------- @@ -66,7 +66,7 @@ PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL s 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, , One street, city, , ) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_street_point(username, orgname, searchtext, city, state_province, country)" -PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 16 at SQL statement cdb_geocode_street_point -------------------------- @@ -75,7 +75,7 @@ PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL s 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, , One street, city, state, ) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_street_point(username, orgname, searchtext, city, state_province, country)" -PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 16 at SQL statement cdb_geocode_street_point -------------------------- @@ -84,7 +84,7 @@ PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL s 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, , One street, city, state, country) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_street_point(username, orgname, searchtext, city, state_province, country)" -PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 16 at SQL statement cdb_geocode_street_point -------------------------- @@ -93,7 +93,7 @@ PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL s 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, , One street, city, , country) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_street_point(username, orgname, searchtext, city, state_province, country)" -PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 16 at SQL statement cdb_geocode_street_point -------------------------- diff --git a/client/test/0.2.0/expected/90_permissions_test.out b/client/test/0.2.0/expected/90_permissions_test.out index cea19cc..3c12c06 100644 --- a/client/test/0.2.0/expected/90_permissions_test.out +++ b/client/test/0.2.0/expected/90_permissions_test.out @@ -7,7 +7,7 @@ SET search_path TO public,cartodb,cdb_dataservices_client; 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, , Spain) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_admin0_polygon(username, orgname, country_name)" -PL/pgSQL function cdb_geocode_admin0_polygon(text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_admin0_polygon(text) line 16 at SQL statement cdb_geocode_admin0_polygon ---------------------------- @@ -16,7 +16,7 @@ PL/pgSQL function cdb_geocode_admin0_polygon(text) line 15 at SQL statement 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, , California) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_admin1_polygon(username, orgname, admin1_name)" -PL/pgSQL function cdb_geocode_admin1_polygon(text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_admin1_polygon(text) line 16 at SQL statement cdb_geocode_admin1_polygon ---------------------------- @@ -25,7 +25,7 @@ PL/pgSQL function cdb_geocode_admin1_polygon(text) line 15 at SQL statement 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, , California, United States) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_admin1_polygon(username, orgname, admin1_name, country_name)" -PL/pgSQL function cdb_geocode_admin1_polygon(text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_admin1_polygon(text,text) line 16 at SQL statement cdb_geocode_admin1_polygon ---------------------------- @@ -34,7 +34,7 @@ PL/pgSQL function cdb_geocode_admin1_polygon(text,text) line 15 at SQL statement 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, , Elx) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_namedplace_point(username, orgname, city_name)" -PL/pgSQL function cdb_geocode_namedplace_point(text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_namedplace_point(text) line 16 at SQL statement cdb_geocode_namedplace_point ------------------------------ @@ -43,7 +43,7 @@ PL/pgSQL function cdb_geocode_namedplace_point(text) line 15 at SQL statement 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, , Elx, Valencia) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_namedplace_point(username, orgname, city_name, country_name)" -PL/pgSQL function cdb_geocode_namedplace_point(text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_namedplace_point(text,text) line 16 at SQL statement cdb_geocode_namedplace_point ------------------------------ @@ -52,7 +52,7 @@ PL/pgSQL function cdb_geocode_namedplace_point(text,text) line 15 at SQL stateme 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, , Elx, Valencia, Spain) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_namedplace_point(username, orgname, city_name, admin1_name, country_name)" -PL/pgSQL function cdb_geocode_namedplace_point(text,text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_namedplace_point(text,text,text) line 16 at SQL statement cdb_geocode_namedplace_point ------------------------------ @@ -61,7 +61,7 @@ PL/pgSQL function cdb_geocode_namedplace_point(text,text,text) line 15 at SQL st 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, , 03204, Spain) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_postalcode_polygon(username, orgname, postal_code, country_name)" -PL/pgSQL function cdb_geocode_postalcode_polygon(text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_postalcode_polygon(text,text) line 16 at SQL statement cdb_geocode_postalcode_polygon -------------------------------- @@ -70,7 +70,7 @@ PL/pgSQL function cdb_geocode_postalcode_polygon(text,text) line 15 at SQL state 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, , 03204, Spain) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_postalcode_point(username, orgname, postal_code, country_name)" -PL/pgSQL function cdb_geocode_postalcode_point(text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_postalcode_point(text,text) line 16 at SQL statement cdb_geocode_postalcode_point ------------------------------ @@ -79,7 +79,7 @@ PL/pgSQL function cdb_geocode_postalcode_point(text,text) line 15 at SQL stateme 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, , 8.8.8.8) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_ipaddress_point(username, orgname, ip_address)" -PL/pgSQL function cdb_geocode_ipaddress_point(text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_ipaddress_point(text) line 16 at SQL statement cdb_geocode_ipaddress_point ----------------------------- @@ -88,7 +88,7 @@ PL/pgSQL function cdb_geocode_ipaddress_point(text) line 15 at SQL statement 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, , one street, 1, , , ) CONTEXT: SQL statement "SELECT cdb_dataservices_client._cdb_geocode_street_point(username, orgname, searchtext, city, state_province, country)" -PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 15 at SQL statement +PL/pgSQL function cdb_geocode_street_point(text,text,text,text) line 16 at SQL statement cdb_geocode_street_point --------------------------