Skip to content

Custom Codec doesn't work with DOMAIN types #457

Description

@kjmph
  • asyncpg version: 0.18.3
  • PostgreSQL version: 11.3
  • Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
    the issue with a local PostgreSQL install?
    : Local
  • Python version: 3.7.3
  • Platform: MacOS
  • Do you use pgbouncer?: No
  • Did you install asyncpg with pip?: Yes
  • If you built asyncpg locally, which version of Cython did you use?: PyPI
  • Can the issue be reproduced under both asyncio and
    uvloop?
    : Don't Know

When creating a DOMAIN, and using a custom codec, it calls the native type's codec, as opposed to the custom code. Here is the test code that is supposed to test for this:

https://github.com/MagicStack/asyncpg/blob/master/tests/test_codecs.py#L1224-L1239

However, the lambda functions aren't called. It appears the data type is recognized as an int.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions