Working up the postgresql database setup.