asyncpg icon indicating copy to clipboard operation
asyncpg copied to clipboard

Allow executemany to return rows

Open LeonardBesson opened this issue 1 year ago • 1 comments

Fixes https://github.com/MagicStack/asyncpg/issues/448

This is a proposed change to support executemany with INSERT ... RETURNING.

The PR adds a flag parameter to executemany, but adding a seperate method like fetchmany was also mentioned.

@elprans would you consider something along those lines? I think the value here is allowing to take advantage of the query pipelining from executemany while avoiding the limitations of the proposed workarounds (like DEFAULT as mentioned in your stackoverflow post)

LeonardBesson avatar Dec 23 '23 16:12 LeonardBesson