I am trying to change length of a column from character varying(40)
to character varying(100)
.
Following the method described in this question Increasing the size of character varying type in postgres without data loss
ALTER TABLE info_table ALTER COLUMN docs TYPE character varying(100);
Tried with this command but returning syntax error
ERROR: syntax error at or near "TYPE" at character 52
Is there any change needed in this command? Using PostgreSQL version 7.4.30 (upgrade to 9.2 in process :) ).
I tried this same command in test db which is now upgraded with version 9.2. It is working fine there.