Skip to content

Conversation

@elprans
Copy link
Member

@elprans elprans commented Nov 26, 2020

Postgres always includes the base type OID in the RowDescription message
even if the query is technically returning domain values. This makes
custom codecs on domains ineffective, and so prohibit them to avoid
confusion and bug reports.

See postgres/postgres@d9b679c and
https://postgr.es/m/27307.1047485980%40sss.pgh.pa.us for context.

Fixes: #457.

Postgres always includes the base type OID in the RowDescription message
even if the query is technically returning domain values.  This makes
custom codecs on domains ineffective, and so prohibit them to avoid
confusion and bug reports.

See postgres/postgres@d9b679c and
https://postgr.es/m/27307.1047485980%40sss.pgh.pa.us for context.

Fixes: #457.
@elprans elprans requested a review from 1st1 November 26, 2020 23:31
Currently asyncpg would crash with an arcane "could not resolve query
result and/or argument types in 6 attempts", which isn't helpful.  Do
the right thing by raising an `UnsupportedClientFeatureError`
explicitly instead.

Fixes #476.
@elprans elprans requested a review from fantix November 29, 2020 18:20
@elprans elprans merged commit 7252dbe into master Dec 2, 2020
@elprans elprans deleted the no-codecs-on-domains branch December 2, 2020 01:37
@kjmph
Copy link

kjmph commented Dec 2, 2020

That makes it clear to the end user, so thank you for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom Codec doesn't work with DOMAIN types

3 participants