Copy returns a deep copy of the config that is safe to use and modify. The only exception is the tls.Config: according to the tls.Config docs it must not be modified after creation.
()
| 197 | // The only exception is the tls.Config: |
| 198 | // according to the tls.Config docs it must not be modified after creation. |
| 199 | func (c *Config) Copy() *Config { |
| 200 | newConfig := new(Config) |
| 201 | *newConfig = *c |
| 202 | newConfig.ConnConfig = c.ConnConfig.Copy() |
| 203 | return newConfig |
| 204 | } |
| 205 | |
| 206 | // ConnString returns the connection string as parsed by pgxpool.ParseConfig into pgxpool.Config. |
| 207 | func (c *Config) ConnString() string { return c.ConnConfig.ConnString() } |
no outgoing calls