_CDB_Group_GroupRole based on current database m5

This commit is contained in:
Juan Ignacio Sánchez Lara 2015-08-10 16:15:04 +02:00
parent 9a3fbb668c
commit 154f6df1dc

View File

@ -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;