diff --git a/test/module/net_sql.pg.result b/test/module/net_sql.pg.result
index d5231f0eacb6858b338957d8b91ce6ea3f7b17e7..a2ec1caf3e24ec881dc8cc41ffac07e5d1ba4b61 100644
--- a/test/module/net_sql.pg.result
+++ b/test/module/net_sql.pg.result
@@ -12,7 +12,7 @@ lua dump = function(v) return box.cjson.encode(v) end
 lua connect = {}
 ---
 ...
-lua for tk in string.gmatch(os.getenv('PG'), '[^:]+') do table.insert(connect, tk) end
+lua for tk in string.gmatch(os.getenv('PG')..':', '(.-):') do table.insert(connect, tk) end
 ---
 ...
 lua c = box.net.sql.connect('pg', unpack(connect))