This commit is contained in:
Gonzalo Riestra 2019-03-08 09:18:46 +01:00
parent e3138cd56a
commit 50e41179fc

View File

@ -1,5 +1,6 @@
-- Create user and enable Ghost tables trigger
\set QUIET on
SET client_min_messages TO error;
CREATE ROLE "fulano" LOGIN;
GRANT ALL ON SCHEMA cartodb TO "fulano";
GRANT SELECT ON cartodb.cdb_ddl_execution TO "fulano";
@ -8,6 +9,7 @@ GRANT EXECUTE ON FUNCTION CDB_LinkGhostTables() TO "fulano";
SELECT CDB_EnableGhostTablesTrigger();
INSERT INTO cdb_conf (key, value) VALUES ('api_keys_fulano', '{"username": "fulanito", "permissions":[]}');
SET SESSION AUTHORIZATION "fulano";
SET client_min_messages TO notice;
\set QUIET off
SELECT CDB_LinkGhostTables(); -- _CDB_LinkGhostTables called