Skip to content

fix(plugin-postgresql): rename versioned capabilities to avoid name collision#1243

Merged
datlechin merged 1 commit into
mainfrom
hotfix/postgres-capabilities-rename
May 13, 2026
Merged

fix(plugin-postgresql): rename versioned capabilities to avoid name collision#1243
datlechin merged 1 commit into
mainfrom
hotfix/postgres-capabilities-rename

Conversation

@datlechin
Copy link
Copy Markdown
Member

Summary

Main is broken: PostgreSQLPluginDriver declares two properties named capabilitiesPostgreSQLCapabilities (from PR #1241) and PluginCapabilities (from the protocol). The compiler can't disambiguate at the call sites in PostgreSQLPluginDriver+Columns.swift.

Also fixes a stray majorVersion reference left over from the helper that PR #1241 removed.

Changes

  • Rename var capabilities: PostgreSQLCapabilitiesvar versionedCapabilities. Updates all call sites in PostgreSQLPluginDriver.swift and PostgreSQLPluginDriver+Columns.swift.
  • Add PostgreSQLCapabilities.hasModernICUSyntax (PG 16+) and replace the dangling majorVersion check in CREATE DATABASE ICU locale branch with versionedCapabilities.hasModernICUSyntax.

Why two properties named capabilities?

PluginCapabilities is an OptionSet declared in the plugin protocol (alterTableDDL, materializedViews, etc.). Each plugin exposes the set it supports. PostgreSQLCapabilities from #1241 is per-server-version (gates against pg_matviews, attidentity, etc.). The two are unrelated; same name was a collision, not a design choice.

versionedCapabilities makes the distinction explicit.

Test plan

  • xcodebuild build — green (was failing on main).

@datlechin datlechin merged commit 7202627 into main May 13, 2026
2 checks passed
@datlechin datlechin deleted the hotfix/postgres-capabilities-rename branch May 13, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant