# vitaly-t/pg-promise

PostgreSQL interface for Node.js

Repository: https://github.com/vitaly-t/pg-promise
Canonical: https://ross.abutalabs.com/products/pg-promise
Homepage: https://vitaly-t.github.io/pg-promise
Language: JavaScript
License: MIT
License Family: permissive
Topics: postgresql, nodejs, promises, javascript, transaction, promise-library, typescript
Last push: 2026-08-20T16:03:19+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 98, longevity 100
- inputs: {"age_days": 4201, "days_push": 13, "days_rel": 13, "gap_med": 15.0, "n_releases_24m": 23}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3554, forks 221 (observed 2026-08-28T04:08:09.631129+00:00)

## What it is
pg-promise is a PostgreSQL interface library for Node.js built on top of node-postgres. It provides automatic connection and transaction management, a powerful query-formatting engine, and declarative result handling via promise-based methods.

## Use cases
- run postgres queries from node.js with promises
- manage database transactions automatically in node
- format sql queries with named parameters safely
- load and execute external sql files
- handle query results declaratively based on expected row count

## When to choose
- you want a lightweight postgres layer without a full ORM
- you need fine-grained control over SQL and transactions
- you prefer writing raw SQL with safe parameter formatting

## When to avoid
- you want an ORM with schema migrations and model definitions
- you are not using Node.js or PostgreSQL

## Facets
- artifact type: library
- maturity: stable
- function: database-driver, orm, database
- domain: databases, backend, web-development
- platform: -
- tags: postgresql, promises, transactions, query-formatting, sql, nodejs, javascript, typescript

## Member repositories
- vitaly-t/pg-promise (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:09.631129+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:34:18.356999+00:00, confidence not recorded.
  - readme: https://github.com/vitaly-t/pg-promise (fetched 2026-08-28T04:08:09.631129+00:00, sha f6814a7acf52)
  - homepage: https://vitaly-t.github.io/pg-promise (fetched 2026-08-29T09:28:27.188995+00:00, sha ebfc3b3081e5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
