You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I found an issue while working with transactions and non-atomic connections:
Spi::check_status(unsafe { pg_sys::SPI_connect_ext(pg_sys::SPI_OPT_NONATOMIC) })?;
----------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u32`
|
arguments to this function are incorrect
Not sure that it's possible to be done automatically from the code only, but having a list of hints can fix it.
The text was updated successfully, but these errors were encountered:
Yeah, there's no way to fix this generally because the C code doesn't really care what the type is: it is going to impose numeric coercions on inputs until it gets what it wants. So it will be coerced in different ways in different places. So you have to do the same by hand in Rust, sometimes.
for note, we could tell bindgen to shrink the constants to their smallest applicable type, but that would probably be really fucking annoying rather than helpful.
Today I found an issue while working with transactions and non-atomic connections:
Not sure that it's possible to be done automatically from the code only, but having a list of hints can fix it.
The text was updated successfully, but these errors were encountered: