Skip to content

Conversation

@elprans
Copy link
Member

@elprans elprans commented Mar 15, 2017

Currently, asyncpg supports falling back to text I/O for types that do not have a registered codec. This commit extends this behaviour to arrays of such types.

Additionally, add an explicit error for when the text I/O is attempted for a range or a composite type, as these are not supported yet.

@elprans elprans self-assigned this Mar 15, 2017
@elprans elprans requested a review from 1st1 March 15, 2017 14:36
@elprans elprans force-pushed the fix-text-array-fallback branch from 29b097c to 0452b8f Compare March 15, 2017 14:38
for i in range(elem_len):
ch = elem_str[i]
if ch == b'"' or ch == b'\\':
# Quites and backslashes need escaping.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotes

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Thanks.

@elprans elprans force-pushed the fix-text-array-fallback branch from 0452b8f to 6780e45 Compare March 15, 2017 15:02
Currently, asyncpg supports falling back to text I/O for types that do not have a registered codec. This commit extends this behaviour to arrays of such types. Additionally, add an explicit error for when the text I/O is attempted for a range or a composite type, as these are not supported yet. Fixes: #82.
@elprans elprans force-pushed the fix-text-array-fallback branch from 6780e45 to c021b3f Compare March 15, 2017 16:17
@elprans elprans merged commit a2e53ab into master Mar 16, 2017
@elprans elprans deleted the fix-text-array-fallback branch March 16, 2017 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants