| От | pobox@verysmall.org |
|---|---|
| Тема | Re: change column data type from smallint to integer |
| Дата | |
| Msg-id | 432036E0.3000806@verysmall.org обсуждение исходный текст |
| Ответ на | Re: change column data type from smallint to integer (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
| Список | pgsql-general |
Alvaro Herrera wrote: > On Thu, Sep 08, 2005 at 04:22:07AM +0200, pobox@verysmall.org wrote: > > Hi, > >> 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. > > In 8.0, you can alter the type directly in the table. In releases > before 8.0, you have found the right workaround. Thank you, Alvaro, for the confirmation!
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера