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
|
|
|
|
|
2016-02-06 00:57:56 +08:00
|
|
|
CREATE OR REPLACE FUNCTION cdb_dataservices_client._server_conn_str()
|
2015-11-12 00:50:22 +08:00
|
|
|
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;
|
2016-04-20 17:17:30 +08:00
|
|
|
$$ LANGUAGE 'plpgsql';
|