Skip to content

Prohibit custom codecs on domains #663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 2, 2020
Merged

Prohibit custom codecs on domains #663

merged 2 commits into from
Dec 2, 2020

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