From 4a7d9870ef6a5a247ef532192988b01bf13cc110 Mon Sep 17 00:00:00 2001 From: Andrew Bosonchenko Date: Sat, 13 Jun 2020 19:05:47 +0300 Subject: [PATCH] removed minor from version fixed server version detection for builds like "11.2 (Debian 11.2-1.pgdg90+1)" --- conn.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/conn.go b/conn.go index b3ab14d3c..cfd142d45 100644 --- a/conn.go +++ b/conn.go @@ -1689,10 +1689,9 @@ func (cn *conn) processParameterStatus(r *readBuf) { case "server_version": var major1 int var major2 int - var minor int - _, err = fmt.Sscanf(r.string(), "%d.%d.%d", &major1, &major2, &minor) + _, err = fmt.Sscanf(r.string(), "%d.%d", &major1, &major2) if err == nil { - cn.parameterStatus.serverVersion = major1*10000 + major2*100 + minor + cn.parameterStatus.serverVersion = major1*10000 + major2*100 } case "TimeZone":