# go-pg/pg

Golang ORM with focus on PostgreSQL features and performance

Repository: https://github.com/go-pg/pg
Canonical: https://ross.abutalabs.com/products/pg
Homepage: https://pg.uptrace.dev/
Language: Go
License: BSD-2-Clause
License Family: permissive
Topics: go, golang, orm, sql, hstore, postgresql, jsonb, database
Last push: 2026-07-10T14:43:19+00:00

## Health v2 (maintenance only)
Score: 80/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 91, release rhythm 54, longevity 100
- inputs: {"age_days": 4879, "days_push": 54, "days_rel": 96, "gap_med": 264.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5784, forks 414 (observed 2026-08-28T04:09:29.571552+00:00)

## What it is
go-pg is a Go ORM and PostgreSQL client focused on PostgreSQL-specific features like b, hstore, and arrays, with strong performance. It is now in maintenance mode receiving only critical fixes, with new development moved to the Bun ORM.

## Use cases
- map Go structs to PostgreSQL tables
- query PostgreSQL with b and hstore columns
- build a Go backend with a PostgreSQL ORM
- run efficient bulk inserts and selects in Go
- manage relations and joins between Go models

## When to choose
- maintaining an existing Go codebase already built on go-pg
- you need PostgreSQL-specific types like arrays, hstore, or b in a legacy stack

## When to avoid
- starting a new Go project - use Bun instead
- you need multi-database support like MySQL or SQLite
- you expect new features or active community development

## Facets
- artifact type: library
- maturity: maintenance
- function: orm, database-driver, database
- domain: databases, backend, developer-tools
- platform: go, windows, cross-platform
- tags: postgresql, golang, b, hstore, sql, maintenance-mode, successor-bun, linux, macos

## Member repositories
- go-pg/pg (main) score 80

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:29.571552+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-29T17:52:49.759041+00:00, confidence not recorded.
  - readme: https://github.com/go-pg/pg (fetched 2026-08-28T04:09:29.571552+00:00, sha b19da8b40b75)
  - homepage: https://pg.uptrace.dev/ (fetched 2026-08-29T08:48:10.498794+00:00, sha d8cdb49f6b39)
  - site_page: https://bun.uptrace.dev/ (fetched 2026-08-29T08:48:10.501422+00:00, sha e9f1430455e9)
  - site_page: https://pg.uptrace.dev/faq (fetched 2026-08-29T08:48:10.503445+00:00, sha 303603a1eb89)
- Data as of 2026-08-30T08:39:29.467469+00:00.
