Fix int2vector serialization

This commit is contained in:
Steven Fackler
2023-05-01 19:45:54 -04:00
parent 8449e4d9ea
commit d92b3b0a63
2 changed files with 13 additions and 2 deletions

View File

@@ -910,9 +910,9 @@ impl<'a, T: ToSql> ToSql for &'a [T] {
_ => panic!("expected array type"),
};
// Arrays are normally one indexed by default but oidvector *requires* zero indexing
// Arrays are normally one indexed by default but oidvector and int2vector *require* zero indexing
let lower_bound = match *ty {
Type::OID_VECTOR => 0,
Type::OID_VECTOR | Type::INT2_VECTOR => 0,
_ => 1,
};