Re: pg_dump only certain rows - Mailing list pgsql-novice

From Anthony E . Greene
Subject Re: pg_dump only certain rows
Date
Msg-id 20010210181817.E8182@cp5340
Whole thread Raw
In response to pg_dump only certain rows  ("Stefan Waidele jun." <St.Waidele.jun@Krone-Neuenburg.de>)
List 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 by date:

Previous
From: "Stefan Waidele jun."
Date:
Subject: pg_dump only certain rows
Next
From: "Andy Arledge"
Date:
Subject: novice, question