diff --git a/scripts-available/CDB_Conf.sql b/scripts-available/CDB_Conf.sql index 77cf758..55059f3 100644 --- a/scripts-available/CDB_Conf.sql +++ b/scripts-available/CDB_Conf.sql @@ -5,7 +5,7 @@ -- Functions needing reading configuration should use SECURITY DEFINER. ---------------------------------- --- This will trigger NOTICE if CDB_CONF already exists +-- This will trigger NOTICE if cartodb.CDB_CONF already exists DO LANGUAGE 'plpgsql' $$ BEGIN CREATE TABLE IF NOT EXISTS cartodb.CDB_CONF ( KEY TEXT PRIMARY KEY, VALUE JSON NOT NULL ); @@ -17,7 +17,7 @@ FUNCTION cartodb.CDB_Conf_SetConf(key text, value JSON) RETURNS void AS $$ BEGIN PERFORM cartodb.CDB_Conf_RemoveConf(key); - EXECUTE 'INSERT INTO CDB_CONF (KEY, VALUE) VALUES ($1, $2);' USING key, value; + EXECUTE 'INSERT INTO cartodb.CDB_CONF (KEY, VALUE) VALUES ($1, $2);' USING key, value; END $$ LANGUAGE PLPGSQL VOLATILE; @@ -25,7 +25,7 @@ CREATE OR REPLACE FUNCTION cartodb.CDB_Conf_RemoveConf(key text) RETURNS void AS $$ BEGIN - EXECUTE 'DELETE FROM CDB_CONF WHERE KEY = $1;' USING key; + EXECUTE 'DELETE FROM cartodb.CDB_CONF WHERE KEY = $1;' USING key; END $$ LANGUAGE PLPGSQL VOLATILE; @@ -35,7 +35,7 @@ FUNCTION cartodb.CDB_Conf_GetConf(key text) DECLARE value JSON; BEGIN - EXECUTE 'SELECT VALUE FROM CDB_CONF WHERE KEY = $1;' INTO value USING key; + EXECUTE 'SELECT VALUE FROM cartodb.CDB_CONF WHERE KEY = $1;' INTO value USING key; RETURN value; END $$ LANGUAGE PLPGSQL STABLE;