Skip site navigation (1) Skip section navigation (2)

Re: Changing the Primary Key Column

From: Michael Ewan <michael(dot)ewan(at)intel(dot)com>
To: pdxpug(at)postgresql(dot)org
Subject: Re: Changing the Primary Key Column
Date: 2011-02-24 01:11:40
Message-ID: 4D65B04C.3040904@intel.com (view raw or flat)
Thread:
Lists: pdxpug

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

In response to

Responses

pdxpug by date

Next:From: Randal L. SchwartzDate: 2011-02-24 01:11:59
Subject: Re: Changing the Primary Key Column
Previous:From: Rich ShepardDate: 2011-02-24 01:09:29
Subject: Re: Changing the Primary Key Column

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group