From df15dfe7bbcfde5c2ec56ce0ed1a3f616ce018de Mon Sep 17 00:00:00 2001 From: sup39 Date: Sun, 19 Jan 2025 21:22:41 +0900 Subject: [PATCH] fix: support postgres custom type See issue https://github.com/launchbadge/sqlx/issues/1920 --- sqlx-postgres/src/types/record.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlx-postgres/src/types/record.rs b/sqlx-postgres/src/types/record.rs index c4eb6393..180b29f8 100644 --- a/sqlx-postgres/src/types/record.rs +++ b/sqlx-postgres/src/types/record.rs @@ -133,7 +133,7 @@ impl<'r> PgRecordDecoder<'r> { let element_type = element_type_opt - .ok_or_else(|| BoxDynError::from(format!("custom types in records are not fully supported yet: failed to retrieve type info for field {} with type oid {}", self.ind, element_type_oid.0)))?; + .unwrap_or_else(|| PgTypeInfo::with_oid(element_type_oid)); self.ind += 1;