Closed ryzhyk closed 1 year ago
Hmm, we could defer the default to when the config is finalized I suppose.
Note that breaks also the database name which is also configured by default to user name.
How does this break dbname?
Never mind, documentation was misleading me: The name of the database to connect to. Defaults to the username.
Fixed in tokio-postgres v0.7.10/postgres v0.19.7.
Thanks for these great crates!
It is probably too late to do anything about this, but just want to point out that
tokio-postgres 0.7.9
introduced a breaking change, which I believe violates semantic versioning. Specifically, theConfig::user
field now defaults to the current user, which breaks any code that relies onConfig::new()
to create an empty config. For example I ran into this with thepg-client-config
crate, namely, this function, which no longer initializesConfig::user
from thePGUSER
environment variable.