Re: ALTER TABLE modifications
От | Dave Cramer |
---|---|
Тема | Re: ALTER TABLE modifications |
Дата | |
Msg-id | 1068825571.1625.197.camel@localhost.localdomain обсуждение исходный текст |
Ответ на | Re: ALTER TABLE modifications (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: ALTER TABLE modifications
|
Список | pgsql-patches |
OK, Here is another approach, that would retain column order. It will require that the table be locked while this proceeds, but I think this is a good idea anyway. lock table create newtable as select c1, c2, c3::newtype modify pg_class to point to the new filename modify existing pg_attribute for the column in question recreate indexes that exist on the column unlock table Dave On Fri, 2003-11-14 at 09:57, Peter Eisentraut wrote: > Rod Taylor writes: > > > The method is rename old column, add new column, move data across, move > > or reform dependencies, drop old column. > > I can do this by hand. If we have an explicit command to do it, then it > needs to preserve the table schema. Else, this feature would be mostly > useless and a certain source of complaints.
В списке pgsql-patches по дате отправления: