Roles simplification, without md5 and prepending database name

This commit is contained in:
Juan Ignacio Sánchez Lara
2015-08-12 20:01:07 +02:00
parent 2ece2979a6
commit 3ee4978240
3 changed files with 15 additions and 9 deletions

View File

@@ -31,9 +31,10 @@ $$ LANGUAGE PLPGSQL VOLATILE;
CREATE OR REPLACE
FUNCTION cartodb._CDB_Organization_Admin_Role_Name()
RETURNS TEXT
AS 'SELECT ''cdb_org_admin''::text || ''_'' || md5(current_database());'
AS 'SELECT current_database() || ''_admin''::text;'
LANGUAGE SQL IMMUTABLE;
-- Administrator role creation on extension install
DO LANGUAGE 'plpgsql' $$
DECLARE
cdb_org_admin_role_name TEXT;