Can't change datatype of column in postgres
postgresql
Solution
I don't think you can do that: http://www.postgresql.org/docs/7.4/interactive/ddl-alter.html
You should split it into 3 steps
- add new column
- copy values from 1st column to 2nd
- drop old column
Problem
I'm trying to change the datatype of a column to varchar but get the following error ``` ERROR: syntax error at or near "type" at character 40 ``` My code looks as follows ``` alter table n_logs alter column action type varchar(100); ``` I'm running PostgreSQL 7.4.13 (Yeah, I know I need to upgrade)