# Postgres.js: 7.5 out of 10

A strong pick. 6th of 10 in [Database drivers](https://elestia.ai/opensource/db-drivers/index.md).

Postgres.js is a fast PostgreSQL client with no dependencies, built on tagged template literals. It runs on Node, Bun, Deno and Cloudflare Workers. It is a strong pick for a new Postgres project, but it depends mostly on one maintainer. The new v4 is a full rewrite below the API, with breaking changes and a few early integration bugs, so pin your version and test the upgrade.

**Best for:** TypeScript teams on PostgreSQL who want a fast, modern, dependency-free client with safe tagged-template queries, including on Bun, Deno and Workers.

## Scores

- **Overall: 7.5** (likely 6.5 to 8.5)
  - Claude Opus 5.5 (7.0): It is a strong Postgres client with an excellent API and modern runtime support, and it is a first-class Drizzle driver. node-postgres stays the safer default because tooling supports it more widely and more people maintain it. The fresh v4 rewrite with breaking changes and early bugs keeps it at 7 for now.
  - GPT-6.2 Sol (8.0): Postgres.js is a strong choice for new PostgreSQL projects that want to write SQL directly and need pooling, transactions, or streaming. Its active releases support that choice, while the recent rewrite and concentrated maintenance make the two-year outlook less certain. Node-postgres remains the broader default when existing integrations or Hyperdrive cache compatibility drive the decision.
- **Needed by many: 6.2** (likely 5.1 to 7.2)
  - Claude Opus 5.5 (6.0): PostgreSQL is the most common database for new JS and TypeScript backends, so many developers need a Postgres driver. It serves only Postgres, so it is narrower than the whole driver category. Its support for several runtimes widens the audience somewhat.
  - GPT-6.2 Sol (6.4): PostgreSQL was used by 57.9% of database respondents in the 2026 Stack Overflow survey, and the driver covers several major JavaScript runtimes. Its audience is the subset that connects to PostgreSQL directly or selects it through an integration. The survey measures database use, so the size of that subset is uncertain.
- **Helps a lot: 8.2** (likely 7.1 to 9.1)
  - Claude Opus 5.5 (8.0): The API is ergonomic and safe: queries are tagged templates, and it covers transactions, cursors, COPY, LISTEN/NOTIFY and logical replication. v4 adds pipelining, abort signals, savepoints and observability. An independent benchmark puts v3 slightly behind pg, so the 'fastest' claim is not clear-cut. The range is wide because the v4 rewrite is weeks old and users report regressions.
  - GPT-6.2 Sol (8.4): Version 4.1.1 pairs composable, parameterized SQL with pooling, transactions, streaming, and replication. The examples and structured errors give people and coding agents clear patterns, but callers still supply row types and some poolers need special settings. Outside benchmarks show results vary by workload and test v3, leaving performance on the rewritten v4 driver uncertain.
- **Holds up over time: 6.6** (likely 5.0 to 7.6)
  - Claude Opus 5.5 (6.0): The project is active: 95 commits and 5 releases in the last year, a big v4 rewrite, and only 5 open issues. But one maintainer drives it, and funding looks small. v4 brought many breaking changes that downstream projects had to adapt to.
  - GPT-6.2 Sol (7.1): The project recorded 95 commits and five releases in the past year, and a user confirmed that a reported Hyperdrive regression was fixed the next day. StackBlitz sponsors the project, but the visible release history centers on one maintainer. Earlier users reported waiting for fixes, and the recent v4 rewrite changed date handling and packaging, leaving future upgrade costs uncertain.
- **Used widely: 5.7** (likely 4.4 to 7.0)
  - Claude Opus 5.5 (6.0): Downloads went from 5.2M to 151M per 4 weeks, about 29x against a median of 4.1x. That is strong relative growth, though some of it is likely transitive installs through ORMs and tools. ecosyste.ms counts 1,846 dependent repositories, against 273k for pg, so far fewer projects choose it directly than choose node-postgres.
  - GPT-6.2 Sol (5.4): Four-week npm downloads rose from 5.2 million to 151.5 million, a 29.1-fold increase against the catalog median of 4.1-fold. That points to a growing share of installs, but repeat builds and downstream installs leave growth in direct choices uncertain. The indexed 1,846 repositories and 204 packages show a much smaller footprint than node-postgres, while 8,767 stars show interest and four Bluesky links add little evidence about use.
- **Vouched for: 6.9** (likely 5.7 to 7.8)
  - Claude Opus 5.5 (6.0): Drizzle ORM and Effect build first-class adapters on it, and many production apps on GitHub upgraded to v4 quickly. Independent benchmarks and write-ups exist but are few. Community discussion is thin, with no Hacker News stories and few Bluesky posts.
  - GPT-6.2 Sol (7.7): Drizzle maintains a dedicated integration, and Supabase and Cloudflare document deployment with the driver. A user confirmed that 4.1.1 restored a real Hyperdrive workload, and Bun credits Postgres.js for its SQL API design. Public production evidence for v4 is still limited, and Cloudflare recommends node-postgres for better Hyperdrive cache compatibility.
- **Safe: 6.9** (likely 5.7 to 7.9)
  - Claude Opus 5.5 (7.0): It has no dependencies, no OSV advisories, and a permissive Unlicense licence. v4 fixed a startup-parameter injection through NUL characters and a __proto__ row-prototype issue, and backported both to v3. The Scorecard is weak at 4.2, with no branch protection, security policy or pinned dependencies, and releases rest on one person.
  - GPT-6.2 Sol (6.7): The package has zero runtime dependencies, and the Unlicense permits commercial use. OSV lists no advisories, and 4.1.1 fixed a TLS hostname verification issue and a transaction bug. The 4.2 OpenSSF Scorecard flags weak review and missing branch protection, and the repository has no published security policy. The release history centers on one maintainer, and npm build provenance remains unverified.

## Good

- Tagged-template queries are parameterized by default, with clean helpers for inserts, updates, dynamic identifiers and joins.
- It has no runtime dependencies, bundled types, and runs on Node, Bun, Deno and Cloudflare Workers.
- v4 adds pipelined scheduling, AbortSignal, nested savepoints, logical replication slots, tracing channels and SCRAM channel binding.
- Drizzle ORM and Effect support it as a first-class driver, so it fits a common modern stack.

## Bad

- v4 breaks code: it is ESM only, server-side parameter typing is the default, sql.array() is removed and transactions are stricter. Users report Drizzle type errors and some hangs.
- One maintainer does most of the work, with little visible funding.
- Far fewer libraries and tutorials target it than node-postgres (pg), which most Postgres tooling assumes.
- The OpenSSF Scorecard is weak (4.2), with no branch protection, security policy or pinned dependencies.

## The numbers

- Downloads, 4 weeks: 151M
- In a year: ×29
- GitHub stars: 8.8k
- Commits, 12 months: 95
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: Unlicense
- GitHub: https://github.com/porsager/postgres
- npm: https://www.npmjs.com/package/postgres

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
