From 76732d65060f3b86465f2aef7aff22bc6456cb4b Mon Sep 17 00:00:00 2001 From: Ning Sun Date: Mon, 14 Nov 2022 21:55:26 +0800 Subject: [PATCH] fix: add more parameters to postgresql for python client (#493) --- src/servers/src/postgres/auth_handler.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/servers/src/postgres/auth_handler.rs b/src/servers/src/postgres/auth_handler.rs index 46cf8f6ac8..ab94e4eb4f 100644 --- a/src/servers/src/postgres/auth_handler.rs +++ b/src/servers/src/postgres/auth_handler.rs @@ -36,8 +36,11 @@ impl ServerParameterProvider for GreptimeDBStartupParameters { where C: ClientInfo, { - let mut params = HashMap::with_capacity(1); + let mut params = HashMap::with_capacity(4); params.insert("server_version".to_owned(), self.version.to_owned()); + params.insert("server_encoding".to_owned(), "UTF8".to_owned()); + params.insert("client_encoding".to_owned(), "UTF8".to_owned()); + params.insert("DateStyle".to_owned(), "ISO YMD".to_owned()); Some(params) }