Skip to content

Remove the df.ensure_durofut helper - #332

Open
pinodeca wants to merge 1 commit into
mainfrom
remove-ensure-durofut
Open

Remove the df.ensure_durofut helper#332
pinodeca wants to merge 1 commit into
mainfrom
remove-ensure-durofut

Conversation

@pinodeca

@pinodeca pinodeca commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make the conditional operators delegate operand normalization to df.if()
  • remove the duplicated df.ensure_durofut(text) PL/pgSQL helper from fresh installs
  • replace the operator helpers before dropping df.ensure_durofut(text) RESTRICT in the 0.2.5 to 0.2.6 upgrade
  • preserve compatibility with legacy object-valued partial expressions and old schemas running the new .so

Upgrade compatibility

Customers that receive the new .so without running ALTER EXTENSION retain their cataloged helper and operator bodies. Those operators continue to work because the df.sql() and df.if() C bindings are unchanged. Customers that upgrade get the new operators and the helper is dropped; customer-owned dependents cause the upgrade to fail safely through RESTRICT.

Test plan

  • cargo build --features pg17
  • cargo clippy --features pg17
  • cargo fmt -p pg_durable -- --check
  • ./scripts/test-unit.sh (263 passed, 16 ignored)
  • ./scripts/test-e2e-local.sh (53 passed)
  • ./scripts/test-upgrade.sh (70 passed, including B1 on 0.2.2 through 0.2.5 schemas)
  • ./scripts/run-pgspot.sh sql/pg_durable--0.2.5--0.2.6.sql
  • git diff --check

@pinodeca
pinodeca force-pushed the remove-ensure-durofut branch 2 times, most recently from 2a9e912 to 10a8b86 Compare August 4, 2026 23:43
Delegate operand normalization to df.if() and remove the duplicated
PL/pgSQL helper from fresh installs.

Update the 0.2.5-to-0.2.6 migration to replace the operator helpers
before dropping df.ensure_durofut with RESTRICT. Preserve binary-only
upgrade compatibility and support partial expressions created before
ALTER EXTENSION.
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.

2 participants