Context
This issue tracks Task 5 from docs/superpowers/plans/2026-06-11-postgresql-libpg-query-compatibility.md.
Goal
Implement the release-delta and structural-delta comparison layer for the PostgreSQL compatibility harness.
Files
- Create
scripts/pg_compat/compare_versions.py
- Create
tests/pg_compat/test_compare_versions.py
- Create the PG17/PG18 fixture set under
tests/pg_compat/fixtures/
Requirements
- Diff deterministic inventories by stable statement ID.
- Report added, removed, nearest-source changed statements, and new oracle nodes.
- Extract grammar alternatives, keyword category changes, parse-node fields, and protobuf fields.
- Assign stable 24-character feature IDs and mark target-side additions/changes as
UNWITNESSED_FEATURE.
- Ignore protobuf wire-tag renumbering and inspect nested
oneof fields.
Acceptance
python3 -m unittest discover -s tests/pg_compat -p "test_compare_versions.py" -v passes.
- The full PG17/PG18 source fixture comparison is deterministic.
- The full compatibility Python suite passes with
PG_COMPAT_RUNNER set.
Implementation
Implemented by PR #50 in commit 01a2e3a.
Context
This issue tracks Task 5 from
docs/superpowers/plans/2026-06-11-postgresql-libpg-query-compatibility.md.Goal
Implement the release-delta and structural-delta comparison layer for the PostgreSQL compatibility harness.
Files
scripts/pg_compat/compare_versions.pytests/pg_compat/test_compare_versions.pytests/pg_compat/fixtures/Requirements
UNWITNESSED_FEATURE.oneoffields.Acceptance
python3 -m unittest discover -s tests/pg_compat -p "test_compare_versions.py" -vpasses.PG_COMPAT_RUNNERset.Implementation
Implemented by PR #50 in commit
01a2e3a.