简体   繁体   中英

Can't ALTER COLUMN TYPE in PostgreSQL “0A000: Cannot alter column ”FIELDA“ of relation ”TABLEA"

Trying to run the below script:

ALTER TABLE SCHEMA.TABLEA
ALTER COLUMN FIELDA TYPE VARCHAR(5)

And I am getting the following error:

0A000: Cannot alter column "FIELDA" of relation "TABLE"

The field is currently an integer and contains no data, only nulls.

As per the AWS documentation you cannot change the data type of a VARCHAR only the size.

https://docs.aws.amazon.com/redshift/latest/dg/r_ALTER_TABLE.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM