diff --git a/crates/autopilot/src/database.rs b/crates/autopilot/src/database.rs index ca2af3bd71..f641263cb5 100644 --- a/crates/autopilot/src/database.rs +++ b/crates/autopilot/src/database.rs @@ -58,7 +58,7 @@ async fn count_rows_in_table(ex: &mut PgConnection, table: &str) -> sqlx::Result } async fn estimate_rows_in_table(ex: &mut PgConnection, table: &str) -> sqlx::Result { - let query = format!("SELECT reltuples FROM pg_class WHERE relname='{table}';"); + let query = format!("SELECT reltuples::bigint FROM pg_class WHERE relname='{table}';"); sqlx::query_scalar(&query).fetch_one(ex).await }