Ignore quotation marks when importing a CSV file into PostgreSQL?

Tab separated is the default format for copy statements. Treating them as CSV is just silly. (do you take this path just to skip the header ?)

copy articles from 'articles.tsv';

does exactly what you want.


Assuming the file never actually tries to quote its fields:

The option you want is "with quote", see http://www.postgresql.org/docs/8.2/static/sql-copy.html

Unfortunately, I'm not sure how to turn off quote processing altogether, one kludge would be to specify a character that does not appear in your file at all.

Tags:

Postgresql