Closed alex-eri closed 3 years ago
I too was surprised that this wasn't supported.
It seems that copy_to_table
supports an async iterator but it must generate the Postgres binary protocol? I couldn't find a protocol formatter anywhere even though I assume that asyncpg
must contain one somewhere in order to support this function.
If anyone has some guidance on how to use copy_to_table
then that would be a good alternative, thanks.
copy_records_to_table
.Thanks!
I want to stream data to base with COPY, but i have async code, that produce data. I can pass regular iterator to
records
, but it ends then Queue empty. So reconnect needed.