Re: Changing the Primary Key Column

From: "Tim Bruce" <pdxpug(at)tbruce(dot)com>
To: "Rich Shepard" <rshepard(at)appl-ecosys(dot)com>
Cc: pdxpug(at)postgresql(dot)org
Subject: Re: Changing the Primary Key Column
Date: 2011-02-24 00:21:21
Message-ID: f2b7390e4d287e9d872c3d925aebd614.squirrel@sm.bruce4.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pdxpug


On Wed, February 23, 2011 16:22, Rich Shepard wrote:
> On Wed, 23 Feb 2011, Michael Ewan wrote:
>
>> Yes that would be a good idea, and was implied in any suggestion of
>> dropping
>> tables. ;-)
>
>> Just be advised, pg_dump dumps to a copy from stdin: format with tab
>> delimiters.
>
> I read the pg_dump man page but did not learn how to specify an
> alternative format that would allow me to re-arrange column order, drop
> the
> unwanted column, and so on. Next step is looking at the 9.0.x docs for
> pg_dump.
>
> Rich
>
> --
> Sent via pdxpug mailing list (pdxpug(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pdxpug
>

Why not just dump the data (dump just the table with pg_dump), drop the
table, build the new table and re-load the data (using psql)?
--
Timothy J. Bruce

visit my Website at: http://www.tbruce.com
Registered Linux User #325725

In response to

Responses

Browse pdxpug by date

  From Date Subject
Next Message Rich Shepard 2011-02-24 00:22:11 Re: Changing the Primary Key Column
Previous Message Michael Ewan 2011-02-24 00:16:34 Re: Changing the Primary Key Column