From 74439823688cd7140c507a0950b7dffb12fb2f51 Mon Sep 17 00:00:00 2001 From: wuaoxiang Date: Sat, 17 Oct 2020 11:33:21 +0800 Subject: [PATCH] Make postgres protocol version value more readable --- postgres-protocol/src/message/frontend.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/postgres-protocol/src/message/frontend.rs b/postgres-protocol/src/message/frontend.rs index 8587cd08..5d0a8ff8 100644 --- a/postgres-protocol/src/message/frontend.rs +++ b/postgres-protocol/src/message/frontend.rs @@ -260,7 +260,8 @@ where I: IntoIterator, { 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)?;