Skip to content

Fix PostgreSQL REPLICA IDENTITY NOTHING regression - #2731

Open
minleejae wants to merge 2 commits into
JSQLParser:masterfrom
minleejae:fix/postgres-replica-identity-nothing-20260928
Open

minleejae wants to merge 2 commits into
JSQLParser:masterfrom
minleejae:fix/postgres-replica-identity-nothing-20260928

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

ALTER TABLE t REPLICA IDENTITY NOTHING fails with the PostgreSQL dialect after the typed relation-action dispatch introduced in #2707. PostgreSQL 18.6 accepts the statement, and JSqlParser 5.4 preserved it through its generic ALTER path.

Accept the existing K_NOTHING token in the replica-identity production and retain the existing RelationAlterAction.ReplicaIdentity API. Regression tests cover DEFAULT/FULL/NOTHING, structured AST inspection, changing the mode to NOTHING, both rendering paths, reparsing, and statement-list parsing.

Validation: the new tests fail on the baseline (4 failures), then all 74 PostgreSqlRelationAlterTest cases pass after regenerating the parser. JJTree/JavaCC generation reports no unexpected warnings or choice conflicts, and all production sources compile with Java 17 targeting Java 11. Full Gradle/Maven checks remain for CI.

The original SQL was executed successfully on PostgreSQL 18.6 during the corpus investigation. Re-executing the patched parser's output against PostgreSQL was blocked by local connection permissions and is not claimed here.

Signed-off-by: minleejae <mmj9808@gmail.com>
@minleejae
minleejae marked this pull request as ready for review September 28, 2026 08:38
Signed-off-by: minleejae <mmj9808@gmail.com>

This branch has not been deployed

No deployments
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.

1 participant