Re: alter column type
От | John R Pierce |
---|---|
Тема | Re: alter column type |
Дата | |
Msg-id | 5571F09D.8060405@hogranch.com обсуждение исходный текст |
Ответ на | Re: alter column type (Ravi Krishna <sravikrishna3@gmail.com>) |
Ответы |
Re: alter column type
|
Список | pgsql-general |
On 6/5/2015 11:37 AM, Ravi Krishna wrote: > Why is PG even re-writing all rows when the data type is being changed > from smaller (int) to larger (bigint) type, which automatically means > existing data is safe. Like, changing from varchar(30) to varchar(50) > should involve no rewrite of existing rows. int to bigint requires storage change, as all bigints are 64 bit while all ints are 32 bit. it would be a MESS to try and keep track of a table that has some int and some bigint storage of a given field. now, varchar 30 to 50, that I can't answer, are you sure that does a rewrite? the storage is exactly the same for those. -- john r pierce, recycling bits in santa cruz
В списке pgsql-general по дате отправления: