qmetrics.net

pgrx

Rust framework for PostgreSQL extensions

pgrx lets developers build PostgreSQL extensions in Rust with cargo workflows, schema generation, and testing across multiple server versions.

Overview

pgrx is a framework for writing PostgreSQL extensions in Rust with an emphasis on idiomatic and safe patterns. It supports building against several PostgreSQL major releases from one codebase, using Rust feature gates for version-specific APIs and testing across those versions.

The cargo-pgrx companion provides commands to create extensions, register PostgreSQL installs, run and test in psql, package RPM and DEB installs, run SQL regressions, and optionally build migration scripts. Extensions can be implemented largely in Rust with automatic mapping of many Rust types into PostgreSQL and generated SQL schemas, plus hooks to include custom SQL.

Safety features include translating Rust panics into transaction-aborting errors, memory management aligned with Rust drops around PostgreSQL errors, and procedural macros for guards and extern functions. Developers can expose UDFs, triggers, custom types, enums, composites, and use SPI safely.

Advanced bindings translate PostgreSQL C macros into Rust, offer hooks into planner and transaction lifecycle, and expose logging and internals through pgrx modules. Documented targets include x86_64 and aarch64 Linux, macOS, and Windows with clang and LLVM toolchain requirements.

Key features

  • cargo-pgrx development workflow
  • Multi-version PostgreSQL support
  • Automatic SQL schema generation
  • Rust types as Postgres types
  • pg_extern functions and triggers
  • SPI and memory context helpers
  • C macro translation for Postgres
  • Extension packaging for Linux

Use cases

  • Custom PostgreSQL extensions
  • Rust UDFs inside Postgres
  • Cross-version extension testing
  • Safe in-database logic
  • Packaged extension distribution

Tags

Similar software

Supabase

Open-source Postgres platform with auth, APIs, and storage

Supabase bundles a dedicated Postgres database with authentication, auto-generated REST and GraphQL APIs, realtime, functions, file storage, and vector tooling.

★ 115.6k⟳ todayApache-2.0
Open Source Alternative to:FirebaseFirebase Realtime Database

GORM

Feature-rich ORM library for Go applications

GORM maps Go structs to SQL databases with migrations, associations, hooks, and a fluent query API. It targets developer-friendly access patterns for common CRUD and relationship modeling.

★ 40k⟳ 1 month agoMIT
Frameworks & PlatformsDesktop/CLI app

TypeORM

TypeScript and JavaScript ORM for many SQL and NoSQL databases

TypeORM maps objects to relational and document databases from Node.js, browsers, and mobile shells. It supports TypeScript and JavaScript with both Data Mapper and Active Record styles.

★ 36.7k⟳ 3 days agoMIT
Frameworks & PlatformsDesktop/CLI app

MyBatis 3

Java SQL mapper with XML or annotation config

MyBatis links Java objects to SQL and stored procedures via XML or annotations. It trims repetitive JDBC parameter and result handling.

★ 20.4k⟳ yesterdayApache-2.0

Node Redis

High-performance Redis client for Node.js

node-redis connects Node.js applications to Redis with typed commands, clustering, pub/sub, transactions, and optional client-side caching.

★ 17.6k⟳ yesterdayMIT
Frameworks & PlatformsDesktop/CLI app

MyBatis-Plus

Enhanced MyBatis toolkit for Java database access

MyBatis-Plus extends MyBatis with code generation, conditional query builders, and pagination helpers. It stays compatible with MyBatis while adding convenience APIs for common CRUD work.

★ 17.5k⟳ todayApache-2.0
Frameworks & PlatformsDesktop/CLI app