I have default psql query output in .txt file, which is very difficult to read. Any command or service to change it into a more convenient format to work with (e.g. CSV)?
Went through docs, but didn't find the solution. By any chance, can I somehow open it with psql in interactive mode, as if I queried it myself?
I have written python script for that, haven't find no better solution.
Run it in terminal
python3 psql_to_csv.py exp1.txt outp1.csv. Input file should start with query command likedb_name=# select * ...and end with(N rows)