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.43k stars 85 forks source link

Pspg and postgis columns #210

Closed spicysardine closed 1 year ago

spicysardine commented 1 year ago

Hy there, Pspg is a great tool, no doubt about that. Thank you for the great work. I am struggling though with super wide columns storing large geographic binary objects in hex format, when Postgis extension is activated (I am a GIS engineer and developer/dbadmin). See Joint files.

As to pgadmin4, it offers the working but imperfect solution of adapting content to column name...

Any solution in foreseeable future?

I am ready to help if necessary.

Screenshot from 2022-10-28 22-43-47 Screenshot from 2022-10-28 22-43-22 ?

okbob commented 1 year ago

Hi

pá 28. 10. 2022 v 22:45 odesílatel beetroot @.***> napsal:

Hy there, Pspg is a great tool, no doubt about that. Thank you for the great work. I am struggling though with super wide columns storing large geographic binary objects in hex format, when Postgis extension is activated (I am a GIS engineer). See Joint files. Any solution in foreseeable future?

pspg cannot trim or reduce long columns - it is a pager and it cannot modify original content. Now, it is working generally like a classic pager, and data is stored internally in the original format. Maybe in the future, I rewrite this princip, and I store data in some column format, and then I can hide or show columns dynamically. But now it is not possible.

But you can hide columns with names that contain some string when you use the input format "csv". pspg has internal csv formatter, and it can be little bit controlled

so

in psql

\pset format csv

and for pspg you can use option

--skip-columns-like="SPACE SEPARATED STRING LIST"

Unfortunately, on pager size I have no information about column format, so I cannot do more aggressive hiding automatically.

I am ready to help if necessary.

[image: Screenshot from 2022-10-28 22-43-47] https://user-images.githubusercontent.com/37194090/198729295-492638bb-1b53-4e23-9af7-8a3f64732dd7.png [image: Screenshot from 2022-10-28 22-43-22] https://user-images.githubusercontent.com/37194090/198729299-d1a969a4-1b15-470c-a9ee-253c030244db.png ?

— Reply to this email directly, view it on GitHub https://github.com/okbob/pspg/issues/210, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO4ZIUKU5NHAOPY4DQLLWFQ3PPANCNFSM6AAAAAARRNBPJM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

spicysardine commented 1 year ago

Thank you.