2015-11-12 00:50:22 +08:00
|
|
|
--
|
|
|
|
-- Geocoder server connection config
|
|
|
|
--
|
|
|
|
-- The purpose of this function is provide to the PL/Proxy functions
|
|
|
|
-- the connection string needed to connect with the server
|
|
|
|
|
|
|
|
CREATE OR REPLACE FUNCTION cdb_geocoder_client._server_conn_str()
|
|
|
|
RETURNS text AS $$
|
|
|
|
DECLARE
|
|
|
|
db_connection_str text;
|
|
|
|
BEGIN
|
2015-11-17 19:01:18 +08:00
|
|
|
SELECT cartodb.cdb_conf_getconf('geocoder_server_config')->'connection_str' INTO db_connection_str;
|
2015-11-12 00:50:22 +08:00
|
|
|
SELECT trim(both '"' FROM db_connection_str) INTO db_connection_str;
|
|
|
|
RETURN db_connection_str;
|
|
|
|
END;
|
2015-11-17 19:01:18 +08:00
|
|
|
$$ LANGUAGE 'plpgsql';
|