Missing cartodb schema
This commit is contained in:
parent
43d41e5c26
commit
66e2082266
@ -5,7 +5,7 @@
|
|||||||
-- Functions needing reading configuration should use SECURITY DEFINER.
|
-- 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' $$
|
DO LANGUAGE 'plpgsql' $$
|
||||||
BEGIN
|
BEGIN
|
||||||
CREATE TABLE IF NOT EXISTS cartodb.CDB_CONF ( KEY TEXT PRIMARY KEY, VALUE JSON NOT NULL );
|
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 $$
|
RETURNS void AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
PERFORM cartodb.CDB_Conf_RemoveConf(key);
|
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
|
END
|
||||||
$$ LANGUAGE PLPGSQL VOLATILE;
|
$$ LANGUAGE PLPGSQL VOLATILE;
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ CREATE OR REPLACE
|
|||||||
FUNCTION cartodb.CDB_Conf_RemoveConf(key text)
|
FUNCTION cartodb.CDB_Conf_RemoveConf(key text)
|
||||||
RETURNS void AS $$
|
RETURNS void AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
EXECUTE 'DELETE FROM CDB_CONF WHERE KEY = $1;' USING key;
|
EXECUTE 'DELETE FROM cartodb.CDB_CONF WHERE KEY = $1;' USING key;
|
||||||
END
|
END
|
||||||
$$ LANGUAGE PLPGSQL VOLATILE;
|
$$ LANGUAGE PLPGSQL VOLATILE;
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ FUNCTION cartodb.CDB_Conf_GetConf(key text)
|
|||||||
DECLARE
|
DECLARE
|
||||||
value JSON;
|
value JSON;
|
||||||
BEGIN
|
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;
|
RETURN value;
|
||||||
END
|
END
|
||||||
$$ LANGUAGE PLPGSQL STABLE;
|
$$ LANGUAGE PLPGSQL STABLE;
|
||||||
|
Loading…
Reference in New Issue
Block a user