Heroku pg:psql stalls out - postgresql

When i run heroku pg:psql i get --> Connecting to postgresql-cylindrical-38664
and stalls out. Everything is looking good to go, it just gets stuck and doesn't do anything.

I seem to have the same issue in gitbash but when using command prompt, it seems to work.
In command prompt, this works: heroku pg:psql --app={appnameinheroku}.
You can see the apps you have to choose from by running heroku apps.

On Windows when using GitBash or Command Prompt you may encounter this issue.
The fix that works only in Command Prompt is: heroku pg:psql --app herokuappname

Related

heroku pg:psql pends and doesn't even display any errors (Windows)

So I've created a Heroku app and a database for it. When I use the terminal (Git Bash), commands like heroku pg:info work just fine and show that the database exists and is connected to my app. However, when I type heroku pg:psql (or heroku pg:psql DATABASE_URL), it says --> Connecting to postgresql-reticulated-30033:
heroku pg:psql result
And then nothing happens. It doesn't display any errors like "unable to reach database" or anything. I couldn't find a clear solution for this problem, nobody else seems to be having no responses whatsoever. I've seen suggestions like "maybe ports 5000 and 5432 are blocked by a corporate firewall" but I'm not sure where to even go from here.
pls hlp
So I had a bright idea to try this in regular Windows Command Prompt and it worked right away. So it solves my problem for now, though I still don't know why it wouldn't work in Git Bash.

`heroku pg:psql` doesnt work but psql works

Note: I'm on windows.
After installing postgreSQL in my computer trying to use heroku pg:psql gives me this error:
--> Connecting to postgresql-defined-56809
! The local psql command could not be located. For help installing psql, see
! https://devcenter.heroku.com/articles/heroku-postgresql#local-setup
The psql command works and psql --version returns the same version that my database uses on heroku as returned by heroku pg:info.
I have followed the instructions in that link and it still doesn't work (well I did that from the beginning). I even restarted my computer but it still doesn't work.
Edit: found that psql runs in powershell but not in cmd
Okay so after trying to set up the PATH from cmd I think I messed something up and the heroku command didnt work anymore and I reinstalled heroku and now everything works fine. What a waste of time.

How can I confirm that Postgres had been installed properly for Heroku use?

I am using Heroku and thus the Postgres is needed to be properly installed.
I used the Windows Installer "postgresql-10.1-3-windows-x64.exe" for my installation, and there was not special interruption during the installation.
However, after I deployed a Heroku app on web, and try to run ">pipenv --three" in my cmd windows, there's a message of ' "command" is not recognized as an internal or external command, operable program or batch file.', which make me not sure whether Postgres is properly installed.
I also tried to run the command "heroku pg:psql", and the result is as below:-
heroku pg:psql
Is that really because the Postgres is not properly installed, and how can I get it fixed? Thank you in advance for the help!
Environment:-
Windows 10 Home - 64-bit
Postgre Installer: postgresql-10.1-3-windows-x64.exe
Heroku: heroku-cli/6.15.18-fd2097 (win32-x64) node-v9.3.0
I finally got it solved, by adding the following into the $PATH.
%APPDATA%\Python\Python36\Scripts
It's not the matter of the installation.
Thx.

How Do I Open Heroku PostgresQL Database from my Terminal (I need the command)

What is the command to open Heroku PostgresQL database from my Terminal?
Oh wow it's simple, but it's hard to find docs on:
heroku pg:psql

Push local postgresql database to heroku: The local psql command could not be located

I'm trying to push a local postgresql database to my heroku project. Unfortunately, it doesn't work.
Postgresql works perfectly on my computer and the psql command works as well (Path is set correctly to the bin folder)!
But when I try to push my databse with
heroku pg:push mylocaldb HEROKU_POSTGRESQL_MAGENTA --app sushi
(with my db name as mylocaldb and my real app name), it doesn't work at all.
Problem: The local psql command could not be located
Why? As said before, psql works fine. Even a reinstall of postgresql doesn't help.
The pull statement (see: doesn't work either because postgres always wants to authenticate as my windows user (I don't know how to change the user name when using the heroku pg:pull command, this didn't help: https://devcenter.heroku.com/articles/heroku-postgresql#pg-push-and-pg-pull)
Thanks for your help!
Have you tried calling the psql command with its full path?
For example: /opt/PostgreSQL/9.1/bin/psql
Or if that doesn't help, you can try this