From e231500c469eb7f853129e55f91361bf7a127238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Wed, 13 Nov 2019 14:08:31 +0100 Subject: [PATCH] Give permissions over cartodb to the FS role --- scripts-available/CDB_FederatedServer.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts-available/CDB_FederatedServer.sql b/scripts-available/CDB_FederatedServer.sql index 6d3549a..c496e59 100644 --- a/scripts-available/CDB_FederatedServer.sql +++ b/scripts-available/CDB_FederatedServer.sql @@ -238,6 +238,8 @@ BEGIN EXECUTE FORMAT('CREATE ROLE %I NOLOGIN', role_name); END IF; EXECUTE FORMAT('GRANT ALL PRIVILEGES ON DATABASE %I TO %I', current_database(), role_name); + EXECUTE FORMAT('GRANT ALL ON SCHEMA %I TO %I', '@extschema@', role_name); + EXECUTE FORMAT('GRANT EXECUTE ON ALL FUNCTIONS in SCHEMA %I TO %I', '@extschema@', role_name); EXECUTE FORMAT('GRANT USAGE ON FOREIGN DATA WRAPPER postgres_fdw TO %I', role_name); EXECUTE FORMAT('GRANT USAGE ON FOREIGN DATA WRAPPER postgres_fdw TO %I', role_name); EXECUTE FORMAT('GRANT USAGE ON FOREIGN SERVER %I TO %I', server_internal, role_name);