You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"RuntimeError: no codec for array element type 17189" with $1::citext[] #82
Traceback (most recent call last):
File "test.py", line 9, in <module>
asyncio.get_event_loop().run_until_complete(main())
File "/usr/lib/python3.6/asyncio/base_events.py", line 466, in run_until_complete
return future.result()
File "test.py", line 6, in main
print(await conn.fetch('SELECT $1::citext[]', ('a', 'b')))
File "/usr/lib/python3.6/site-packages/asyncpg/connection.py", line 268, in fetch
stmt = await self._get_statement(query, timeout)
File "/usr/lib/python3.6/site-packages/asyncpg/connection.py", line 220, in _get_statement
protocol.get_settings().register_data_types(types)
File "asyncpg/protocol/settings.pyx", line 32, in asyncpg.protocol.protocol.ConnectionSettings.register_data_types (asyncpg/protocol/protocol.c:4669)
File "asyncpg/protocol/settings.pyx", line 33, in asyncpg.protocol.protocol.ConnectionSettings.register_data_types (asyncpg/protocol/protocol.c:4592)
File "asyncpg/protocol/codecs/base.pyx", line 373, in asyncpg.protocol.protocol.DataCodecConfig.add_types (asyncpg/protocol/protocol.c:16328)
RuntimeError: no codec for array element type 17189
Appears to be a bug. citext is an extension type, so asyncpg doesn't know how to decode it in binary mode. Text mode fallback seems to be broken with arrays. I'll work on a fix shortly, meanwhile you can work around this by aliasing citext to the text codec:
Activity
elprans commentedon Mar 1, 2017
Appears to be a bug.
citextis an extension type, so asyncpg doesn't know how to decode it in binary mode. Text mode fallback seems to be broken with arrays. I'll work on a fix shortly, meanwhile you can work around this by aliasingcitextto the text codec:Add support for the text I/O fallback for arrays of unknown types.
Add support for the text I/O fallback for arrays of unknown types.
Add support for the text I/O fallback for arrays of unknown types.
Add support for the text I/O fallback for arrays of unknown types.