Wednesday, September 25, 2019

pspg can be used like csv viewer

Last week I worked on CSV parser and formatter. Now I integrated both components to `pspg`, and then `pspg` can be used like csv viewer.

cat obce.csv | pspg --csv

Wednesday, September 11, 2019

pspg 2.0.2 is out

there is just one new feature - sort is supported on all columns, not only on numeric columns.

Sunday, September 8, 2019

pspg 2.0.1 released

I released new version of pspg 2.0.1. I started work on pspg three years ago, and now there are almost all features what are possible with this design - the data are stored in original form (created by some sql client). The alternative of pspg can be sophisticated CSV viewers, because psql can produce a content in CSV format. Maybe (in far future) pspg 3.0 will be based on internal CSV storage with formatting on pspg side. But it is not a plan for few next years (or somebody can do it). So last month I wrote vertical cursor support (necessary for next step), and last week I finished "sort by column" feature. The sort command has sense only on numeric columns (works with numbers only - I really would not supply ORDER BY clause in SQL). With this limit is has maybe interesting feature - some size units (kB, MB, GB, TB) are supported.

Please, use it freely. And if you like this software, send me a postcard from your country - pspg is postcardware.

Update: Version 2.0.2 supports sort on any column (not only on numeric columns)

Tuesday, September 3, 2019

pspg supports sort by selected column

Master branch of pspg supports sort by column selected by vertical cursor.

Why I wrote this feature? You can try to list of tables in psql by \dt+ command. The result is sorted by schema and by name. Sometimes can be interesting to see result ordered by table's sizes. Now it is easy. Press Alt-v to show vertical cursor. Later move to right to "Size" column. Then press d as descendent sort. You can get resuly like attached screenshot:

The sort is working only on numeric columns (but units used by psql are supported)

Update: Now, you can test this feature in version 1.9.0.