Skip to content

Support structured PostgreSQL publication and subscription DDL - #2554

Open
minleejae wants to merge 2 commits into
JSQLParser:masterfrom
minleejae:feat/postgresql-replication-ddl
Open

Support structured PostgreSQL publication and subscription DDL#2554
minleejae wants to merge 2 commits into
JSQLParser:masterfrom
minleejae:feat/postgresql-replication-ddl

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

Summary

Add structured PostgreSQL CREATE/ALTER PUBLICATION and CREATE/ALTER SUBSCRIPTION statements, independently based on master.

  • Publication table groups, column lists, row filters, schema groups and FOR ALL TABLES; ADD/SET/DROP membership and ownership/rename/options changes.
  • Subscription connection, publication membership, refresh, enable/disable, options, SKIP and ownership/rename changes.
  • Separate typed publication and subscription options, preserving omitted values and literal spellings without injecting server defaults.
  • Visitor, expression deparser, table-name discovery, feature classification and PostgreSQL capability validation integration.

Only explicitly named publication tables are reported as relations. Schema names, publication names, subscription names and connection strings are not table references. Subscription operations that can initiate asynchronous data copying are classified as possible data modifications. New StatementVisitor methods have compatibility defaults.

The capability flags cover statement families, not every server-version-specific option or catalog-dependent restriction. Usage documentation explains these boundaries and warns that serialized subscription SQL can contain connection credentials.

Validation

  • Full Gradle check, including formatting, static analysis and tests (local Spotless ratcheted against upstream/master).
  • Default Maven clean verify including license processing and Javadocs: 5,386 tests, zero failures/errors, 26 skipped.
  • 44 SQL round trips plus typed AST, programmatic construction, traversal, feature classification and malformed-syntax regression tests.
  • All 44 inputs and regenerated SQL checked against the PostgreSQL 18 grammar through pglast; no database execution is claimed.
  • Existing modeled corpus cases retain support.

References: CREATE PUBLICATION, ALTER PUBLICATION, CREATE SUBSCRIPTION, ALTER SUBSCRIPTION.

@manticore-projects

Copy link
Copy Markdown
Contributor

Please resolve conflicts.

@minleejae
minleejae force-pushed the feat/postgresql-replication-ddl branch from e51c8c0 to cd47a3c Compare September 6, 2026 13:52
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