You can redirect psql output to a local file:
psql [your connection options go here] -F, -A \
-c 'select * from my_schema.my_table' >my_file.csv
-F, sets the field separator to a comma
-A gives aligned / unformatted output
To specify a different dividing channel, use '|'instead -F.
. , .