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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pdxpug by date

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