Changing the Primary Key Column

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

This, too, is new to me. The first table column is a contrived key that is
no longer needed as a unique row identifier. The second column should
replace the first as the primary key. The ALTER TABLE command can add a
primary key to a column, but I don't see how to remove that constraint from
column1, add it to column2, so I can drop column1.

Pointers, please.

Rich

--
Richard B. Shepard, Ph.D. | The Plain English Science Consultant
Applied Ecosystem Services, Inc. | Helping Ensure Our Clients' Futures
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863

Responses

Browse pdxpug by date

  From Date Subject
Next Message Michael Ewan 2011-02-24 00:06:48 Re: Changing the Primary Key Column
Previous Message Rich Shepard 2011-02-18 17:02:10 timestamp and input format