From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | Michael Ewan <michael(dot)ewan(at)intel(dot)com> |
Cc: | pdxpug(at)postgresql(dot)org |
Subject: | Re: Changing the Primary Key Column |
Date: | 2011-02-24 01:13:23 |
Message-ID: | 1298510003.14800.156.camel@jd-desktop |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pdxpug |
On Wed, 2011-02-23 at 17:11 -0800, Michael Ewan wrote:
>
> On 02/23/2011 05:09 PM, Rich Shepard wrote:
> > On Wed, 23 Feb 2011, Joshua D. Drake wrote:
> >
> >> alter table drop constraint
> >> alter table drop column
> >> alter table add primary key
> >>
> >> done
> >
> > Thanks, Josh.
> >
> > When I do this and follow with '\d water_well' I still see the first
> > column (sequence_no) with the not null constraint. Wonder why that didn't
> > drop when I specified the column name in the drop column command.
>
> Did you COMMIT; ?
He would still see the change if it actually executed, even in a
transaction because of the isolation. Now if he disconnected and
reconnected or is looking at it in another terminal/session, it wouldn't
see it.
JD
>
--
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:15:07 | Re: Changing the Primary Key Column |
Previous Message | Randal L. Schwartz | 2011-02-24 01:12:44 | Re: Changing the Primary Key Column |