Repository navigation
fix: parse PostgreSQL DDL key and identity options - #2929
Merged
manticore-projects merged 1 commit intoNov 15, 2026
Merged
manticore-projects merged 1 commit into
manticore-projects merged 1 commit into
Conversation
Preserve CAST/EXTRACT key expressions with the PostgreSQL dialect, accept both HASH bound name orders and retain identity persistence as typed sequence parameters. Add positive, negative and identifier regressions without widening standalone sequence syntax.
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 accepts the following DDL forms, which failed to parse:
existing expression nodes. Keep key attributes and require parentheses around
arithmetic expressions. A following opening parenthesis distinguishes a call from
identifiers such as extract.
the modulus/remainder AST fields and canonical MODULUS-first output.
including ALTER COLUMN ADD IDENTITY. Reject repeated persistence options and keep
standalone sequence syntax intact.
References: CREATE INDEX,
CREATE TABLE,
ALTER TABLE.
Validation:
cases also run against that baseline.
./gradlew clean check jar: PASS; 16,456 tests, zero failures/errors,25 existing skips. New regression class: 26/26 PASS. Grammar ambiguity, Checkstyle,
PMD, SpotBugs, Spotless and coverage verification all pass. Local execution uses
an external init script only to cap heaps and pin the formatter ratchet to f880f35.
Windows; grammar ambiguity and Codacy pass.
deparser outputs execute successfully on PostgreSQL 18.6, with catalog postchecks
for index expressions, partition bounds and identity sequence persistence/options.
observations). It changes nine failing observations and preserves every previously parsed observation, including AST,
canonical SQL, deparsing and table traversal results.
Bare CAST/EXTRACT keys require parser.withDialect(Dialect.POSTGRESQL), consistent
with the existing typed PostgreSQL function-key path.
AI assistance: prepared with OpenAI Codex.