• 请不要在回答技术问题时复制粘贴 AI 生成的内容
sjmcefc2
V2EX  ›  程序员

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

  •  
  •   sjmcefc2 · May 5, 2018 · 1575 views
    This topic created in 2954 days ago, the information mentioned may be changed or developed.

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

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3002 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 07:18 · PVG 15:18 · LAX 00:18 · JFK 03:18
    ♥ Do have faith in what you're doing.