views:

19

answers:

1

I have created a ROLE with name Admin and I have given it all accesses (including CREATEDB). I have created a User ekekakos who is member of Admin role and inherints from it. When I am trying to create a new DB with ekekakos I am getting the following message: ERROR. PERMISSION DENIED TO CREATE DATABASE. When I enable the option CAN CREATE DB to the user ekekakos, the database is created. Why the user do not take the privilages of the role Admin?

Thanks

+2  A: 

Excerpt from the docs:

The role attributes LOGIN, SUPERUSER, CREATEDB, and CREATEROLE can be thought of as special privileges, but they are never inherited as ordinary privileges on database objects are. You must actually SET ROLE to a specific role having one of these attributes in order to make use of the attribute.

Milen A. Radev