Skip to content

Conversation

@fantix
Copy link
Member

@fantix fantix commented Apr 26, 2018

Fixed issue that SELECT ctid, * FROM xxx and SELECT * FROM xxx WHERE ctid = $1 are not working, by adding a new codec for tid. Now tid values are output as a two-item tuple, and both tuple and list with exactly two items are accepted for input.

asyncpg.protocol.protocol.BufferError: unexpected trailing 2 bytes in buffer 

(Because tid has 6 bytes, current asyncpg consumes only 4.)

References:

Copy link
Member

@elprans elprans left a comment

Choose a reason for hiding this comment

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

Excellent! Thank you!

@elprans elprans merged commit cddea9c into MagicStack:master Apr 26, 2018
@fantix
Copy link
Member Author

fantix commented Apr 27, 2018

Thanks for merging!

fantix added a commit to fantix/asyncpg that referenced this pull request Apr 28, 2018
@fantix
Copy link
Member Author

fantix commented Apr 28, 2018

@elprans Apologies, looks like pg is using unsigned integers for presentation. I’ve fixed this in a new commit, even though previous patch worked anyway (consistent encode and decode should do, just mismatched pg presentation). Please let me know if the fix is okay and should I create a new PR. Thanks for your time!

@elprans
Copy link
Member

elprans commented Apr 30, 2018

@fantix No worries, please make a followup PR.

@fantix fantix mentioned this pull request May 1, 2018
elprans pushed a commit that referenced this pull request May 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants