V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
sjmcefc2
V2EX  ›  程序员

cur.execute(copy mytalbe from test.txt delimiter '|')这个怎么看执行的状态呢?

  •  
  •   sjmcefc2 · 2018-05-05 17:01:14 +08:00 · 1168 次点击
    这是一个创建于 2196 天前的主题,其中的信息可能已经有所发展或是发生改变。

    使用 psycopg2 包链接 postgres, 执行 cur.execute(copy mytalbe from test.txt delimiter '|')发现用 cur.fetchall/one()得不到执行的状态。 在终端单独执行 copy,至少能得到一个 copy 行数或者出错信息哈。 请教一下这个怎么获取状态和结果。

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1020 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 19:45 · PVG 03:45 · LAX 12:45 · JFK 15:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.