'Redshift won't change column type
I'm trying to change a column in Redshift from varchar to integer. I've already checked and the strings are all numbers so it should force fine.
When I run:
alter table schema.table_name alter column "id" type int;
I get the following error:
ERROR: target data type "int8" is not supported [SQL State=0A000]
I've checked the Redshift documentation and just to rule out a few potentials:
- The field is not a primary or foreign key
- There's no compression encodings on it
- There's no default values
- The code is not in a transaction block
Any pointers would be amazing, thank you!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
