</>PackageGraphPackageGraph

pg-native

npmv3.9.0

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

2
Direct dependencies

Runtime packages this one declares itself.

4
Total installed

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

583 KB
Install size

Unpacked size of this package plus its entire runtime tree.

2
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 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) {
Example truncated — see the full README.

pg-native vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
pg-nativethis page02MIT1 month ago
pg46.3M5MIT1 day ago
pg-pool43.5M1MIT1 day ago
pgpass33M1MIT1 day ago
drizzle-orm19M0Apache-2.01 day ago
libpq228.3K1MIT1 day ago

Dependencies

Declared by pg-native v3.9.0. Runtime dependencies are installed with the package; dev dependencies are not.

Runtime (2)

libpq ^1.8.15pg-types 2.2.0

Dev (8)

async ^0.9.0concat-stream ^1.4.6generic-pool ^2.1.1lodash ^4.17.21mocha 11.7.5node-gyp >=10.xokay ^0.3.0semver ^7.7.2

Used by

Popular packages that depend on pg-native.

Relationship graph

Dependencies (left) and dependents (right) of pg-native.

libpqpgpgpasspg-native
pg-native dependencies dependents

Frequently installed together

Release history

14 releases in the last two years, typically about 37 days apart.

Recent versions of pg-native
VersionPublishedSizeLicense
3.9.0latest1 month ago32 KBMIT
3.8.03 months ago27 KBMIT
3.7.06 months ago27 KBMIT
3.6.06 months ago27 KBMIT
3.5.21 year ago27 KBMIT
3.5.11 year ago27 KBMIT
3.5.01 year ago27 KBMIT
3.4.51 year ago27 KBMIT
3.4.11 year ago21 KBMIT
3.4.01 year ago21 KBMIT
3.3.1-alpha.01 year ago21 KBMIT
3.3.01 year ago52 KBMIT
3.2.21 year ago52 KBMIT
3.2.11 year ago52 KBMIT
3.2.02 years ago51 KBMIT

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

Keywords

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.