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
Some notes about PostgreSQL
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
there is just one new feature - sort is supported on all columns, not only on numeric columns.
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. pspg
is postcardware.Master branch of
pspg
supports sort by column selected by vertical cursor.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:psql
are supported)