Dropping a column

Поиск
Список
Период
Сортировка
От Patrick Aland
Тема Dropping a column
Дата
Msg-id 20010118130429.P12170@stetson.edu
обсуждение исходный текст
Список pgsql-general
I know how to drop a column from a table by selecting into a new table the columns I want to keep. However the problem
Iam running into is that some of the columns in my original table have certain attibutes (auto incrememnting, default
values,etc) however the method of: 

SELECT id,name,description INTO TABLE temp FROM origtable;
DROP TABLE origtable;
ALTER TABLE temp RENAME TO origtable;

Preserves my data but not the extra column information (at least according to a \d tablename)

Anyone know if it is possible to do this?

Thanks.

--
------------------------------------------------------------
 Patrick Aland                          paland@stetson.edu
 Network Administrator                  Voice: 904.822.7217
 Stetson University                     Fax: 904.822.7367
------------------------------------------------------------

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

Предыдущее
От: Robert Korteweg
Дата:
Сообщение: MS Access data to PostgrSQL data
Следующее
От: Jeff Self
Дата:
Сообщение: How do I import table information?