-
Notifications
You must be signed in to change notification settings - Fork 557
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
Pasting multiple statements into the CLI can cause strange behaviour. #845
Comments
Hi. I just tried this on pgcli v1.8.2 in Fedora Linux, gnome-terminal. It works just fine. I suspect that this is some incompatible behavior in cygwin. I understand that it works fine in psql. We are using prompt-tookit to render our shell which handles all our copy/paste for us. It might be worthwhile to file a bug with prompt-toolkit about this. |
Hi, i use pgcli v1.8.2 on Debian (no Ubuntu) and it work fine. Can you indicate the name of your soft console, please? I use gnome-terminal |
From the original report:
|
you can tested with putty client ? |
I tested it with PuTTY without reproducing the issue. @fake-name is the client you are using this one: https://mintty.github.io/ ? |
@fpietka - It sounds like it. From https://mintty.github.io/ :
|
Everything after the first newline in the clipboard input is completely discarded. If my clipboard starts with a newline, nothing whatsoever gets entered, aside from that one newline.
|
Heh, looking at python-prompt-toolkit: |
I pretty often compose a set of queries I want to enter in
psql
/pgcli
in a notepad, and then paste them into the terminal as a single block.In
psql
, the entire block of queries executes normally. However, inpgcli
, generally only one of the queries gets executed, and which query it is that gets run doesn't seem to make sense.For instance, the following queries:
Causes only the second query to be executed (
DROP TABLE manga_tags;
). The other queries show up on the console, but appear to be ignored.Multi-line is on, otherwise I'm mostly running the defaults.
I'd expect
pgcli
to not simply drop statements on the floor. Ideally, every statement I enter should either result in a success output, or an error report.This seems to be an effect of the fact that I'm pasting newlines into the console. if I remove the newlines in the SQL, it seems to function normally.
The SSH terminal I'm using is Cygwin minitty.exe x64, if it's somehow relevant.
Environment
pgcli
version: 1.8.2The text was updated successfully, but these errors were encountered: