From 154f6df1dcae4c99c00cdaff624d55b3acab5f08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Ignacio=20S=C3=A1nchez=20Lara?= Date: Mon, 10 Aug 2015 16:15:04 +0200 Subject: [PATCH] _CDB_Group_GroupRole based on current database m5 --- scripts-available/CDB_Groups.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts-available/CDB_Groups.sql b/scripts-available/CDB_Groups.sql index d87c2f3..e232768 100644 --- a/scripts-available/CDB_Groups.sql +++ b/scripts-available/CDB_Groups.sql @@ -106,8 +106,10 @@ $$ LANGUAGE PLPGSQL; CREATE OR REPLACE FUNCTION cartodb._CDB_Group_GroupRole(group_name text) RETURNS TEXT AS $$ +DECLARE + group_role TEXT; BEGIN - RETURN cartoDB.CDB_Organization_Member_Group_Role_Member_Name() || '_g_' || group_name; + RETURN 'g_' || md5(current_database()) || '_' || group_name; END $$ LANGUAGE PLPGSQL;