I\'m using psql\'s \\dt to list all tables in a database and I need to save the results.
\\dt
What is the syntax to export the results of a psql command to a
I assume that there exist some internal psql command for this, but you could also run the script command from util-linux-ng package:
script
DESCRIPTION Script makes a typescript of everything printed on your terminal.