Packages

pg

8.23.1 · 30 Sep 2026MIT106.3M / weekRepositorynpmAtom feed

Your version

7.0.0

major18 Jul 2017Where it was published

7.18.2 is the newest release of 7.x.

In short

7 breaking3 new

  • Breaking

    Drop support for node < 4.x.

  • Breaking

    Remove pg.connect pg.end and pg.cancel singleton methods.

  • Breaking

    Client#connect(callback) now returns undefined. It used to return an event emitter.

  • Breaking

    Upgrade pg-pool to 2.x.

  • Breaking

    Upgrade pg-native to 2.x.

  • Breaking

    Standardize error message fields between JS and native driver. The only breaking changes were in the native driver as its field names were brought into alignment with the existing JS driver field names.

  • Breaking

    Result from multi-statement text queries such as SELECT 1; SELECT 2; are now returned as an array of results instead of a single result with 1 array containing rows from both queries.

Security

1 advisory affects 7.0.0; 7.1.2 fixes them

Release note

Breaking Changes

  • Breaking

    Drop support for node < 4.x.

  • Breaking

    Remove pg.connect pg.end and pg.cancel singleton methods.

  • Breaking

    Client#connect(callback) now returns undefined. It used to return an event emitter.

  • Breaking

    Upgrade pg-pool to 2.x.

  • Breaking

    Upgrade pg-native to 2.x.

  • Breaking

    Standardize error message fields between JS and native driver. The only breaking changes were in the native driver as its field names were brought into alignment with the existing JS driver field names.

  • Breaking

    Result from multi-statement text queries such as SELECT 1; SELECT 2; are now returned as an array of results instead of a single result with 1 array containing rows from both queries.

Please see here for a migration guide

Enhancements

  • Overhauled documentation: node-postgres.com.

  • Add Client#connect() => Promise<void> and Client#end() => Promise<void> calls. Promises are now returned from all async methods on clients if and only if no callback was supplied to the method.

  • Add connectionTimeoutMillis to pg-pool.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.