I have windows, git bash,pg-admin 3, a Heroku app with a PostgreSQL database,Is there any git bash command to get the db and tables name? because i forgot the names and i can not make any query (select * from (?) )
I have tried:
\list command in git bash, but does not exist.
Looking from Heroku web but no success.
Is there any way to get the names?
git bash is simply a Cygwin-esque bash emulator that allows git to be run under Windows. Just as there is no native bash command to interact with Postgres, neither would there be one for git bash. You would need a separate program in either case.
Heroku has a special version of the regular Postgres psql called pg:psql which will let you run queries on the tables in your Heroku Postgres instance.
So you could run, for example:
SELECT * FROM users ORDER BY id;
More info on this tool is available here:
https://devcenter.heroku.com/articles/heroku-postgresql#pg-psql
More info on Postgres psql here:
http://www.postgresql.org/docs/9.3/static/app-psql.html
As mentioned by the user
heroku pg:psql
select * from information_schema.tables;
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