lib/pq
Go PostgreSQL driver for database/sql observed · 2026-10-20
Health v2 · maintenance only
85/100
- Activity 90
- Release rhythm 70
- 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-10-21. Adoption (stars, forks) is never an input.
- gap_med: 6.5
- age_days: 5335
- days_rel: 200
- days_push: 61
- n_releases_24m: 7
Adoption not part of the score
9967 stars · 972 forks observed · 2026-10-20
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-10-20 · 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 | 85 |
For agents
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem