feat: share PostgreSQL table, index and view alteration actions - #2707
Merged
manticore-projects merged 6 commits intoSep 25, 2026
Merged
manticore-projects merged 6 commits into
manticore-projects merged 6 commits into
Conversation
Signed-off-by: minleejae <mmj9808@gmail.com>
Signed-off-by: minleejae <mmj9808@gmail.com> # Conflicts: # src/main/java/net/sf/jsqlparser/statement/StatementVisitor.java # src/main/java/net/sf/jsqlparser/util/TablesNamesFinder.java # src/main/java/net/sf/jsqlparser/util/deparser/StatementDeParser.java # src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt
Signed-off-by: minleejae <mmj9808@gmail.com>
Signed-off-by: minleejae <mmj9808@gmail.com>
Signed-off-by: minleejae <mmj9808@gmail.com>
Signed-off-by: minleejae <mmj9808@gmail.com>
Contributor
|
Thank you! |
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.
PostgreSQL table, index and view property changes previously fell back to raw ALTER text or failed to parse, preventing callers from inspecting and modifying their targets and values. This introduces a shared RelationAlterAction model and parser for ALTER TABLE, ALTER INDEX, ALTER VIEW properties and ALTER MATERIALIZED VIEW, while retaining the existing ALTER VIEW AS path.
The shared actions cover rename/owner/schema, storage parameters, tablespace/access method, column defaults/statistics/storage/compression, dependency and constraint/inheritance changes, replica identity, clustering, persistence, typed-table association and trigger states. Column statistics retain explicit DEFAULT and expose SET/RESET attribute options. A separate AlterTablespaceMove models ALL IN TABLESPACE with owner filters and NOWAIT across tables, indexes and materialized views, so tablespaces and index/type names are not reported as table references.
Object-specific validation rejects unsupported combinations. Rendering, expression traversal and table discovery reuse the same action models; the existing table and query-definition APIs remain available.
Validation: full Gradle check, including JavaCC ambiguity, unit tests and static analysis. Added AST mutation, visitor, statement-boundary, invalid-form and round-trip coverage. PostgreSQL 18.6 execution compared original/toString/deparser catalog results for 31 additional property, column-statistics and bulk-move cases; all matched. ALTER INDEX column SET STATISTICS DEFAULT was additionally confirmed on the actual PostgreSQL 18.6 server.
Syntax references: ALTER TABLE, ALTER INDEX, ALTER VIEW, ALTER MATERIALIZED VIEW.