dekuShrub
dekuShrub

Reputation: 486

Starting out with psql shell for PostgreSQL in windows

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.

this is what it looks like enter image description here

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

Answers (1)

Egor Rogov
Egor Rogov

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

Related Questions