Closed
Description
- asyncpg version: 0.10.1
- PostgreSQL version: 9.6.1
- Python version: 3.5.3
- Platform: GNU/Linux
- Do you use pgbouncer?: No
- Did you install asyncpg with pip?: Yes
- If you built asyncpg locally, which version of Cython did you use?: N/A
- Can the issue be reproduced under both asyncio and
uvloop?: Yes
When sending queries with more than 32768 arguments, the execute fails with this error:
File "asyncpg\protocol\protocol.pyx", line 162, in bind_execute (asyncpg/protocol/protocol.c:57595)
File "asyncpg\protocol\prepared_stmt.pyx", line 100, in asyncpg.protocol.protocol.PreparedStatementState._encode_bind_msg (asyncpg/protocol/protocol.c:53533)
ValueError: number of arguments (90000) does not match number of parameters (24464)
Note that 90000 % 32768 is 24464.
EDIT: This is actually caused by overflow on 32768, not 65536.