Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql 使用带有特殊字符的pgadmin将csv文件导入postgres db_Postgresql_Csv_Gtfs_Pgadmin 4 - Fatal编程技术网

Postgresql 使用带有特殊字符的pgadmin将csv文件导入postgres db

Postgresql 使用带有特殊字符的pgadmin将csv文件导入postgres db,postgresql,csv,gtfs,pgadmin-4,Postgresql,Csv,Gtfs,Pgadmin 4,我正在使用pgadmin 4将数据从csv文件导入postgres db 一切正常,但当我尝试导入包含以下数据的文件时,遇到了一个问题 “我是赞德,弗拉特布鲁格” “杜森,`t米德尔杰” 如您所见,数据包含 ` 及 " 我还尝试导入utf-8编码的文件,但无法导入 有人知道如何解决这个问题吗 已更新 结构: stop_id,stop_code,stop_name,stop_lat,stop_lon,location_type,parent_station,stop_timezone,wheelc

我正在使用
pgadmin 4将数据从
csv
文件导入
postgres db
一切正常,但当我尝试导入包含以下数据的文件时,遇到了一个问题

“我是赞德,弗拉特布鲁格”

“杜森,`t米德尔杰”

如您所见,数据包含

`

"

我还尝试导入utf-8编码的文件,但无法导入

有人知道如何解决这个问题吗

已更新

结构:

stop_id,stop_code,stop_name,stop_lat,stop_lon,location_type,parent_station,stop_timezone,wheelchair_boarding,platform_code,zone_id
数据:

错误:

ERROR:  unterminated CSV quoted field
CONTEXT:  COPY stops, line 69400: "stoparea:123953,,"De Zande, 'Koelucht'",52.5184475,5.956368,1,,,0,,
stoparea:120536,,"Poortvliet, Zu..."
更新2

命令:

“/Applications/pgAdmin 4.app/Contents/SharedSupport/psql”--命令” “\copy transit.stops(站点id、站点代码、站点名称、站点纬度、, 停止时间、位置类型、父站、停止时区、, 轮椅登机,站台代码,区域id)从 “/Users/tvtan/Desktop/gtfs nl/stops.txt”分隔符“,”CSV标题 引号“\”转义“”

用户界面:


在命令行中,您似乎已将转义字符定义为单引号。单引号出现在数据中,但未转义

默认转义字符与引号字符相同


更多信息

与utf8无关,请提供结构、数据样本和准确信息error@VaoTsun添加了更多信息请以可复制格式放置列以及您在COPY上使用的所有选项我使用pgadmin 4导入csv文件,您需要什么信息?@VaoTsunhey您解决了这个问题吗?我不使用命令行,我使用从pgadmin导入UI,我尝试使用单引号设置转义字符,但仍然错误地将转义字符改为引号,现在可以使用了,谢谢@Paul
ERROR:  unterminated CSV quoted field
CONTEXT:  COPY stops, line 69400: "stoparea:123953,,"De Zande, 'Koelucht'",52.5184475,5.956368,1,,,0,,
stoparea:120536,,"Poortvliet, Zu..."