diff --git a/conn.go b/conn.go index 96add0fe..31de46de 100644 --- a/conn.go +++ b/conn.go @@ -144,7 +144,12 @@ func connect(config ConnConfig, pgTypes map[Oid]PgType, pgsql_af_inet *byte, pgs c = new(Conn) c.config = config - c.PgTypes = pgTypes + if pgTypes != nil { + c.PgTypes = make(map[Oid]PgType, len(pgTypes)) + for k, v := range pgTypes { + c.PgTypes[k] = v + } + } c.pgsql_af_inet = pgsql_af_inet c.pgsql_af_inet6 = pgsql_af_inet6