Rebase the version-specific SQL templates to target PostgreSQL 14#10054
Rebase the version-specific SQL templates to target PostgreSQL 14#10054dpage wants to merge 1 commit into
Conversation
The base (default) SQL templates previously targeted PostgreSQL < 12. Re-base them so the default target is 14 - the oldest supported server version - by collapsing every version bucket <= 14 (11_plus, 12_plus, 13_plus, 14_plus and the old default) into a single `default`, keeping per file the content a v14 server resolves today. Buckets for newer versions (15_plus, 16_plus, 17_plus, 18_plus) are retained as overrides. The transformation is behaviour-preserving for every server version >= 14: template (and test-fixture) resolution is byte-identical before and after for all supported versions, verified programmatically across every bucket container and confirmed by the resql, ERD and Schema Diff suites against PostgreSQL 18. Also drop PostgreSQL/EDB Advanced Server 13 from the 9.16 supported-server list and repoint the sqleditor explain_plan tests (which referenced the removed 12_plus/13_plus buckets) at the new default template. Closes pgadmin-org#10050
|
Important Review skippedToo many files! This PR contains 300 files, which is 150 over the limit of 150. To get a review, narrow the scope: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (300)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
The base (
default) SQL templates historically targeted PostgreSQL < 12. This re-bases the version-bucketed templates so the default target is 14 — the oldest supported server version — keeping overrides only for newer versions.For every "bucket container" (a directory holding
default/<N>_plussubdirs), every bucket with version number ≤ 14 (11_plus,12_plus,13_plus,14_plusand the olddefault) is collapsed into a singledefault, choosing — per file — the content that a server running exactly v14 resolves today. Buckets for newer versions (15_plus,16_plus,17_plus,18_plus) are retained untouched as overrides.sqleditorexplain_plan tests (which referenced the now-removed12_plus/13_plusbuckets) at the newdefaulttemplate.VersionedTemplateLoaderand its generic resolution algorithm are unchanged.Behaviour preservation
The transform is behaviour-preserving for every server version ≥ 14. Template (and test-fixture) resolution was verified to be byte-identical before and after for all supported versions, across every bucket container, by simulating the loader's resolution at each version boundary. A server < 14 (now unsupported) resolves the new
defaultinstead of a dropped bucket — the intended effect.Test plan
utils.tests.test_versioned_template_loader— 6 passedtools.sqleditor.tests.test_explain_plan_templates— 4 passedresqlreverse-engineered SQL suite vs PostgreSQL 18 — 841 scenarios passedtools.erd— 9 passed;tools.schema_diff— 2 passedCloses #10050