Skip to content

Support PostgreSQL CREATE and ALTER COLLATION - #2721

Merged
manticore-projects merged 3 commits into
JSQLParser:masterfrom
minleejae:feat/postgresql-collation-ddl-20260925
Sep 27, 2026
Merged

manticore-projects merged 3 commits into
JSQLParser:masterfrom
minleejae:feat/postgresql-collation-ddl-20260925

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

PostgreSQL accepts CREATE COLLATION c FROM "C" and parameter-based definitions, but these statements were unsupported. Collation DDL is needed when parsing schema scripts that use non-default text comparison rules.

Add CREATE/ALTER COLLATION nodes and reuse the existing structured option representation and expression printer. Copy-source and parameter forms are mutually exclusive; ALTER supports REFRESH VERSION, RENAME, OWNER and SET SCHEMA. Preserve bare flags such as deterministic, which PostgreSQL's grammar and server accept.

Tests cover copy/options forms, providers, mutations, expression traversal, malformed input, and statement boundaries. Ten additional definitions/alterations were executed on PostgreSQL 18.6, including libc/builtin providers and bare deterministic, with matching collation catalog state after both renderers. ICU syntax is covered by parser tests; the local runtime checks do not claim ICU availability.

Syntax references: CREATE COLLATION, ALTER COLLATION.

Validation: focused tests, JavaCC ambiguity checks, Checkstyle and Spotless on this independent branch. The combined implementation also passes the full Gradle check and Maven verify; the 1,304-input prior regression corpus has no previously successful input regressions.

Signed-off-by: minleejae <mmj9808@gmail.com>
Signed-off-by: minleejae <mmj9808@gmail.com>
@manticore-projects

Copy link
Copy Markdown
Contributor

Please resolve many conflicts.

Signed-off-by: minleejae <mmj9808@gmail.com>
@manticore-projects
manticore-projects merged commit 8c713fc into JSQLParser:master Sep 27, 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