Skip to content

fix(postgresql): preserve ALTER COLUMN TYPE clauses - #2

Merged
Zxc4wonder merged 5 commits into
jmsfrom
fix/pg-alter-column-type
Aug 10, 2026
Merged

fix(postgresql): preserve ALTER COLUMN TYPE clauses#2
Zxc4wonder merged 5 commits into
jmsfrom
fix/pg-alter-column-type

Conversation

@Zxc4wonder

Copy link
Copy Markdown
Owner

Summary

  • promote the existing fix/pg-alter-column-type work into the jms development branch
  • preserve PostgreSQL ALTER COLUMN TYPE, SET DATA TYPE, COLLATE, and USING during parse/output round trips
  • include the existing 1.2.28-jms.1 internal version, publishing workflow, and Maven coordinate updates from the source branch

PostgreSQL parser changes

  • extend SQLAlterTableAlterColumn with COLLATE and USING state
  • parse the PostgreSQL clauses in PGSQLStatementParser
  • emit them through PostgreSQL and shared SQL output visitors
  • add JumpServer16341Test regression coverage and update the PostgreSQL parser resource fixture

Commit range

The source branch is 5 commits ahead of jms and 0 commits behind:

  • fix(postgresql): preserve alter column type collate and using
  • chore: bump version to 1.2.28-jms.1
  • build: publish custom druid package
  • build: update druid parent coordinates
  • build: update internal druid coordinates

This PR intentionally reflects the complete remote fix/pg-alter-column-type branch, including its release/build files.

Zxc4wonder and others added 5 commits July 22, 2026 10:57
Targeted backport onto Druid 1.2.28 (jumpserver-1.2.28) for JumpServer #16341.

- PG ALTER COLUMN ... SET DATA TYPE <type> now parses (was: expect DEFAULT)
- PG character data types keep their COLLATE clause on output (alibaba#6573)
- PG ALTER COLUMN ... TYPE <type> USING <expr> now parses and round-trips (alibaba#6064)

Backported from upstream d42545f (PG SET DATA TYPE / COLLATE, alibaba#6467/alibaba#6573) and
26b856b (PG TYPE ... USING, alibaba#6064); only the PG TYPE/COLLATE/USING hunks were
carried over. Updates the postgresql/17.txt golden that encoded the old
dropped-COLLATE output. Adds JumpServer16341Test covering all four scenarios.

Co-Authored-By: Claude <noreply@anthropic.com>
Internal JumpServer release of the Druid 1.2.28 fork with the PostgreSQL
ALTER COLUMN TYPE/COLLATE/USING fix. Chen consumes com.alibaba:druid:1.2.28-jms.1
from the local Maven repository.

Co-Authored-By: Claude <noreply@anthropic.com>
@Zxc4wonder
Zxc4wonder marked this pull request as ready for review August 10, 2026 08:41
@Zxc4wonder
Zxc4wonder merged commit 4a436b3 into jms Aug 10, 2026
13 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.

1 participant