From 8fe19f698b7144ef785a0f058d72392feab1d0a8 Mon Sep 17 00:00:00 2001 From: Ilya Sinelnikov Date: Thu, 28 Feb 2019 19:02:16 +0300 Subject: [PATCH] Fix PreferSimpleProtocol overwrite https://github.com/jackc/pgx/issues/495 --- conn.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conn.go b/conn.go index f8016220..1693d159 100644 --- a/conn.go +++ b/conn.go @@ -707,7 +707,7 @@ func (old ConnConfig) Merge(other ConnConfig) ConnConfig { cc.Dial = other.Dial } - cc.PreferSimpleProtocol = other.PreferSimpleProtocol + cc.PreferSimpleProtocol = old.PreferSimpleProtocol || other.PreferSimpleProtocol cc.RuntimeParams = make(map[string]string) for k, v := range old.RuntimeParams {