diff --git a/packages/postgres/package.json b/packages/postgres/package.json index a9ddb0f1d..45535181e 100644 --- a/packages/postgres/package.json +++ b/packages/postgres/package.json @@ -1,6 +1,6 @@ { "name": "@keyv/postgres", - "version": "2.0.2", + "version": "2.0.3", "description": "PostgreSQL storage adapter for Keyv", "type": "module", "main": "dist/index.cjs", diff --git a/packages/postgres/src/pool.ts b/packages/postgres/src/pool.ts index 19b030bb7..e806e6bc0 100644 --- a/packages/postgres/src/pool.ts +++ b/packages/postgres/src/pool.ts @@ -1,4 +1,4 @@ -import {Pool, type PoolConfig} from 'pg'; +import pg, {type Pool, type PoolConfig} from 'pg'; let postgresPool: Pool | undefined; let globalUri: string | undefined; @@ -9,7 +9,7 @@ export const pool = (uri: string, options: PoolConfig = {}) => { globalUri = uri; } - postgresPool ??= new Pool({connectionString: uri, ...options}); + postgresPool ??= new pg.Pool({connectionString: uri, ...options}); return postgresPool; };