Skip to content

PG compatibility: release and structural delta extraction (Task 5) #48

Description

@renecannao

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions