libpq
npmv1.11.0Low-level native bindings to PostgreSQL libpq
Adopt with care
libpq is usable, with caveats. This package runs an install script on your machine, has a single maintainer (bus factor of 1).
- BAdoption: grade B, Good.
228.3K downloads per week and 1 known dependents.
- BMaintenance: grade B, Good.
Last published 125 days ago. 5 releases in the last 2 years.
- AWeight: grade A, Excellent.
Pulls in 2 transitive packages, about 551 KB installed (at least — some of the tree is still being crawled).
- CSupply chain: grade C, Fair — worth a look.
This package runs an install script on your machine, has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding libpq to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Part of this dependency tree has not been crawled yet, so these figures are a lower bound rather than a final total.
Licenses in the dependency tree
Every license you inherit by installing libpq, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- No constraint declared
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- Runs on install
Installing this package executes a script defined by its publisher. That is normal for native modules, but it is also how supply-chain attacks run — review it before installing in CI or on a machine with credentials.
Quick start
A usage example from the libpq README.
var Libpq = require('libpq');
var pq = new Libpq();libpq vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| libpqthis page | 228.3K | 1 | MIT | 4 months ago |
| pg | 46.3M | 5 | MIT | 1 day ago |
| pg-native | 0 | 2 | MIT | 1 day ago |
| pg-pool | 43.5M | 1 | MIT | 1 day ago |
| pgpass | 33M | 1 | MIT | 1 day ago |
| drizzle-orm | 19M | 0 | Apache-2.0 | 1 day ago |
Dependencies
Declared by libpq v1.11.0. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (2)
Dev (5)
Used by
Popular packages that depend on libpq.
Relationship graph
Dependencies (left) and dependents (right) of libpq.
Frequently installed together
Release history
5 releases in the last two years, typically about 70 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 1.11.0latest | 4 months ago | 105 KB | MIT |
| 1.10.0 | 6 months ago | 105 KB | MIT |
| 1.9.0 | 7 months ago | 103 KB | MIT |
| 1.8.15 | 1 year ago | 89 KB | MIT |
| 1.8.14 | 1 year ago | 89 KB | MIT |
| 1.8.13 | 2 years ago | 84 KB | MIT |
| 1.8.12 | 4 years ago | 85 KB | MIT |
| 1.8.11 | 4 years ago | 85 KB | MIT |
| 1.8.10 | 4 years ago | 85 KB | MIT |
| 1.8.9 | 7 years ago | 82 KB | MIT |
| 1.8.8 | 8 years ago | 79 KB | MIT |
| 1.8.7 | 9 years ago | — | MIT |
| 1.8.6 | 9 years ago | — | MIT |
| 1.8.5 | 10 years ago | — | MIT |
| 1.8.4 | 10 years ago | — | MIT |
Overview
libpq is an npm package that low-level native bindings to PostgreSQL libpq. It is very popular, with about 228.3K downloads per week and 1 known dependents in the graph. The latest version is 1.11.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need low-level native bindings to PostgreSQL libpq and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (228.3K weekly downloads).
- Clear open-source license (MIT).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use libpq?
libpq is usable, with caveats. This package runs an install script on your machine, has a single maintainer (bus factor of 1).
How do I install libpq?
Run `npm install libpq` to add libpq to your npm project.
How many dependencies does libpq have?
libpq declares 7 direct dependencies and pulls in 2 packages in total once its runtime tree is resolved totalling about 551 KB on disk.
What license is libpq released under?
libpq is distributed under the MIT license.
How popular is libpq?
libpq has approximately 228,304 downloads per week and 1 known dependent packages.
Is libpq still maintained?
The most recent release of libpq (v1.11.0) was published 4 months ago.
Does libpq run install scripts?
Yes. libpq defines a lifecycle script that executes when the package is installed. Review it before installing in CI or on a machine holding credentials.