--- a/src/introspect/postgres.rs
+++ b/src/introspect/postgres.rs
@@ -431,7 +431,7 @@ async fn fetch_composite_types(
pool: &PgPool,
schemas: &[String],
) -> Result<Vec<CompositeTypeInfo>> {
- let rows = sqlx::query_as::<_, (String, String, String, String, String, i32)>(
+ let rows = sqlx::query_as::<_, (String, String, String, String, String, i16)>(
r#"
SELECT
n.nspname AS schema_name,
@@ -483,7 +483,7 @@ async fn fetch_composite_types(
udt_schema: None,
is_nullable: nullable == "YES",
is_primary_key: false,
- ordinal_position: ordinal,
+ ordinal_position: i32::from(ordinal),
schema_name: schema,
column_default: None,
});
cursor give me one patch when use postgresql for resolve this problem