Deprecated wrapper around node-postgres that provides a promise-based API for database connections and transactions, automatically releasing them via Bluebird's disposer pattern. Last version 2.0.2. Since pg@6 (2016), node-postgres natively supports promises, making this package obsolete. No longer maintained. Users should migrate to direct use of pg with async/await.
npm install pg-connectNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a connection and running a simple query using Promise.using to auto-release.
Use pg directly with pg.Pool and async/await.
Install bluebird and use it as the Promise implementation.
const getConnection = require('pg-connect')(connectionString);Use require() or set type: 'commonjs' in package.json.
npm install bluebird and require('bluebird') before using pg-connect.const getConnection = require('pg-connect')(connectionString);npm install pg