# pgcentralfoundation/pgrx

Build Postgres Extensions with Rust!

Repository: https://github.com/pgcentralfoundation/pgrx
Canonical: https://ross.abutalabs.com/products/pgrx
Language: Rust
License: NOASSERTION
License Family: other
Topics: rust, rustlang, postgres, postgresql, postgresql-extension
Last push: 2026-07-30T15:07:22+00:00

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

## Adoption (not part of the score)
Stars 4767, forks 330 (observed 2026-08-28T04:08:59.220499+00:00)

## What it is
pgrx is a Rust framework for developing PostgreSQL extensions, providing idiomatic and safe bindings to Postgres internals. It includes cargo-pgrx, a managed development environment for creating, testing, and packaging extensions across Postgres versions 13 through 19.

## Use cases
- write postgres extensions in rust
- create custom postgres functions and UDFs
- define custom postgres types from rust structs
- test an extension against multiple postgres versions
- generate sql schemas automatically from rust code
- write postgres trigger functions in rust

## When to choose
- you want to build Postgres extensions with memory safety and idiomatic Rust
- you need first-class support for UDFs, triggers, and custom types
- you want a managed dev workflow (init, run, test, package) via cargo-pgrx
- you must target several Postgres versions from one codebase

## When to avoid
- you only need simple SQL or PL/pgSQL extensions without Rust
- you are writing extensions for Postgres versions older than 13
- you need a C-based extension with direct control over Postgres internals

## Facets
- artifact type: framework
- maturity: active
- function: database, sdk, developer-tools, cli, testing
- domain: databases, developer-tools, backend
- platform: rust, cli
- tags: postgresql, postgres-extensions, udf, cargo-pgrx, sql-generation, linux, macos

## Member repositories
- pgcentralfoundation/pgrx (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:59.220499+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:18:50.101307+00:00, confidence not recorded.
  - readme: https://github.com/pgcentralfoundation/pgrx (fetched 2026-08-28T04:08:59.220499+00:00, sha 4138e1c69993)
  - registry_crates: https://crates.io/api/v1/crates/pgrx (fetched 2026-08-29T09:02:08.216117+00:00, sha 76d585c12562)
- Data as of 2026-08-30T08:39:29.467469+00:00.
