Packages

postgres

4.0.0 · 29 Oct 2026Unlicense36.8M / weekRepositoryHomepagenpmAtom feed

Your version

Where each line stands

Plan an upgrade
  • 4.x4.0.0No known advisoryLatest line
  • 3.x3.4.9No known advisoryTo 4.0.0
  • 1.x1.0.2No known advisoryTo 4.0.0
  • 0.x0.0.1No known advisoryTo 4.0.0

Latest releases

All 34 releases
  1. 4.x · latest line
  2. 4.0.0

    29 Oct 2026
    • security

      A NUL character in a connection parameter can no longer add parameters (also in v3). A database, user or connection value such as 'db\0user\0postgres' was sent as further startup parameters, so an app that put untrusted input there, as with a database per tenant, could be made to log in as another user where that user needs no password, or with replication or options set. A NUL in any protocol string, also in query text and identifiers, now rejects with NUL_CHARACTER.

    • security

      A column named __proto__ is an own property (also in v3). It became the prototype of the row, so a JSON value in it, for instance from a column alias built from user input, made the row inherit its properties (row.isAdmin), in query results and in sql.subscribe rows alike.

    • The server decides the type of every parameter (infer: false by default) (#392). v3 typed a Date as timestamptz, a boolean, a Buffer, a bigint and arrays of these from JavaScript; v4 sends them without a type and writes each value for the type the server asks for, as libpq does. timestamptz columns, values written to a column of their own type, strings, numbers and anything cast work as before. Outside UTC, a Date written to or compared with a timestamp or date column is taken as UTC instead of the session's local time, and a timestamp is read as UTC, so it comes back as the instant that was written whatever the time zone. A Date where the query doesn't decide its type, such as in date_trunc('day', ${ date }), needs a cast (${ date }::timestamptz). infer: true keeps v3's behaviour.

  3. 3.x · maintenance
  4. 3.4.9

    5 Apr 2026
  5. 3.4.8

    6 Jan 2026
    • Prevent out of bound errors from commit-time failures de64f7a

    • Use lower max connections in Cloudflare Workers environment 94b7170

    • Add support for sslnegotiation=direct - fixes #1104 7f80980

Dependency tracking · free for 3 projects

Know when your own dependencies move

postgres shipped a new major in the last 12 months, among 3 releases. inlinr shows which of your projects are behind, and what the upgrade breaks.

  • Advisories reach you

    An email when a critical or high advisory affects a project, before the next install.

  • Upgrades checked first

    Peer ranges, Node, ESM-only and types changes read before you bump.

  • Only what matters

    Majors and breaking notes stay; patches and sibling bumps fold into one line.

How dependency tracking works

Reading releases, release notes and advisories…

Registry facts last checked 4 Nov 2026. Releases and advisories last read 4 Nov 2026.