Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed PostgreSQL on a Windows XP laptop so I can learn about using PostgreSQL. My problem is that the PostgreSQL tutorial starts of with the instruction

To create a new database, in this example named mydb, you use the following command:

$ createdb mydb

My problem is that it doesn't tell me how/where to input the command. I have found access to an SQL Shell but it doesn't perform as expected.

What is the 'proper' way to input commands?

No GUI ?

share|improve this question
Should I be using pgAdminIII ? – nigellaw Jan 5 '13 at 20:06
up vote 0 down vote accepted

createdb is a commandline tool which should be run in a Windows commandline window ("Start -> Run -> "cmd.exe"). You have to have PostgreSQL's bin directory in the windows PATH in order for this to work without supplying the full program path.

As an alternative you can run SQL statements using the program psql (which is also a commandline program). You probably also have a start menu entry in the PostgreSQL folder name "SQL Shell" (or something similar) which starts psql directly.

A list of GUI tools (apart from pgAdmin) is available here:

share|improve this answer
pgAdminIII is the answer to my question. I have found a tutorial that explains its functions. I cant post this as an answer yet though :) – nigellaw Jan 5 '13 at 20:42
I would upvote your answer a_horse_with_no_name but I dont have the rep yet. Thank you anyway :) – nigellaw Jan 5 '13 at 21:25
I have accepted the answer given realising that there is no one right answer. The command line options will all work but having been used to do everything with a GUI, the pgAdminIII option suits me better. – nigellaw Jan 6 '13 at 11:21

Your Answer


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.