You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was recently running a quick change to create an enum and change the type of an existing column in a table (with matching values) to that enum.
The attempted change was ALTER TABLE foo_table ALTER COLUMN bar_column TYPE baz_enum;
I was getting an error where the column FOO cannot be cast automatically to type ENUM_NAME
However, from a quick search, it might need the following to apply correctly. ALTER TABLE foo_table ALTER COLUMN bar_column TYPE baz_enum USING bar_column::baz_enum;
I think this is a similar issue to #3130, but not 100% exactly the same.
The text was updated successfully, but these errors were encountered:
I was recently running a quick change to create an enum and change the type of an existing column in a table (with matching values) to that enum.
The attempted change was
ALTER TABLE foo_table ALTER COLUMN bar_column TYPE baz_enum;
I was getting an error where the
column FOO cannot be cast automatically to type ENUM_NAME
However, from a quick search, it might need the following to apply correctly.
ALTER TABLE foo_table ALTER COLUMN bar_column TYPE baz_enum USING bar_column::baz_enum;
I think this is a similar issue to #3130, but not 100% exactly the same.
The text was updated successfully, but these errors were encountered: