Packages

pg

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

Upgrading pg From 4.5.7 to 5.0.0

1 release in betweenevery note read

Other targets from 4.5.7Latest8.23.1
  1. 4.5.7yours
  2. 5.0.0target
1
change to make
0
advisories fixed
3
new
0
fixes

Before you upgrade

Tick each one off as you go
  • Breaking5.0.0

Security

1 advisory still affects 5.0.0

Upgrading to 5.2.1 clears it.

Release by release

  1. 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

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.