Conversation
Replace the server and foreign-data wrapper Action enums with ForeignObjectAlterAction. Remove the TriggerState compatibility enum and accessors in favor of EnableState, and document the API migration. Signed-off-by: minleejae <mmj9808@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ALTER SERVER and ALTER FOREIGN DATA WRAPPER expose separate enums for the same OPTIONS/OWNER/RENAME actions. Replace both with ForeignObjectAlterAction while retaining each statement's own payload. Trigger and rewrite-rule actions already share EnableState internally; remove the redundant TriggerState compatibility layer.
Breaking API changes:
usage.rst includes migration examples and recompilation guidance. OPTIONS still covers server VERSION and wrapper handler/validator changes. Trigger/rule action kinds and NAME/ALL/USER targets stay distinct; switching actions retains inactive payload without rendering it.
Validation: Java 17 Gradle check passes: 9,403 tests, 9,378 passed, 25 skipped, zero failures/errors, including formatting, grammar conflicts, Checkstyle, PMD and SpotBugs. The 151 focused tests cover action changes, inactive fields, VERSION NULL versus omission, trigger targets, both renderers and reparsing. Grammar edits only replace Java enum references; SQL acceptance is unchanged.
Combined validation of these three refactoring branches: Gradle check passes (9,465 tests, 9,440 passed, 25 skipped, zero failures). All 882 original DDL fixtures execute on MySQL 8.4.11/PostgreSQL 18.6. The 875 supported cases also produce toString and deparser SQL that executes successfully. Seven parse failures already exist on base bb55bb9, including two foreign-option identifier cases using SAMPLE. Final parsing results and SQL outputs match the base and the DB-replayed outputs exactly; there are no new parsing/rendering regressions.