b8527514b7
I'm not 100% sure what's appropiate for plproxy functions so, for now, I've set them up as VOLATILE and PARALLEL UNSAFE
17 lines
551 B
PL/PgSQL
17 lines
551 B
PL/PgSQL
--
|
|
-- 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_dataservices_client._server_conn_str()
|
|
RETURNS text AS $$
|
|
DECLARE
|
|
db_connection_str text;
|
|
BEGIN
|
|
SELECT cartodb.cdb_conf_getconf('geocoder_server_config')->'connection_str' INTO db_connection_str;
|
|
SELECT trim(both '"' FROM db_connection_str) INTO db_connection_str;
|
|
RETURN db_connection_str;
|
|
END;
|
|
$$ LANGUAGE 'plpgsql' STABLE PARALLEL SAFE;
|