mounaim
mounaim

Reputation: 1180

Unable to create new Postgres database

I'm unable to create a new database for the first time after installing postgres.app on my macbook pro
enter image description here

Anyone here can point me to the origin of the problem ?

Upvotes: 1

Views: 4379

Answers (1)

user330315
user330315

Reputation:

createdb is not a SQL statement, it's program for the command line (like psql or grep).

Inside psql you need to use the SQL statement CREATE DATABASE:
http://www.postgresql.org/docs/current/static/sql-createdatabase.html

And don't forget to terminate every SQL statement with a ; (if you had done that with createdb you would have gotten an error message immediately).

Upvotes: 6

Related Questions