Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Python中使用asyncpg执行insert语句,使用returning id语法获取每个insert的ID,但返回的是"INSERT 0 1"
蟒蛇 3.5
asyncpg(使用连接池)
Connection.fetch()(及其变体)可用于返回任何数据返回语句的结果,包括INSERT ... RETURNING.
Connection.fetch()
INSERT ... RETURNING