On this page
Overview
Postgres.js is a PostgreSQL client for Node.js, Deno, Bun, and Cloudflare runtimes. Its API centers on ES6 tagged templates, separating interpolated values into PostgreSQL parameters while keeping SQL visible in application code.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Turn tagged-template values into PostgreSQL parameters automatically
Values interpolated into sql tagged templates become placeholders such as $1 and are sent separately from SQL text. Helpers also cover dynamic identifiers and insert or update construction.
Sources: [1]
Use transactions, cursors, LISTEN/NOTIFY, and dynamic query fragments through one API
The client provides transactions, cursor-based iteration, dynamic SQL fragments, LISTEN/NOTIFY, custom types, and other PostgreSQL-oriented features without a large abstraction layer.
Sources: [1]
Best fit
Before adoption
Separate dynamic identifiers from ordinary user-provided values
Ordinary value interpolation is parameterized, while table and column identifiers use dedicated helpers such as sql(identifier). Do not pass arbitrary user input as identifiers without an allowlist.
Sources: [1]
Review connection and transaction lifecycles for serverless and edge deployments
The package exports builds for Node.js, Deno, Bun, and workerd, but database connection limits and proxy or pooler compatibility still depend on the deployment provider. Version 3.4.9 declares Node 12+.
Sources: [3]
Official sources
- [1]Postgres.js v3.4.9 README(2026-10-06)
- [2]Postgres.js v3.4.9 release(2026-10-06)
- [3]Postgres.js v3.4.9 package metadata(2026-10-06)
Supplemental curator note
It fits backends that want explicit SQL with a small driver layer. Distinguish values from identifiers and review connection lifecycles in serverless deployments.
Try it in 3 steps
- 1
Get the source
git clone --depth 1 https://github.com/porsager/postgres.git - 2
Enter the repository
cd postgres - 3
Check the official steps
Continue with the commands in the README Installation, Quick Start, or Getting Started section.
find . -maxdepth 1 -iname 'README*' -exec sed -n '1,220p' {} \; -quit
Growth
Growth trends · Last 30 days
8,728 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 0
- Open PRs
- 72
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- postgresql
- postgres
- database
- nodejs
- driver
- client
- deno
- cockroachdb
- Stars
- 8,728
- Forks
- 382
- Watchers
- 48
- Open issues
- 252
- Contributors
- 77
- Owner type
- User
- Primary language
- JavaScript
- License
- Unlicense
- Repository last updated
- Sep 2, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Pino18,238 Stars
3 shared tag(s) · 1 shared category(s) · Same language
add low-overhead structured JSON logging to Node.js backends
JavaScript - npm CLI10,171 Stars
3 shared tag(s) · 1 shared category(s) · Same language
Manage JavaScript project dependencies and published packages from the command line
JavaScript - i18next8,636 Stars
3 shared tag(s) · 1 shared category(s) · Same language
keep translation keys, plurals, interpolation, and resource loading independent of the UI framework
JavaScript - fake-indexeddb695 Stars
3 shared tag(s) · 1 shared category(s) · Same language
recreate the IndexedDB API in memory for Node.js tests
JavaScript - Electron123,388 Stars
3 shared tag(s) · 1 shared category(s)
bundle Chromium and Node.js to build desktop applications for three major operating systems with HTML, CSS, and JavaScript
C++ - Playwright97,099 Stars
3 shared tag(s) · 1 shared category(s)
Drive Chromium, Firefox, and WebKit through one API and test runner for E2E, scripting, and agent browser automation
TypeScript
Report incorrect information
Tell us if any listing information is incorrect or outdated.