Search Postgresql Archives

change column data type from smallint to integer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

we run 'out of space' in one of our columns which is smallint and we need to make it integer.

I did some research and found out that the only way is to create a new column with integer data type, then SET new = old, then drop old and rename new like old [1].

Could somebody confirm if this is really the best way and if it is stable in respect to indexes, RI, triggers, stored procedures, etc.

Thank you,
Iv

[1] http://www.foranewliberty.com/blog/archives/2005/01/15/changing-data-types-in-postgresql/


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux