arenadotio / pgx

A pure OCaml PostgreSQL client library
Other
122 stars 15 forks source link

Support PG* environment variables for TLS configuration #112

Open brendanlong opened 3 years ago

brendanlong commented 3 years ago

psql has various environment variables that it uses for the default configuration: https://www.postgresql.org/docs/9.1/libpq-envars.html

We support add support for PGSSLMODE, PGREQUIRESSL, PGSSLCERT, PGSSLKEY, PGSSLCRL, and PGSSLROOTCERT where applicable.

brendanlong commented 3 years ago

Something to decide: Can we do this in a somewhat IO-independent way, so we don't have to re-implement this for each Pgx_* implementation?