Skip to content

PostgresDatabaseOptions

Defined in: packages/db-postgres/src/index.ts:31

Options for creating a Postgres-backed DatabaseAdapter.

url (or connectionString) is the Postgres connection string (postgres://user:pass@host:5432/db). For managed providers, see the deployment guide for per-provider recipes (RDS CA bundle, Cloud SQL mutual TLS, Supabase pooler port 6543 with prepare: false, etc.).

When client is supplied, all other connection options are ignored and the caller owns the lifecycle of the client. This is the hook for advanced setups (IAM token refresh, pre-configured TLS, etc.) and for hermetic tests.

optional client?: Sql<{ }>

Defined in: packages/db-postgres/src/index.ts:39


optional connectionString?: string

Defined in: packages/db-postgres/src/index.ts:33


optional connectTimeout?: number

Defined in: packages/db-postgres/src/index.ts:38


optional idleTimeout?: number

Defined in: packages/db-postgres/src/index.ts:37


optional max?: number

Defined in: packages/db-postgres/src/index.ts:36


optional prepare?: boolean

Defined in: packages/db-postgres/src/index.ts:35


optional ssl?: PostgresSslOptions

Defined in: packages/db-postgres/src/index.ts:34


optional url?: string

Defined in: packages/db-postgres/src/index.ts:32