</>PackageGraphPackageGraph

libpq

npmv1.11.0

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

2
Direct dependencies

Runtime packages this one declares itself.

2
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

551 KB
Install size

Unpacked size of this package plus its entire runtime tree.

1
Tree depth

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

MIT

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.

PackageWeekly downloadsDependentsLicenseLast release
libpqthis page228.3K1MIT4 months ago
pg46.3M5MIT1 day ago
pg-native02MIT1 day ago
pg-pool43.5M1MIT1 day ago
pgpass33M1MIT1 day ago
drizzle-orm19M0Apache-2.01 day ago

Dependencies

Declared by libpq v1.11.0. Runtime dependencies are installed with the package; dev dependencies are not.

Runtime (2)

bindings 1.5.0nan ~2.26.2

Dev (5)

async ^2.6.2buffer-from ^1.1.1lodash ^4.17.11mocha ^10.8.2okay ^1.0.0

Used by

Popular packages that depend on libpq.

Relationship graph

Dependencies (left) and dependents (right) of libpq.

nanpg-nativelibpq
libpq dependencies dependents

Frequently installed together

Release history

5 releases in the last two years, typically about 70 days apart.

Recent versions of libpq
VersionPublishedSizeLicense
1.11.0latest4 months ago105 KBMIT
1.10.06 months ago105 KBMIT
1.9.07 months ago103 KBMIT
1.8.151 year ago89 KBMIT
1.8.141 year ago89 KBMIT
1.8.132 years ago84 KBMIT
1.8.124 years ago85 KBMIT
1.8.114 years ago85 KBMIT
1.8.104 years ago85 KBMIT
1.8.97 years ago82 KBMIT
1.8.88 years ago79 KBMIT
1.8.79 years agoMIT
1.8.69 years agoMIT
1.8.510 years agoMIT
1.8.410 years agoMIT

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

Keywords

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.