pg-regress

Automate pg_regress SQL test execution and validation for the kham-pg extension.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/preedep/kham --skill pg-regress
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pg-regress
Source: https://github.com/preedep/kham/tree/main/.claude/skills/pg-regress
Command: npx skills add https://github.com/preedep/kham --skill pg-regress

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the execution and validation of pg_regress-based SQL tests for the kham-pg extension, ensuring SQL correctness and regression safety.

Core Features & Use Cases

  • Automated regression testing for kham-pg's SQL extension
  • Docker-based, deterministic test runs via make -C kham-pg regress
  • Easy debugging of failing tests with clear expected vs actual outputs

Quick Start

Run the regression suite to execute all kham-pg pg_regress tests.

Frequently Asked Questions about pg-regress

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate PostgreSQL regression testing for a custom extension?

Automate PostgreSQL regression testing by coordinating pg_regress test directories, Makefile targets, and Docker containers to execute SQL tests and validate deterministic exact-output comparisons for custom extensions.

How do I refresh expected output files when pg_regress tests fail?

Refresh expected output files by running automated pg_regress tests to capture actual SQL query results, then updating the expected output artifacts to match the current deterministic behavior for regression validation.

What is the best way to debug failing integration tests in a PostgreSQL Docker environment?

Debug failing integration tests by running the regression suite in a deterministic Docker container, which isolates the environment and provides clear expected versus actual output comparisons to pinpoint SQL regressions.

Can I run pg_regress integration tests without manually configuring the PostgreSQL environment?

Yes, you can run pg_regress integration tests without manual setup by leveraging Docker-based containers that automatically coordinate the PostgreSQL environment and Makefile targets for deterministic execution.

Why do my SQL integration tests show mismatched outputs across different environments?

SQL integration tests show mismatched outputs when environments lack determinism; running pg_regress inside Docker containers standardizes the PostgreSQL environment and Makefile targets to ensure exact-output comparisons.

Does pg-regress support authoring new SQL test files for the kham-pg extension?

Yes, pg-regress supports authoring new SQL test files for the kham-pg extension by automating the execution, validation, and expected output generation needed to verify SQL correctness and regression safety.