proomt

Search

Search posts, papers, and topics

All posts

PostgreSQLConstructive3 min readtutorialintermediate

pgsql-test: Real Postgres Testing for Faster Development Loops

Summary

pgsql-test is an MIT‑licensed harness that spins up a temporary PostgreSQL instance, seeds it once, and rolls back after each test so you can verify real database behavior (constraints, triggers, RLS) from your application test suite. It integrates with Jest, Supabase, Drizzle, Graphile, and CI tools, delivering fast feedback—e.g., 246 tests across 44 databases completed in four seconds.

  • pgsql-test launches an ephemeral PostgreSQL instance, seeds it once, and rolls back each test transaction to a known state.
  • `setContext` lets you set role and JWT claim values so RLS policies can be exercised in tests.
  • Integrations exist for supabase-test, drizzle-orm-test, pglite-test, and graphile-test, covering multiple stacks.
  • A Supabase benchmark ran 246 tests across 44 databases in 4 seconds, demonstrating fast feedback loops.

Backend engineers who rely on PostgreSQL should care because it lets them test database logic (constraints, triggers, RLS) in the same fast feedback loop as application code.

6/10

Related reading

  1. pgAssistant 3.8.0 : continuous improvement loop for Postgres

    pgAssistant 3.8.0 expands from a tuning advisor to a continuous PostgreSQL improvement platform, adding a Collector that records historical workload and environment data. It lets teams run an Observe‑Diagnose‑Prioritize‑Plan‑Implement‑Measure loop, compare consecutive snapshots, and measure the impact of applied recommendations.

    PostgreSQLpostgresql.org1 minrelease
  2. Introducing Neon Labs

    Neon Labs is a new experimental web app (Next.js + TypeScript) that offers two PostgreSQL upgrade tools: a live‑catalog Upgrade Assessment that flags version‑specific blockers, and a Migration Assistant that auto‑generates import, pg_dump/restore, or logical‑replication pipelines based on DB size and downtime needs. The tools run read‑only against a Neon project, never expose connection strings,…

    Neonneon.com6 minrelease
  3. Postgres week in the Netherlands: PGDay Lowlands & Percona Live 2026

    The author recaps two Dutch conferences where they presented ClickHouse‑Postgres extensions and discussed PostgreSQL 19 monitoring enhancements. The post explains how pg_clickhouse provides transparent query push‑down to ClickHouse and how pg_stat_ch streams per‑query metrics, plus new logging defaults and system views in PG 19.

    ClickHouseclickhouse.com7 min
  4. One Java Model from the App to PostgreSQL

    Codename One introduces a backend runtime allowing a single Java model to define entities and validation rules for both client applications and the server. This approach aims to reduce duplication and ensure consistent data rules from the app to PostgreSQL.

    CodeName Onecodenameone.com7 min