Re: ALTER TABLE modifications
От | Peter Eisentraut |
---|---|
Тема | Re: ALTER TABLE modifications |
Дата | |
Msg-id | Pine.LNX.4.44.0311131514220.16787-100000@peter.localdomain обсуждение исходный текст |
Ответ на | Re: ALTER TABLE modifications (Rod Taylor <pg@rbt.ca>) |
Ответы |
Re: ALTER TABLE modifications
|
Список | pgsql-patches |
Rod Taylor writes: > Yes, it is certainly fine to do so, but much faster to do the above. Are table schema changes performance-sensitive operations, and are they usually done in bulk? I doubt it. > I've not found another database which allows this syntax. The suggestion > of TRANSFORM was Toms and was a result of using an assignment cast by > default. Do you have a better term I can use? I'm not sure I buy this whole concept in the first place. If there is no cast between type A and type B, then surely changing a table column from A to B is nonsensical. > -- or say Bytes to MBytes (original column is int8) > ALTER TABLE tab ALTER col TYPE integer TRANSFORM col / (1024 * 1024); You can do this using a plain column type change plus an UPDATE. I'd prefer to keep these operations independent. -- Peter Eisentraut peter_e@gmx.net
В списке pgsql-patches по дате отправления: