Set safe path
This commit is contained in:
@@ -26,4 +26,5 @@ BEGIN
|
|||||||
|
|
||||||
<% return_statement do %><%= DATASERVICES_CLIENT_SCHEMA %>._<%= name %>(<%= params(_with_user_org=true).join(', ') %>)<% end %>
|
<% return_statement do %><%= DATASERVICES_CLIENT_SCHEMA %>._<%= name %>(<%= params(_with_user_org=true).join(', ') %>)<% end %>
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql' SECURITY DEFINER STABLE PARALLEL UNSAFE;
|
$$ LANGUAGE 'plpgsql' SECURITY DEFINER STABLE PARALLEL UNSAFE
|
||||||
|
SET search_path = pg_temp;
|
||||||
|
|||||||
@@ -37,4 +37,5 @@ BEGIN
|
|||||||
<%= return_statement %>
|
<%= return_statement %>
|
||||||
END;
|
END;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql' SECURITY DEFINER STABLE PARALLEL UNSAFE;
|
$$ LANGUAGE 'plpgsql' SECURITY DEFINER STABLE PARALLEL UNSAFE
|
||||||
|
SET search_path = pg_temp;
|
||||||
|
|||||||
@@ -31,4 +31,6 @@ BEGIN
|
|||||||
result.apikey_permissions = apikey_config->'permissions';
|
result.apikey_permissions = apikey_config->'permissions';
|
||||||
RETURN result;
|
RETURN result;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql' SECURITY DEFINER STABLE PARALLEL SAFE;
|
$$ LANGUAGE 'plpgsql' SECURITY DEFINER STABLE PARALLEL SAFE
|
||||||
|
SET search_path = pg_temp;
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,9 @@ BEGIN
|
|||||||
|
|
||||||
RETURN result;
|
RETURN result;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql' SECURITY DEFINER VOLATILE PARALLEL UNSAFE;
|
$$ LANGUAGE 'plpgsql' SECURITY DEFINER VOLATILE PARALLEL UNSAFE
|
||||||
|
SET search_path = pg_temp;
|
||||||
|
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_client._DST_PopulateTableOBS_GetMeasure(
|
CREATE OR REPLACE FUNCTION cdb_dataservices_client._DST_PopulateTableOBS_GetMeasure(
|
||||||
table_name text,
|
table_name text,
|
||||||
@@ -89,7 +91,9 @@ BEGIN
|
|||||||
|
|
||||||
RETURN result;
|
RETURN result;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql' SECURITY DEFINER VOLATILE PARALLEL UNSAFE;
|
$$ LANGUAGE 'plpgsql' SECURITY DEFINER VOLATILE PARALLEL UNSAFE
|
||||||
|
SET search_path = pg_temp;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION cdb_dataservices_client.__DST_PrepareTableOBS_GetMeasure(
|
CREATE OR REPLACE FUNCTION cdb_dataservices_client.__DST_PrepareTableOBS_GetMeasure(
|
||||||
|
|||||||
@@ -86,4 +86,5 @@ BEGIN
|
|||||||
|
|
||||||
RETURN QUERY EXECUTE 'SELECT * FROM ' || quote_ident(temp_table_name);
|
RETURN QUERY EXECUTE 'SELECT * FROM ' || quote_ident(temp_table_name);
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql' SECURITY DEFINER VOLATILE PARALLEL UNSAFE;
|
$$ LANGUAGE 'plpgsql' SECURITY DEFINER VOLATILE PARALLEL UNSAFE
|
||||||
|
SET search_path = pg_temp;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ RETURNS SETOF cdb_dataservices_client.geocoding AS $$
|
|||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'called with this searches: %', searches;
|
RAISE NOTICE 'called with this searches: %', searches;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql' SECURITY DEFINER STABLE PARALLEL UNSAFE;
|
$$ LANGUAGE 'plpgsql' SECURITY DEFINER STABLE PARALLEL UNSAFE SET search_path = pg_temp;
|
||||||
-- No permissions granted
|
-- No permissions granted
|
||||||
-- Test bulk size not mandatory (it will get the optimal)
|
-- Test bulk size not mandatory (it will get the optimal)
|
||||||
SELECT cdb_dataservices_client.cdb_bulk_geocode_street_point('select 1 as cartodb_id', '''Valladolid, Spain''', null, null, null, null);
|
SELECT cdb_dataservices_client.cdb_bulk_geocode_street_point('select 1 as cartodb_id', '''Valladolid, Spain''', null, null, null, null);
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ RETURNS SETOF cdb_dataservices_client.geocoding AS $$
|
|||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'called with this searches: %', searches;
|
RAISE NOTICE 'called with this searches: %', searches;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE 'plpgsql' SECURITY DEFINER STABLE PARALLEL UNSAFE;
|
$$ LANGUAGE 'plpgsql' SECURITY DEFINER STABLE PARALLEL UNSAFE SET search_path = pg_temp;
|
||||||
|
|
||||||
-- No permissions granted
|
-- No permissions granted
|
||||||
-- Test bulk size not mandatory (it will get the optimal)
|
-- Test bulk size not mandatory (it will get the optimal)
|
||||||
|
|||||||
Reference in New Issue
Block a user