Ignore quotation marks when importing a CSV file into PostgreSQL?

前端 未结 3 1523
太阳男子
太阳男子 2021-02-19 12:41

I\'m trying to import a tab-delimited file into my PostgreSQL database. One of the fields in my file is a \"title\" field, which occasionally contains actual quotation marks. Fo

3条回答
  •  执笔经年
    2021-02-19 13:13

    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.

提交回复
热议问题