Re: alter table is taking a long time
От | Johan Nel |
---|---|
Тема | Re: alter table is taking a long time |
Дата | |
Msg-id | hd3c90$fn7$1@news.eternal-september.org обсуждение исходный текст |
Ответ на | Re: alter table is taking a long time ("stanciutheone@gmail.com" <stanciutheone@gmail.com>) |
Ответы |
Re: alter table is taking a long time
|
Список | pgsql-general |
Hi, stanciutheone@gmail.com wrote: > is just a varchar field that i want to make it bigge ,right now the > alter table is working for over 6 hours You can try to update the pg_attribute table directly. Just first do some select statements to ensure you only update what you really want to. Also, make a backup before you do it. update pg_attribute set attlen = 4 + <newlength> where attname = 'yourcolumnname' That will take only a couple of milliseconds to do. I used this before in scenarios where the column to be changed was referenced in many queries making it almost impossible to do a drop and recreating of the queries without any side effects. HTH, Johan Nel Pretoria, South Africa.
В списке pgsql-general по дате отправления: