From: | "Joshua D(dot) Drake" <jd(at)commandprompt(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 01:01:57 |
Message-ID: | 1298509317.14800.153.camel@jd-desktop |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pdxpug |
On Wed, 2011-02-23 at 16:43 -0800, Rich Shepard wrote:
> On Wed, 23 Feb 2011, Joshua D. Drake wrote:
>
> > Uhh, no. You drop the constraint and re-add it for the second column.
>
> Josh,
>
> And if I do this, I can follow that with dropping the first column which
> no longer has any constraints? This would be the simplest and quickest
> solution.
alter table drop constraint
alter table drop column
alter table add primary key
done
>
> 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
>
--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering
http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt
From | Date | Subject | |
---|---|---|---|
Next Message | Rich Shepard | 2011-02-24 01:09:29 | Re: Changing the Primary Key Column |
Previous Message | Rich Shepard | 2011-02-24 00:43:20 | Re: Changing the Primary Key Column |