pub fn load_config(config: Option<&str>) -> Result<Config>Expand description
Load postgres connection configuration
The configuration will handle PG environment variable.
If the connection string start with service=<service>
the service will be searched in the file given by PGSERVICEFILE,
or in ~/.pg_service.conf and PGSYSCONFDIR/pg_service.conf.
The remaining of the connection string is used directly for
initializing Config
If the connection string do no start with service= the connection
string is directly passed to Config along with parameters
defined for any service defined in PGSERVICE.
If the connection string is None the Config is initialized
from environment variables and/or service defined in PGSERVICE.
In all cases, parameters from the connection string take precedence.