@cubejs-backend/postgres-driver is a pure JavaScript Postgres database driver for Cube.js, an open-source analytical API platform. Current stable version is 0.30.54, released as part of Cube.js monorepo with monthly releases. It provides a thin wrapper around the `pg` module optimized for Cube.js query generation and schema compilation. Key differentiator: simplifies Cube.js connection configuration and uses parameterized queries with caching for accelerated analytics queries. Supports Node.js >=12 and ships TypeScript type definitions.
npm install cube-postgres-driverNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Instantiates PostgresDriver with environment variables and runs a simple test query.
Replace `import PostgresDriver from '...'` with `import { PostgresDriver } from '...'`Use `PostgresDriver` instead of `Driver`.
Run `npm install pg` in your project.
Set `maxPoolSize` or `timeout` option in constructor.
Run `npm install @cubejs-backend/postgres-driver`
Change to `import { PostgresDriver } from '@cubejs-backend/postgres-driver'`Set `host` to the correct hostname or IP address, e.g., 'db' for docker-compose