Re: [GENERAL] ALTER TABLE

Поиск
Список
Период
Сортировка
От Dmitry Morozovsky
Тема Re: [GENERAL] ALTER TABLE
Дата
Msg-id Pine.BSF.4.05.9908102133270.15954-100000@woozle.rinet.ru
обсуждение исходный текст
Ответ на ALTER TABLE  ("Jonathan R. Karlen" <jkarlen@karlen.com>)
Список pgsql-general
On Mon, 9 Aug 1999, Jonathan R. Karlen wrote:

JRK> Is there a way to drop a field from a table?  ALTER TABLE seems to only
JRK> allow the adding and modification of fields.

Try to select all content to temporary table, then drop old table, create
new with unneeded column(s) removed, and them reselect all data back.

Also, don't forget to re-create indexes, rules, views and other
table-related things as they are reference table by its (internal to
Postgres) ID. Also don't forget to create needed permissions.

For large tables, dumping, editing schema & data with simple script and
then recreating database may be simpler solution...

Sincerely,
D.Marck                                   [DM5020, DM268-RIPE, DM3-RIPN]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
------------------------------------------------------------------------


В списке pgsql-general по дате отправления:

Предыдущее
От: Dmitry Morozovsky
Дата:
Сообщение: repost: unique composite index with boolean fields
Следующее
От: Wim Kerkhoff
Дата:
Сообщение: Selecting between dates