Importing CSV and commas in string values

。_饼干妹妹 提交于 2019-12-06 02:05:36

Clearly you have a CSV file while you try to import it as text format. Use:

COPY sample FROM '/tmp/sample.csv' FORMAT CSV;

The default delimiter for CSV format is the comma (,) anyway. More in the manual. Syntax is for current version 9.1. For PostgreSQL 8.4:

COPY sample FROM '/tmp/sample.csv' CSV;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!