0

postgres has created a postgresql user foo,

$ sudo -u postgres createuser -d -P foo
Enter password for new role: foo
Enter it again: foo

Can foo create a database, let us say foo?

asked Apr 29, 2014 at 15:42
1
  • Run psql -U foo then run create database Commented Apr 30, 2014 at 6:37

1 Answer 1

2

http://www.postgresql.org/docs/current/static/app-createuser.html

-d --createdb The new user will be allowed to create databases.

So as you have used the -d parameter the user foo should have the permission to create databases like this:

createdb -h localhost -U foo foos_db
answered Apr 29, 2014 at 16:22

1 Comment

I know. I used that option. What is the command by which foo creates the database?

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.