psql -F '\t' -c "select from x"-o output.tab
# -F wants the actual literal character
# Need to use an 'actual' tab (or newline)
# this depends on the shell
# bash:
psql -F $'\t'
# $ will expand the string with the backslash escaped characters replaced by the ANSI C Standard
# the expanded result is single quotes
# May need to use -A for unaligned output as well
# Or, in unix type
ctrl-V tab
# ctrl-v means not to interpret the next key.
# also works with other special keys (carriage returns ^M) and arrow keys
# or for the interactive psql shell
\f '\t'https://stackoverflow.com/questions/10315916/how-to-set-tab-delimiter-using-psql-f https://www.postgresql.org/message-id/455C54FE.5090902@numerixtechnology.de