postgresql - postgres issues with role trying to create a new database -
being newbie postgres. i'm little confused on roles , why unable create database under role shows role has "create db" attribute.
for example there existing role name "mas" in system can create db.
postgres=> \du list of roles role name | attributes | member of ------------------------+------------------------------------------------+----------------------------------------------- mas | create role, create db +| {rds_superuser,abc_user,def_user,biuser} | password valid until infinity |
using psql, able login database command line so:
psql -h mas.myserver.com -p 5432 -u mas postgres
now, want create database using this: "createdb.sql'
create database mas_dev_123 owner = mas encoding = 'utf8' tablespace = pg_default lc_collate = 'en_us.utf-8' lc_ctype = 'en_us.utf-8' connection limit = -1; postgres=> \i createdb.sql psql:createdb.sql:11: error: role "mas" not exist
its clear using \du
, role mas
exists. so, missing or doing wrong here?
Comments
Post a Comment