Skip to content

Commit

Permalink
Domain basetypes are introspected (MagicStack#886)
Browse files Browse the repository at this point in the history
Domain encoding/decoding is handled by its basetype. This change forces
those basetypes to be inspected and loaded to the client cache avoiding
the issue where base types weren't encodable/decodable.
  • Loading branch information
Woodhams committed Feb 9, 2022
1 parent a2f093d commit f89b3fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions asyncpg/introspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
(tt.elemtype IS NOT NULL AND ti.oid = tt.elemtype)
OR (tt.attrtypoids IS NOT NULL AND ti.oid = any(tt.attrtypoids))
OR (tt.range_subtype IS NOT NULL AND ti.oid = tt.range_subtype)
OR (tt.basetype IS NOT NULL AND ti.oid = tt.basetype)
)
SELECT DISTINCT
Expand Down Expand Up @@ -232,6 +233,7 @@
(tt.elemtype IS NOT NULL AND ti.oid = tt.elemtype)
OR (tt.attrtypoids IS NOT NULL AND ti.oid = any(tt.attrtypoids))
OR (tt.range_subtype IS NOT NULL AND ti.oid = tt.range_subtype)
OR (tt.basetype IS NOT NULL AND ti.oid = tt.basetype)
)
SELECT DISTINCT
Expand Down

0 comments on commit f89b3fb

Please sign in to comment.