Skip to content

fix: preserve PostgreSQL identity sequence names - #2687

Merged
manticore-projects merged 1 commit into
JSQLParser:masterfrom
minleejae:fix/identity-sequence-name
Sep 24, 2026
Merged

manticore-projects merged 1 commit into
JSQLParser:masterfrom
minleejae:fix/identity-sequence-name

Conversation

@minleejae

@minleejae minleejae commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

PostgreSQL identity SEQUENCE NAME options currently lose their qualified sequence name during parsing/rendering. Keep the name as a structured Sequence.Parameter value so callers can inspect or rename it without editing opaque tokens.

The shared identity production is used by CREATE TABLE and ALTER TABLE ADD IDENTITY, while numeric options continue to use the existing sequence parameter parser. Standalone sequence and ALTER SET option syntax remain separate.

Validation:

  • Full Gradle check passed (Java 17), including grammar ambiguity, unit tests, coverage, formatting, Checkstyle, PMD, and SpotBugs.
  • CREATE and ALTER identities both generated values starting at 5 and used the requested sequence name on PostgreSQL 17.11.
  • Added AST, mutation, and parse/deparse regression coverage.

Syntax reference: official documentation.

Additional version-boundary validation: the original, toString, and deparser SQL was executed on PostgreSQL 18.6, including the focused behavioral cases. Reviewed the PostgreSQL 18 grammar. Runtime version numbers above identify the tested binaries; this does not claim support for every statement in those DBMS versions.

Signed-off-by: minleejae <mmj9808@gmail.com>
@manticore-projects
manticore-projects merged commit 82bed50 into JSQLParser:master Sep 24, 2026
10 checks passed
@manticore-projects

Copy link
Copy Markdown
Contributor

thank you!

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