How to set tab delimiter using psql -F

I think you just need to use a literal tab. How this works depends on your shell. Have you seen this post?

In the bash shell you can do this with $'\t'.

Using the example in your question:

psql -Umyuser mydb -AF $'\t' --no-align -c "select * from mytable" -o /tmp/dumpfile.txt

From man bash:

Words of the form $’string’ are treated specially. The word expands to string, with backslash-escaped characters replaced as specified by the ANSI C standard. […] The expanded result is single-quoted, as if the dollar sign had not been present.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)