postgresql

All posts tagged postgresql

install-postgresql-934-on-mac

PostgreSQL is a pretty common database choice these days. It’s quick and fairly easy to set up but a lot of the information I’ve seen online makes it much harder than it has to be so I’m going to put my notes here.

  1. Download PostgreSQL and follow the installation guide for your flavor
  2. Fire up your console and type $ psql to open the Postgres command line
    1. From here you should do all of the commands you find online
    2. Everything you find on http://www.postgresql.org/docs/ will work in the command line
    3. This will be your main interaction between you and your PostgreSQL databases
  3. Create a Database – CREATE DATABASE my_new_database
  4. Read the docs and do some Google searches to find all of the commands you’ll need. There are way too many to list here and they all have their uses.

That should get you up and running. If you are doing a web development project your web framework would probably take over from here once you have your databases created. Django would create tables on its own, especially with South or 1.7 with migrations. Ruby on Rails could create tables using $ rake db:create or for more developed projects $ rake db:schema:load.

As usual if there is anything I’ve missed or questions that you have feel free to leave a comment below.