Re: pg_dump only certain rows

Поиск
Список
Период
Сортировка
От Anthony E . Greene
Тема Re: pg_dump only certain rows
Дата
Msg-id 20010210181817.E8182@cp5340
обсуждение исходный текст
Ответ на pg_dump only certain rows  ("Stefan Waidele jun." <St.Waidele.jun@Krone-Neuenburg.de>)
Список pgsql-novice
On Sat, 10 Feb 2001 16:11:00 Stefan Waidele jun. wrote:
>I want to normalize an existing table.
>
>Is there a way to drop the unwanted columns in my original table?
>
>SQL-alter does not seem to do it, neither can I specify the columns used in
>
>pd_dump. Or have I overlooked something?

Select the rows and columns you want directly into a new table, then drop
the old table:

SELECT column1,column2 INTO new_table FROM old_table WHERE
filter_conditions;

Tony
--
Anthony E. Greene <agreene@pobox.com> <http://www.pobox.com/~agreene/>
PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26  C484 A42A 60DD 6C94 239D
Chat:  AOL/Yahoo: TonyG05    ICQ: 91183266
Linux. The choice of a GNU Generation. <http://www.linux.org/>

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

Предыдущее
От: "Stefan Waidele jun."
Дата:
Сообщение: pg_dump only certain rows
Следующее
От: "Andy Arledge"
Дата:
Сообщение: novice, question