crabgresql

PostgreSQL regression test corpus

This directory holds a vendored copy of PostgreSQL’s regression test data (src/test/regress/): sql/, expected/, data/, parallel_schedule and resultmap. No PostgreSQL source code is vendored — only the test corpus, as permitted by the clean-room policy in docs/ARCHITECTURE.md §7, with attribution in the repo-root NOTICE file. The upstream license is in COPYRIGHT (the PostgreSQL License).

It also holds catalog/ — PostgreSQL’s system-catalog data files (src/include/catalog/*.dat: pg_type, pg_proc, pg_cast, pg_namespace). These seed pg_catalog’s built-in rows: crates/crabgresql-catalog codegens from them at build time. Only the .dat DATA is vendored — never the C headers or the Perl Catalog.pm parser. The pin is recorded in CATALOG_COMMIT (kept equal to REGRESS_COMMIT).

To (re)populate or bump the catalog data:

./scripts/sync-catalog.sh   # reads the pin from REGRESS_COMMIT

Provenance

The files come from the postgres/postgres GitHub mirror at the commit recorded in REGRESS_COMMIT (postgres master / 19devel — matching the server_version = 19.0 CrabgreSQL reports).

To (re)populate or bump the pin:

./scripts/sync-regress.sh   # edit COMMIT inside the script to bump

The sync is reproducible: it downloads the codeload tarball for the pinned commit and extracts only the paths above. vendor/postgres/regress/ is fully regenerated on every run, so local edits to it are always lost — the corpus is used byte-for-byte unmodified.

Notes on the corpus

The runner lives in crates/crabgresql-pg-regress; see the repo README for usage.