Re: Changing the Primary Key Column

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pdxpug(at)postgresql(dot)org
Subject: Re: Changing the Primary Key Column
Date: 2011-02-24 00:40:21
Message-ID: alpine.LNX.2.00.1102231638000.17955@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pdxpug

On Wed, 23 Feb 2011, Tim Bruce wrote:

> 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)?

Tim,

I've not done this before and I'd still need to manually drop the first
column's worth of data.

Since I've been using the copy command, I will think overnight of copying
the table to a .csv file, editing that in emacs or joe (to remove the first
column), then drop the original table and copy it back in.

Then I'll need to figure out postGIS so I can map locations and build
surface maps.

Thanks,

Rich

In response to

Browse pdxpug by date

  From Date Subject
Next Message Rich Shepard 2011-02-24 00:42:05 Re: Changing the Primary Key Column
Previous Message Joshua D. Drake 2011-02-24 00:28:01 Re: Changing the Primary Key Column