-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
Looking through the Postgres driver I saw that the postgres_ty_for_value returns the Postgres type for a specific value type.
Taking a closer look however at the number types makes me a bit confused.
fn postgres_ty_for_value(value: &stmt::Value) -> Type {
match value {
// ...
stmt::Value::I8(_) => Type::INT2,
stmt::Value::I16(_) => Type::INT2,
stmt::Value::I32(_) => Type::INT4,
stmt::Value::I64(_) => Type::INT8,
stmt::Value::U8(_) => Type::INT2,
stmt::Value::U16(_) => Type::INT4, // <- Shouldn't this be Type::INT2 ?
stmt::Value::U32(_) => Type::INT8, // <- Shouldn't this be Type::INT4 ?
stmt::Value::U64(_) => Type::INT8,
// ...
_ => todo!("postgres_ty_for_value: {value:#?}"),
}
}I think this just slipped through the quality control of the quite massive change of #159 which got added to main with this commit e30a79a
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels