CREATE ROLE cdo_group
  NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE;
  
CREATE ROLE cdo LOGIN
  PASSWORD 'cd0_us3r_p4ss'
  NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE;

GRANT cdo_group TO cdo;

CREATE DATABASE cdo
  WITH OWNER = cdo_group
       ENCODING = 'UTF8'
       TABLESPACE = pg_default
       LC_COLLATE = 'Spanish_Spain.1252'
       LC_CTYPE = 'Spanish_Spain.1252'
       CONNECTION LIMIT = -1;

GRANT ALL ON DATABASE cdo TO cdo_group;
