Make postgres protocol version value more readable

This commit is contained in:
wuaoxiang 2020-10-17 11:33:21 +08:00
parent 510062238d
commit 7443982368

View File

@ -260,7 +260,8 @@ where
I: IntoIterator<Item = (&'a str, &'a str)>,
{
write_body(buf, |buf| {
buf.put_i32(196_608);
// postgres protocol version 3.0(196608) in bigger-endian
buf.put_i32(0x00_03_00_00);
for (key, value) in parameters {
write_cstr(key.as_bytes(), buf)?;
write_cstr(value.as_bytes(), buf)?;