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 1 year has passed since last update.

【python】psycopg2のcpyコマンドで詰まった

Last updated at Posted at 2022-01-18

概要

sio.seek(0)
cur.copy_from(sio , table='hoge.hogehoge', sep=',', null='') 

# Raise Exception: relation "hoge.hogehoge" does not exist

search_pathにもスキーマあるやろ!
selectできるのになんでや!

解決(してないけど)

sio.seek(0)
cur.copy_from(sio , table='hogehoge', sep=',', null='') 

# Raise Exception: value too long for type character(12)

スキーマ名抜かしたらあっさり動いた。
そういうもんなんですか???
エラー出てるけどこれはテーブル直すのでヨシ。

tmpテーブルでやりくりするほうがいいのかしらん。
本日もデータベースと仲良くなれない。

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?