\set ON_ERROR_STOP on

CREATE USER nubauser WITH PASSWORD 'nuba_password';

CREATE DATABASE nubarchiva
  WITH OWNER = nubauser
       ENCODING = 'UTF8'
       LC_COLLATE = 'es_ES.UTF-8'
       LC_CTYPE = 'es_ES.UTF-8'
       TEMPLATE = template0;

GRANT ALL PRIVILEGES ON DATABASE nubarchiva to nubauser;
