How to use pg:psql in heroku?

simo picture simo · Feb 5, 2013 · Viewed 39.4k times · Source

I am trying to detect my db at heroku terminal like this:

myapp@ubuntu:~/RubymineProjects/myapp$ heroku pg:info
The plugin heroku-sql-console has been deprecated. Would you like to remove it? (y/N) n
=== HEROKU_POSTGRESQL_JADE_URL (DATABASE_URL)
Plan:        Dev
Status:      available
Connections: 1
PG Version:  9.1.6
Created:     2012-10-10 19:59 UTC
Data Size:   9.1 MB
Tables:      32
Rows:        2802/10000 (In compliance)
Fork/Follow: Unsupported

So, I tried:

myapp@ubuntu:~/RubymineProjects/myapp$ heroku pg:psql
The plugin heroku-sql-console has been deprecated. Would you like to remove it? (y/N) n
psql (9.1.7, server 9.1.6)
SSL connection (cipher: **-**-****-**, bits: 256)
Type "help" for help.

I need to list all users records:

dbfjinfaes61gb=> select * from users
dbfjinfaes61gb-> 

But above, nothing happened, what I am missing here?

Answer

Clodoaldo Neto picture Clodoaldo Neto · Feb 5, 2013

You need a semicolon at the end of the query:

select * from users;