Re: ALTER TABLE MODIFY COLUMN
От | Hiroshi Inoue |
---|---|
Тема | Re: ALTER TABLE MODIFY COLUMN |
Дата | |
Msg-id | 3AD69425.13CA75A4@tpf.co.jp обсуждение исходный текст |
Ответ на | ALTER TABLE MODIFY COLUMN (Mark Butler <butlerm@middle.net>) |
Список | pgsql-hackers |
Mark Butler wrote: > > I was looking at how hard it would be to support altering column types and it > seems to me that it would be trivial to support changing nullability, Yes. The problem is how to formulate 'DROP CONSTRAINT' feature. > increasing the maximum length of the VARCHAR data type and increasing the > precision or scale of the DECIMAL / NUMERIC data type. > Yes. The problem is how PostgreSQL could recognize the fact. [snip] > I understand that with the current heap tuple format described in > backend/access/common.c that changing the type of any fixed length attribute > requires updating every row. > > Surely if we have an write exclusive table lock we can rewrite tuples in place > rather than creating new versions with its corresponding 2x space requirement. > PostgreSQL has a no overwrite storage manager, so this seems to have little advantage. We now have a mechanism to replace existent relation files safely. We could avoid running VACUUM, multiple version of tuples in a file etc ... regards, Hiroshi Inoue
В списке pgsql-hackers по дате отправления: