change column data type from smallint to integer

Поиск
Список
Период
Сортировка
От pobox@verysmall.org
Тема change column data type from smallint to integer
Дата
Msg-id 431FA04F.1000607@verysmall.org
обсуждение исходный текст
Ответы Re: change column data type from smallint to integer  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список 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 по дате отправления:

Предыдущее
От: Matthew Peter
Дата:
Сообщение: Re: back references using regex
Следующее
От: Leonid Safronie
Дата:
Сообщение: Cost based SELECT/UPDATE