ITPub博客

首页 > 数据库 > 数据库开发技术 > copy ERROR: invalid input syntax for type timestamp: "xxxREATED"

copy ERROR: invalid input syntax for type timestamp: "xxxREATED"

原创 数据库开发技术 作者:anwll 时间:2015-12-08 11:00:45 0 删除 编辑
使用toad保存时选择了Encoding UTF-8,文件上传到linux 服务器下使用postgresql copy命令导入时会出现 ERROR:  invalid input syntax for type错误 ,  原因是文件有with选项,需要使用no BOM,通过file 命令可以知道文件的文本格式                                                                                                                        
[postgres@ulasmdb1 ~]$ file 1.sql 
1.sql: UTF-8 Unicode (with BOM) text
[postgres@ulasmdb1 ~]$ file oracle_post.txt 
oracle_post.txt: ASCII text

copy Foracle from '/home/postgres/oracle_post.txt' DELIMITERS ',' CSV; 

  

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/582521/viewspace-1868054/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-03-26

  • 博文量
    7
  • 访问量
    28442