Skip to content
This repository was archived by the owner on Aug 18, 2025. It is now read-only.

Commit df11cab

Browse files
committed
Try directly matching built-in OIDs
1 parent 70e6514 commit df11cab

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/types.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ impl Type {
2929
oid: u32,
3030
client: &Client,
3131
) -> Result<Self, tokio_postgres::Error> {
32-
Self::from_postgres("oid = $1", &[&oid], client).await
32+
match PgType::from_oid(oid) {
33+
Some(ty) => Ok(Self::Builtin(ty)),
34+
None => Self::from_postgres("oid = $1", &[&oid], client).await,
35+
}
3336
}
3437

3538
async fn from_postgres(

0 commit comments

Comments
 (0)