lib/pq
Go PostgreSQL driver for database/sql observed · 2026-08-28
Health v2 · maintenance only
91/100
- Activity 98
- Release rhythm 77
- Longevity 100
Flags: no_license
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 6.5
- age_days: 5287
- days_rel: 152
- days_push: 13
- n_releases_24m: 7
Adoption not part of the score
9950 stars · 969 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
lib/pq is a pure Go PostgreSQL driver for the standard database/sql package. It supports all maintained PostgreSQL versions and libpq-compatible DSN connection strings.
Use cases
- connect to postgresql from go
- go database/sql postgres driver
- run sql queries against postgres in go
- use postgres url connection strings in go
- handle postgres errors in go
When to choose
- you use database/sql and need a mature, widely imported PostgreSQL driver
- you want libpq-style DSN support and run-time parameters in connection strings
When to avoid
- you need high performance or binary protocol features - pgx is generally recommended instead
- you need PostgreSQL-specific types outside database/sql's generic interface
Facets
library · maturity stable
database-driver database databases backend developer-tools go cross-platform postgresql database-sql sql-driver libpq
4 sources
- readme: https://github.com/lib/pq · fetched 2026-08-28 · 9282e72cd054
- homepage: https://pkg.go.dev/github.com/lib/pq · fetched 2026-08-29 · 1bd330f35db4
- site_page: https://pkg.go.dev/about · fetched 2026-08-29 · 757852027879
- site_page: https://go.dev/project · fetched 2026-08-29 · d5ca00bb378b
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| lib/pq | main | 91 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem