pg-native
npmv3.9.0A slightly nicer interface to Postgres over node-libpq
Safe to adopt
Yes — pg-native scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 32 days ago. 15 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- AMaintenance: grade A, Excellent.
Last published 32 days ago. 15 releases in the last 2 years.
- AWeight: grade A, Excellent.
Pulls in 4 transitive packages, about 583 KB installed (at least — some of the tree is still being crawled).
- BSupply chain: grade B, Good.
This package 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 pg-native 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 pg-native, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- No constraint declared
- Module format
- ESM + CommonJS
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the pg-native README.
const Client = require('pg-native')
const client = new Client();
client.connect(function(err) {
if(err) throw err
// text queries
client.query('SELECT NOW() AS the_date', function(err, rows) {
if(err) throw err
console.log(rows[0].the_date) // Tue Sep 16 2014 23:42:39 GMT-0400 (EDT)
// parameterized statements
client.query('SELECT $1::text as twitter_handle', ['@briancarlson'], function(err, rows) {pg-native 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 |
|---|---|---|---|---|
| pg-nativethis page | 0 | 2 | MIT | 1 month ago |
| pg | 46.3M | 5 | 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 |
| libpq | 228.3K | 1 | MIT | 1 day ago |
Dependencies
Declared by pg-native v3.9.0. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (2)
Dev (8)
Used by
Popular packages that depend on pg-native.
Relationship graph
Dependencies (left) and dependents (right) of pg-native.
Frequently installed together
A socket implementation that can run on Cloudflare Workers using native TCP connections.
Next generation testing framework powered by Vite
The postgres client/server binary protocol, implemented in TypeScript
Connection pool for node-postgres
Functions for dealing with a PostgreSQL connection string
Module for reading .pgpass
generator async control flow goodness
TypeScript typings for Cloudflare Workers
Like which(1) unix command. Find the first instance of an executable in the PATH.
PostgreSQL client - pure javascript & libpq with the same API
Release history
14 releases in the last two years, typically about 37 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 3.9.0latest | 1 month ago | 32 KB | MIT |
| 3.8.0 | 3 months ago | 27 KB | MIT |
| 3.7.0 | 6 months ago | 27 KB | MIT |
| 3.6.0 | 6 months ago | 27 KB | MIT |
| 3.5.2 | 1 year ago | 27 KB | MIT |
| 3.5.1 | 1 year ago | 27 KB | MIT |
| 3.5.0 | 1 year ago | 27 KB | MIT |
| 3.4.5 | 1 year ago | 27 KB | MIT |
| 3.4.1 | 1 year ago | 21 KB | MIT |
| 3.4.0 | 1 year ago | 21 KB | MIT |
| 3.3.1-alpha.0 | 1 year ago | 21 KB | MIT |
| 3.3.0 | 1 year ago | 52 KB | MIT |
| 3.2.2 | 1 year ago | 52 KB | MIT |
| 3.2.1 | 1 year ago | 52 KB | MIT |
| 3.2.0 | 2 years ago | 51 KB | MIT |
Overview
pg-native is an npm package that a slightly nicer interface to Postgres over node-libpq. It has 2 known dependents in the graph. The latest version is 3.9.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need a slightly nicer interface to Postgres over node-libpq and value a focused 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
- 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 pg-native?
Yes — pg-native scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 32 days ago. 15 releases in the last 2 years.
How do I install pg-native?
Run `npm install pg-native` to add pg-native to your npm project.
How many dependencies does pg-native have?
pg-native declares 10 direct dependencies and pulls in 4 packages in total once its runtime tree is resolved totalling about 583 KB on disk.
What license is pg-native released under?
pg-native is distributed under the MIT license.
How popular is pg-native?
npm does not publish download counts. Within PackageGraph's crawl, 2 known packages depend on pg-native.
Is pg-native still maintained?
The most recent release of pg-native (v3.9.0) was published 1 month ago.
Does pg-native run install scripts?
No. pg-native does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.