dbへアクセス
$ heroku pg:psql
SHOW DATABASES
=> \d
SELECT * FROM foos
=> SELECT * FROM foos;
# (MySQLと一緒)
実際にログインしたところ
$ heroku pg:psql
---> Connecting to HEROKU_POSTGRESQL_CRIMSON_URL (DATABASE_URL)
psql (9.1.5, server 9.3.2)
WARNING: psql version 9.1, server version 9.3.
Some psql features might not work.
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.
da41a3g4hv191h=> \d
List of relations
Schema | Name | Type | Owner
--------+-------------------+----------+----------------
public | calls | table | iqpuweabqkjiie
public | calls_id_seq | sequence | iqpuweabqkjiie
public | schema_migrations | table | iqpuweabqkjiie
(3 rows)
da41a3g4hv191h=> select * from calls;
id | message | to | created_at | updated_at
----+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+----------------------------+----------------------------
1 | oh | | 2013-12-09 15:34:05.42589 | 2013-12-09 15:34:05.42589
2 | yeah | | 2013-12-09 15:36:23.067689 | 2013-12-09 15:36:23.067689
3 | fugafuga | | 2013-12-09 15:36:47.679216 | 2013-12-09 15:36:47.679216
とりあえずこれだけ。