0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

postgresqlで詰まったこと

Posted at

もらったCSVファイルをコピーしようと以下のコマンドを打ったところエラー

postgres=# \COPY voice_chat_def from '/Users/hayano/Downloads/voice_char_def.csv' delimiter ',' csv header;
ERROR:  unquoted newline found in data
HINT:  Use quoted CSV field to represent newline.
CONTEXT:  COPY voice_chat_def, line 209

エラー文で調べると、csvに空白行があるのが問題という記事を見つけたが今回は空白行も特に見つからなかった。

もらったcsvをエクセルで表示していたが、黄色い枠のメッセージ
データ損失の可能性〜の一番右にある「名前をつけて保存」で別名保存をして同じことをすると問題なくコピーできた

postgres=# \COPY voice_chat_def from '/Users/hayano/Downloads/voice_char_def2.csv' delimiter ',' csv header;

理由わからないので誰か教えてくださると幸いです。。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?