launchbadge / sqlx

🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite.
Apache License 2.0
12.47k stars 1.18k forks source link

More parameters/query pairs in the PgConnectOptions uri parser #501

Open dakom opened 4 years ago

dakom commented 4 years ago

The PgConnectOptions uri parser currently supports only 4 keys: "sslmode", "sslrootcert", "statement-cache-capacity", and "host"

The Postgres connection uri spec notes that there are many more, for example user and password

Should these not be added so that a connection string can be built using only named parameter keys?

mehcode commented 4 years ago

Should these not be added so that a connection string can be built using only named parameter keys?

More of a matter of it's not something we use and hasn't been requested (yet) so we haven't worked to expand the URI parser. Note that user and password can be set normally such as: postgres://user:password@host:port/database.