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

pgcli disconnects when closing pager with q #1423

Open
zzantares opened this issue Oct 5, 2023 · 5 comments
Open

pgcli disconnects when closing pager with q #1423

zzantares opened this issue Oct 5, 2023 · 5 comments

Comments

@zzantares
Copy link

Description

Whenever I run a query that returns lots of rows the pager (less) gets activated (this is fine) if I then press q to exit the pager, then pgcli exits altogether and I end up having to reconnect to go back into the pgcli prompt. Is there something I need to configure to not have this behavior?

environment

  • Please provide your OS and version information: Ubuntu 22.04.3 LTS jammy
  • Please provide your CLI version: Version: 3.5.0 installed via nix.
@j-bennet
Copy link
Contributor

j-bennet commented Oct 7, 2023

@zzantares What is your PAGER variable set to?

@zzantares
Copy link
Author

@zzantares What is your PAGER variable set to?

$ echo $PAGER
less

@j-bennet thank you for looking into this!

@j-bennet
Copy link
Contributor

j-bennet commented Oct 8, 2023

Hmm, looks like we had this for a while, and not everyone is seeing this. This user only has an issue with one particular table:

@traleig1
Copy link

I've just started getting this issue with one specific table on version 4.01 on NixOS unstable.

➜  ~ pgcli --version
Version: 4.0.1
➜  ~ nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 6.9.4, NixOS, 24.11 (Vicuna), 24.11.20240613.e9ee548`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/store/qqwr649pc0qprc9lw2fmdsi1km6p7q2h-source`
➜  ~ echo $PAGER
less
➜  ~ echo $LESS
-R```

@dbaty
Copy link
Member

dbaty commented Jun 30, 2024

One user mentioned in sibling issue (#1132) that they only see this with a particular query, like you did. Do you think you could try to pinpoint the cause? Do all queries on the problematic table show the error? If only a particular query yields the error, what if you exclude some rows? What if you exclude some columns? Perhaps the issue comes from a particular character, or suite of characters, or lines of a certain length, or... something else? :)

Also, could you indicate your version of less (available with less --version)?

(I am supposing that you cannot just export the data. But if you could, someone else could also take a look!)

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

4 participants