diff --git a/server/extension/cdb_geocoder_server--0.0.1--0.1.0.sql b/server/extension/cdb_geocoder_server--0.0.1--0.1.0.sql index 43aa150..cc2f44f 100644 --- a/server/extension/cdb_geocoder_server--0.0.1--0.1.0.sql +++ b/server/extension/cdb_geocoder_server--0.0.1--0.1.0.sql @@ -47,6 +47,7 @@ RETURNS boolean AS $$ } return True $$ LANGUAGE plpythonu; + -- Get the Redis configuration from the _conf table -- CREATE OR REPLACE FUNCTION cdb_geocoder_server._get_geocoder_config(username text, orgname text) RETURNS boolean AS $$ @@ -71,7 +72,8 @@ RETURNS boolean AS $$ # --for this user session but... GD[cache_key] = geocoder_config return True -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpythonu SECURITY DEFINER; + -- Geocodes a street address given a searchtext and a state and/or country CREATE OR REPLACE FUNCTION cdb_geocoder_server.cdb_geocode_street_point_v2(username TEXT, orgname TEXT, searchtext TEXT, city TEXT DEFAULT NULL, state_province TEXT DEFAULT NULL, country TEXT DEFAULT NULL) RETURNS Geometry AS $$ diff --git a/server/extension/sql/0.1.0/15_config_helper.sql b/server/extension/sql/0.1.0/15_config_helper.sql index dd37953..39a8af2 100644 --- a/server/extension/sql/0.1.0/15_config_helper.sql +++ b/server/extension/sql/0.1.0/15_config_helper.sql @@ -22,4 +22,4 @@ RETURNS boolean AS $$ # --for this user session but... GD[cache_key] = geocoder_config return True -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpythonu SECURITY DEFINER;