Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jpopesculian
Copy link
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
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

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
2 participants