Skip to content

feat: allow a USING clause for alter table column type in postgres#848

Merged
tyt2y3 merged 1 commit intoSeaQL:masterfrom
jpopesculian:add-using-to-alter-type
Mar 16, 2025
Merged

feat: allow a USING clause for alter table column type in postgres#848
tyt2y3 merged 1 commit intoSeaQL:masterfrom
jpopesculian:add-using-to-alter-type

Conversation

@jpopesculian
Copy link
Copy Markdown
Contributor

PR Info

  • Dependencies:
  • Dependents:

New Features

  • Allows a USING clause for ALTER TABLE COLUMN TYPE

Bug Fixes

Breaking Changes

  • This is backwards compatible

Changes

  • Adds a Using variant to ColumnSpec

@jpopesculian jpopesculian force-pushed the add-using-to-alter-type branch from a99259d to 7c861e3 Compare December 20, 2024 15:36
@billy1624
Copy link
Copy Markdown
Member

Hey @jpopesculian, thanks for contributing!!

I think this is good to have! Any comments from @tyt2y3?


Additional Context:

The optional USING clause specifies how to compute the new column value from the old; if omitted, the default conversion is the same as an assignment cast from old data type to new. A USING clause must be provided if there is no implicit or assignment cast from old to new type.

https://www.postgresql.org/docs/current/sql-altertable.html

@tyt2y3 tyt2y3 merged commit 190125c into SeaQL:master Mar 16, 2025
@tyt2y3
Copy link
Copy Markdown
Member

tyt2y3 commented Mar 16, 2025

Thank you

@github-actions
Copy link
Copy Markdown

🎉 Released In 0.32.3 🎉

Thank you everyone for the contribution!
This feature is now available in the latest release. Now is a good time to upgrade!
Your participation is what makes us unique; your adoption is what drives us forward.
You can support SeaQL 🌊 by starring our repos, sharing our libraries and becoming a sponsor ⭐.

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.

(PG) Support ALTER COLUMN TYPE USING

3 participants