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

Re: Changing the Primary Key Column

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pdxpug(at)postgresql(dot)org
Subject: Re: Changing the Primary Key Column
Date: 2011-02-24 15:51:50
Message-ID: alpine.LNX.2.00.1102240748360.4006@salmo.appl-ecosys.com (view raw or flat)
Thread:
Lists: pdxpug
On Thu, 24 Feb 2011, Brian Kurle wrote:

> # alter table water_well alter column sequence_no drop not null;

Brian,

nevada=# alter table water_well alter column sequence_no drop not null;
ERROR:  column "sequence_no" is in a primary key

> http://www.java2s.com/Code/PostgreSQL/Constraints/ALTERTABLEemployeeALTERCOLUMNidDROPNOTNULL.htm

   The example above does not have the id column as primary key or any other
constraint.

Rich

In response to

Responses

pdxpug by date

Next:From: Brian KurleDate: 2011-02-24 15:56:33
Subject: Re: Changing the Primary Key Column
Previous:From: Brent DombrowskiDate: 2011-02-24 15:21:27
Subject: Re: Changing the Primary Key Column

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