Skip to content

feat: model PostgreSQL extended statistics DDL - #2712

Merged
manticore-projects merged 3 commits into
JSQLParser:masterfrom
minleejae:feat/postgresql-statistics-ddl
Sep 25, 2026
Merged

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

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

PostgreSQL CREATE STATISTICS and ALTER STATISTICS were unsupported, preventing schema tools from preserving extended statistics definitions alongside table migrations.

Add typed statistics statements using the existing expression-list and table models. Preserve optional names, IF NOT EXISTS, statistics kinds, column/expression keys, and ALTER ownership/name/schema/target actions. Both printers share the statement rendering methods, and visitors distinguish statistics object names from referenced tables. Existing DROP STATISTICS parsing remains compatible.

Validation: full Gradle check and grammar ambiguity gate; AST mutations, default targets, expression boundaries, invalid kinds/targets and following statements. All 22 audited CREATE/ALTER/DROP cases execute with matching selected statistics catalog results on PostgreSQL 18.6.

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

Copy link
Copy Markdown
Contributor

Please resolve conflicts.

Signed-off-by: minleejae <mmj9808@gmail.com>
Signed-off-by: minleejae <mmj9808@gmail.com>
@manticore-projects
manticore-projects merged commit 3e8324b into JSQLParser:master Sep 25, 2026
4 of 5 checks passed
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