Packages

pg

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

Upgrading pg From 4.5.7 to 5.2.1

4 releases in betweennotes for 2

Other targets from 4.5.7Latest8.23.1
1+
change to make
0
advisories fixed
3+
new
?
fixes

Counted from 2 of 4 release notes. Advisories are counted from the advisory database, in full.

Before you upgrade

Tick each one off as you go
  • Breaking5.0.0

Release by release

  1. 5.1.0 – 5.2.13 releases, nothing new or fixed; 2 without a note

  2. 5.0.0

    Migration needed7 Jun 20163 new
    • Breaking

      require('pg').native now returns null if the native bindings cannot be found; previously, this threw an exception.

    • New

      Better error message when passing undefined as a query parameter

    • New

      Support for defaults.connectionString

    • New

      Support for returnToHead being passed to generic pool

1 other line we could not sort, mostly version bumps
  • Make the query object returned from client.query implement the promise interface. This is the first step towards promisifying more of the node-postgres api.

    5.1.0

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.