ryan sheppard
software engineer
tip
When using pgcli, you might want to explore the result of a query. Visidata is a great tool for that. Here’s how you can use it with pgcli.
If you are not familiar with visidata, you can check out the official website.
Or if you have not used pgcli before, you can check out the official website.
configuration
We will update the pgcli configuration file to use visidata as the pager and set the output format to csv.
Set the output format to csv:
table_format = csv
Set the pager to visidata:
pager = vd -f csv
usage
Now, when you run a query, the result will be opened in visidata.
And we can use the excellent features of visidata to explore the data, like frequency analysis on the status column.