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?
Heroku Postgres is a managed SQL database service provided directly by Heroku. You can access a Heroku Postgres database from any language with a PostgreSQL driver, including all languages officially supported by Heroku.
From the application dashboard on Heroku, go to the 'resources' tab and search for postgres. Provision it and use the free option. There's now a clickable link to the Datastore associated with your application. Go ahead and open the link to your datastore, and take note of exactly how to get here again.
You need a semicolon at the end of the query:
select * from users;
Run this
heroku pg:psql -c "command" --app "name-app"
sample
heroku pg:psql -c "\?" --app app-sample
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With