okbob / pspg

Unix pager (with very rich functionality) designed for work with tables. Designed for PostgreSQL, but MySQL is supported too. Works well with pgcli too. Can be used as CSV or TSV viewer too. It supports searching, selecting rows, columns, or block and export selected area to clipboard.
BSD 2-Clause "Simplified" License
2.45k stars 85 forks source link

Query result effected by pgcli named query #149

Closed TThUgh closed 3 years ago

TThUgh commented 3 years ago

Hi, I'm using pspg and pgcli to connect to remote DB and it's working great! But when it comes to using named query, the output seems to be effected by the query string. The row of the column names shift down and the first column becomes as wide as the query string. Is there any setting that can fix this?

Thank you.

pspg

okbob commented 3 years ago

Hi

út 29. 12. 2020 v 8:42 odesílatel TThUgh notifications@github.com napsal:

Hi, I'm using pspg and pgcli to connect to remote DB and it's working great! But when it comes to using named query, the output seems to be effected by the query string. The row of the column names shift down and the first column becomes as wide as the query string. Is there any setting that can fix this?

[image: pspg] https://user-images.githubusercontent.com/56900492/103265790-5e1b7f00-49e9-11eb-81d6-87785821dbbe.jpeg

This is an error on the pgcli side. It is sending the query text to pager. When you use CSV, then pgcli should produce only data to output stream (that is redirected to pspg). But pgcli injects this CSV stream with garbage. It should be fixed on the pgcli side. I can write only some workaround

See commit https://github.com/okbob/pspg/commit/650f478c03a53666528bb1579bfdc3859ab35d32

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/okbob/pspg/issues/149, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO46EG4DNQLGKEDKZDR3SXGB5LANCNFSM4VM5HKGQ .

TThUgh commented 3 years ago

I see. And the new setting is working fine! I'll report this to pgcli. Thank you!

okbob commented 3 years ago

st 30. 12. 2020 v 4:17 odesílatel TThUgh notifications@github.com napsal:

I see. And the new setting is working fine! I'll report this to pgcli. Thank you!

:)

Pavel

You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/okbob/pspg/issues/149#issuecomment-752312962, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO42S55EXXW6QLXPOWRDSXKLWHANCNFSM4VM5HKGQ .