change column data type from smallint to integer - Mailing list pgsql-general

From pobox@verysmall.org
Subject change column data type from smallint to integer
Date
Msg-id 431FA04F.1000607@verysmall.org
Whole thread Raw
Responses Re: change column data type from smallint to integer
List pgsql-general
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/


pgsql-general by date:

Previous
From: Matthew Peter
Date:
Subject: Re: back references using regex
Next
From: Leonid Safronie
Date:
Subject: Cost based SELECT/UPDATE