Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I created a new database test and created user 'eonil' with this command:

CREATE ROLE eonil LOGIN ENCRYPTED PASSWORD 'password' NOINHERIT VALID UNTIL 'infinity';

on my PostgreSQL. I run psql -U eonil test. When I tried to make a new schema, it shows an error.

test=> CREATE SCHEMA new_schema AUTHORIZATION eonil;
ERROR:  permission denied for database test
test=> 

Why does this make an error? What's required?

share|improve this question

1 Answer 1

Grant the user CREATE privilege on the database, e.g.

GRANT CREATE ON DATABASE test TO eonil
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.