Reputation: 486
I'm trying to learn about databases from the book seven databases in seven weeks and I don't understand the environment psql shell...
In the book they simply say following (I assume they mean to use the shell)
create a schema called book using the command
$ createdb book
but the shell just asks for server, username, port, database and only allows connecting to the already created database postgres that is a maintanence database, whatever that means... The shell doesn't respond at all to the createdb-command.
What have I misunderstood and how do I create a database and use it in psql shell? It sucks to have bought a book in the beginning of a course not being able to use it.
Upvotes: 0
Views: 3231
Reputation: 5398
createdb
is an operating system utility. Run it in Windows command shell (cmd), like any other commands in this book starting with dollar sign.
Alternatively you can issue create database book;
command in psql -- it's the same thing.
Upvotes: 2