OptionalpgOptionalsslTLS configuration passed straight through to pg.Pool's ssl field.
Takes precedence over the deprecated useSsl when provided.
Set rejectUnauthorized: true (Node's own default) for verified TLS
against the system CA store — the right choice for managed providers that
present a public-CA-signed certificate (Supabase, Neon, Render, Azure
Database for PostgreSQL on Flexible Server, etc.).
For providers that present a private-CA certificate (AWS RDS,
GCP Cloud SQL), add a ca bundle:
ssl: { rejectUnauthorized: true, ca: readFileSync('rds-ca.pem') }.
For providers that present a self-signed certificate (Heroku Hobby,
some local docker images), set rejectUnauthorized: false — encrypted
but unauthenticated.
Set false to disable TLS entirely. Omitting ssl (and useSsl) throws
at app.set('db', ...) time so the safety question is a deliberate
decision at the call site rather than a silent default.
OptionaluseUse ssl instead.
Legacy boolean opt-in for Postgres TLS. When true (and ssl is not
set), Dream connects with { rejectUnauthorized: false } — TLS is on but
the server certificate is not verified. Preserved for back-compat and
will be removed in a future major version. New code should set ssl
directly.
pg pool/client options passed straight through to
new pg.Pool(...). Dream knows nothing about these fields — pg's own types carry the documentation. Unset ⇒ pg applies its own defaults (backward compatible).Omitted from the passthrough:
user / password / database / host / port / ssl: Dream manages these (per-connection name, TLS directive) — hard invariants.connectionString:pg'sConnectionParametersre-parses the URL and lets its fields take precedence, bypassing Dream's per-connection database name and TLS directive. ParseDATABASE_URLinto the discretehost/port/user/password/name/sslfields inconf/dream.tsinstead.min: node-pg'spg-pooldoes not honor it (silent no-op).types / Client / Promise / log / stream: programmatic, not credential config (typesis already wired via Dream's parsers).When another database adapter is added, a parallel
mysql?: ...key (or similar) will appear here — this key is intentionally pg-specific.