mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-11-18 14:29:30 +00:00
Postgres arrays and records do not fully support custom types. When encountering an unknown OID, they currently default to using `PgTypeInfo::with_oid`. This is invalid as it breaks the invariant that decoding only uses resolved types, leading to panics. This commit returns an error instead of panicking. This is merely a mitigation: a proper fix would actually add full support for custom Postgres types. Full support involves more work, so it may still be useful to fix this immediate issue. Related issues: - https://github.com/launchbadge/sqlx/issues/1672 - https://github.com/launchbadge/sqlx/issues/1797