Skip to content

Commit 1548785

Browse files
authored
fix: PgConnectOptions docs (#3809)
1 parent 97bf270 commit 1548785

File tree

1 file changed

+13
-0
lines changed
  • sqlx-postgres/src/options

1 file changed

+13
-0
lines changed

sqlx-postgres/src/options/mod.rs

+13
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,19 @@ impl PgConnectOptions {
134134
/// # use sqlx_postgres::PgConnectOptions;
135135
/// let options = PgConnectOptions::new();
136136
/// ```
137+
///
138+
/// Note: that unlike `libpq` the environment variables:
139+
///
140+
/// * `PGSSLROOTCERT`
141+
/// * `PGSSLCERT`
142+
/// * `PGSSLKEY`
143+
///
144+
/// Must not exclusively be path, ´sqlx-postgres` supports these variables
145+
/// encode the certificates / keys directly. Content snooping is done via
146+
/// `CertificateInput::from`.
147+
///
148+
/// Note: Putting key material in environment variables can be subjected to risk as on
149+
/// some platforms environment variables can be recovered by other (non root) users.
137150
pub fn new() -> Self {
138151
Self::new_without_pgpass().apply_pgpass()
139152
}

0 commit comments

Comments
 (0)