Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ctrl+C in pg:psql exiting #1254

Open
afn opened this issue Jun 21, 2019 · 0 comments
Open

Ctrl+C in pg:psql exiting #1254

afn opened this issue Jun 21, 2019 · 0 comments

Comments

@afn
Copy link

afn commented Jun 21, 2019

I believe this is the same issue originally reported in heroku/heroku-pg#116. I'm seeing it with the current version of heroku-cli:

[afn]$ heroku update
Updating completions... ⡿ [1/4] Resolving packages...
Updating completions... ⣻ [1/4] Resolving packages...
[afn]$ heroku --version
heroku/7.25.0 linux-x64 node-v11.14.0

Current behavior: hitting Ctrl+C inside pg:psql interrupts the current query but does not cause psql to exit

Actual behavior: psql exits immediately on Ctrl+C. It also ends up printing some output after control has returned to the shell.

Example:

[afn]$ heroku pg:psql -r prod
--> Connecting to postgresql-xxx-xxx
psql (11.2, server 9.6.12)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.

xxx::DATABASE=> select pg_sleep(5);
^C !    Command cancelled.
[afn]$ Cancel request sent
ERROR:  canceling statement due to user request
amitree::DATABASE=> 
\q
[afn]$ 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant