Re: ALTER TABLE modifications
От
Dave Cramer
Тема
Re: ALTER TABLE modifications
Дата
Msg-id
1068825571.1625.197.camel@localhost.localdomain
Ответ на
Re: ALTER TABLE modifications (Peter Eisentraut)
Список
Дерево обсуждения
ALTER TABLE modifications Rod Taylor <pg@rbt.ca>
Re: ALTER TABLE modifications Hannu Krosing <hannu@tm.ee>
Re: ALTER TABLE modifications Bruce Momjian <pgman@candle.pha.pa.us>
Re: ALTER TABLE modifications Tom Lane <tgl@sss.pgh.pa.us>
Re: ALTER TABLE modifications Rod Taylor <pg@rbt.ca>
Re: ALTER TABLE modifications Peter Eisentraut <peter_e@gmx.net>
Re: ALTER TABLE modifications Rod Taylor <pg@rbt.ca>
Re: ALTER TABLE modifications Peter Eisentraut <peter_e@gmx.net>
Re: ALTER TABLE modifications Rod Taylor <pg@rbt.ca>
Re: ALTER TABLE modifications Hannu Krosing <hannu@tm.ee>
Re: ALTER TABLE modifications Dave Cramer <pg@fastcrypt.com>
Re: ALTER TABLE modifications Rod Taylor <pg@rbt.ca>
Re: ALTER TABLE modifications Peter Eisentraut <peter_e@gmx.net>
Re: ALTER TABLE modifications Rod Taylor <pg@rbt.ca>
Re: ALTER TABLE modifications Tom Lane <tgl@sss.pgh.pa.us>
Re: ALTER TABLE modifications Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: ALTER TABLE modifications Peter Eisentraut <peter_e@gmx.net>
Re: ALTER TABLE modifications Hannu Krosing <hannu@tm.ee>
Re: ALTER TABLE modifications Tom Lane <tgl@sss.pgh.pa.us>
Re: ALTER TABLE modifications Dave Cramer <pg@fastcrypt.com>
Re: ALTER TABLE modifications Rod Taylor <pg@rbt.ca>
Re: ALTER TABLE modifications Alvaro Herrera <alvherre@dcc.uchile.cl>
Re: ALTER TABLE modifications Hannu Krosing <hannu@tm.ee>
Re: ALTER TABLE modifications Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: ALTER TABLE modifications Hannu Krosing <hannu@tm.ee>
Re: ALTER TABLE modifications Peter Eisentraut <peter_e@gmx.net>
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 по дате отправления