Ignore quotation marks when importing a CSV file into PostgreSQL?

前端 未结 3 1525
太阳男子
太阳男子 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条回答
  •  梦毁少年i
    2021-02-19 13:06

    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.

提交回复
热议问题