-
Notifications
You must be signed in to change notification settings - Fork 6
PostgreSQL
Polina Soshnin edited this page Jan 26, 2016
·
14 revisions
- Installing on Mac: http://postgresapp.com/
- Postgres basics by example: http://blog.trackets.com/2013/08/19/postgresql-basics-by-example.html
- Node Postgres client: https://github.com/brianc/node-postgres
####Locally
Connecting to a database:
$ psql postgres # the default database
$ psql database_name
postgres=# \c database_name
- Quit:
\q
- Describe table schema:
\d "Messages";
Checking which port you're on:
select * from pg_settings where name = 'port';
- Heroku Postgres addon (uses Amazon RDS)
- Use Amazon RDS directly
- https://devcenter.heroku.com/articles/heroku-postgresql
- Debugging prod server logs:
heroku login
heroku logs --tail --app matchjs
- Accessing our Database: Connecting locally:
heroku login
,heroku pg:psql --app matchjs
- Setup: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SettingUp.html
- Connecting locally:
psql --host=postgres-match-dev.co6f9ijf2gka.us-west-2.rds.amazonaws.com --port=5432 --username=psoshnin --password --dbname=matchjs