Load text column to postgres I use the following to load data into postgres
\copy tab FROM /tmp/file DELIMITER E'\t' QUOTE E'\b' NULL AS '\N' CSV

Usually I select the data from a source db
echo &quot;select * from tab&quot; | mysql --batch --quick --skip-column-names .... &gt; /tmp/file

It generates a file with tab delimiter fields. It works well for the most part. Up until I try to import multi line text column.
The error comes on:
ERROR:  unquoted carriage return found in data

Any recommendations how to overcome this?
The mysql command you show seems (experimentally, not from actual knowledge) to generate output which is compatible with PostgreSQL's TEXT format, not the CSV format.  Newlines are represented by the two characters \n, tabs by \t, and literal backslashes by \\.
So try to import it in that format, which is the default:
\copy tab FROM /tmp/file