From 0ed477d264f4a3b224e27d8205d15c3794cf9e50 Mon Sep 17 00:00:00 2001 From: Antonio Date: Mon, 15 Jan 2018 11:18:04 +0100 Subject: [PATCH] Generated sql files --- client/cdb_dataservices_client--0.23.0.sql | 14 ++++++++------ .../extension/cdb_dataservices_server--0.30.0.sql | 1 - 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/client/cdb_dataservices_client--0.23.0.sql b/client/cdb_dataservices_client--0.23.0.sql index 783be74..d57b96d 100644 --- a/client/cdb_dataservices_client--0.23.0.sql +++ b/client/cdb_dataservices_client--0.23.0.sql @@ -450,7 +450,7 @@ $$ LANGUAGE 'plpgsql' SECURITY DEFINER STABLE PARALLEL UNSAFE; -- These are the only ones with permissions to publicuser role -- and should also be the only ones with SECURITY DEFINER -CREATE OR REPLACE FUNCTION cdb_dataservices_client.cdb_mapbox_geocode_street_point (searchtext text, city text DEFAULT NULL, state_province text DEFAULT NULL, country text DEFAULT NULL) +CREATE OR REPLACE FUNCTION cdb_dataservices_client.cdb_mapbox_geocode_street_point (searchtext text ,city text DEFAULT NULL ,state_province text DEFAULT NULL ,country text DEFAULT NULL) RETURNS Geometry AS $$ DECLARE ret Geometry; @@ -550,7 +550,7 @@ $$ LANGUAGE 'plpgsql' SECURITY DEFINER STABLE PARALLEL UNSAFE; -- These are the only ones with permissions to publicuser role -- and should also be the only ones with SECURITY DEFINER -CREATE OR REPLACE FUNCTION cdb_dataservices_client.cdb_mapbox_isochrone (source geometry(Geometry, 4326), mode text, range integer[], options text[] DEFAULT ARRAY[]::text[]) +CREATE OR REPLACE FUNCTION cdb_dataservices_client.cdb_mapbox_isochrone (source geometry(Geometry, 4326) ,mode text ,range integer[] ,options text[] DEFAULT ARRAY[]::text[]) RETURNS SETOF cdb_dataservices_client.isoline AS $$ DECLARE @@ -600,7 +600,7 @@ $$ LANGUAGE 'plpgsql' SECURITY DEFINER STABLE PARALLEL UNSAFE; -- These are the only ones with permissions to publicuser role -- and should also be the only ones with SECURITY DEFINER -CREATE OR REPLACE FUNCTION cdb_dataservices_client.cdb_mapbox_isodistance (source geometry(Geometry, 4326), mode text, range integer[], options text[] DEFAULT ARRAY[]::text[]) +CREATE OR REPLACE FUNCTION cdb_dataservices_client.cdb_mapbox_isodistance (source geometry(Geometry, 4326) ,mode text ,range integer[] ,options text[] DEFAULT ARRAY[]::text[]) RETURNS SETOF cdb_dataservices_client.isoline AS $$ DECLARE @@ -2374,7 +2374,7 @@ $$ LANGUAGE 'plpgsql' SECURITY DEFINER STABLE PARALLEL UNSAFE; -- Exception-safe private DataServices API function -- -CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_mapbox_geocode_street_point_exception_safe (searchtext text, city text DEFAULT NULL, state_province text DEFAULT NULL, country text DEFAULT NULL) +CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_mapbox_geocode_street_point_exception_safe (searchtext text ,city text DEFAULT NULL ,state_province text DEFAULT NULL ,country text DEFAULT NULL) RETURNS Geometry AS $$ DECLARE ret Geometry; @@ -2518,7 +2518,7 @@ $$ LANGUAGE 'plpgsql' SECURITY DEFINER STABLE PARALLEL UNSAFE; -- Exception-safe private DataServices API function -- -CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_mapbox_isochrone_exception_safe(source geometry(Geometry, 4326), mode text, range integer[], options text[] DEFAULT ARRAY[]::text[]) +CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_mapbox_isochrone_exception_safe (source geometry(Geometry, 4326) ,mode text ,range integer[] ,options text[] DEFAULT ARRAY[]::text[]) RETURNS SETOF cdb_dataservices_client.isoline AS $$ DECLARE @@ -2590,7 +2590,7 @@ $$ LANGUAGE 'plpgsql' SECURITY DEFINER STABLE PARALLEL UNSAFE; -- Exception-safe private DataServices API function -- -CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_mapbox_isodistance_exception_safe(source geometry(Geometry, 4326), mode text, range integer[], options text[] DEFAULT ARRAY[]::text[]) +CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_mapbox_isodistance_exception_safe (source geometry(Geometry, 4326) ,mode text ,range integer[] ,options text[] DEFAULT ARRAY[]::text[]) RETURNS SETOF cdb_dataservices_client.isoline AS $$ DECLARE @@ -4135,6 +4135,7 @@ RETURNS Geometry AS $$ SELECT cdb_dataservices_server.cdb_google_geocode_street_point (username, orgname, searchtext, city, state_province, country); $$ LANGUAGE plproxy VOLATILE PARALLEL UNSAFE; +DROP FUNCTION IF EXISTS cdb_dataservices_client._cdb_mapbox_geocode_street_point (username text, orgname text, searchtext text, city text, state_province text, country text); CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_mapbox_geocode_street_point (username text, orgname 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(); @@ -4166,6 +4167,7 @@ RETURNS SETOF cdb_dataservices_client.isoline AS $$ SELECT * FROM cdb_dataservices_server.cdb_isochrone (username, orgname, source, mode, range, options); $$ LANGUAGE plproxy VOLATILE PARALLEL UNSAFE; +DROP FUNCTION IF EXISTS cdb_dataservices_client._cdb_mapbox_isochrone (username text, orgname text, source geometry(Geometry, 4326), mode text, range integer[], options text[]); CREATE OR REPLACE FUNCTION cdb_dataservices_client._cdb_mapbox_isochrone (username text, orgname text, source geometry(Geometry, 4326), mode text, range integer[], options text[] DEFAULT ARRAY[]::text[]) RETURNS SETOF cdb_dataservices_client.isoline AS $$ CONNECT cdb_dataservices_client._server_conn_str(); diff --git a/server/extension/cdb_dataservices_server--0.30.0.sql b/server/extension/cdb_dataservices_server--0.30.0.sql index 59c91d9..5d58cda 100644 --- a/server/extension/cdb_dataservices_server--0.30.0.sql +++ b/server/extension/cdb_dataservices_server--0.30.0.sql @@ -1764,7 +1764,6 @@ RETURNS boolean AS $$ GD[cache_key] = obs_config return True $$ LANGUAGE plpythonu SECURITY DEFINER STABLE PARALLEL RESTRICTED; - DO $$ BEGIN IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'service_type') THEN