Re: [HACKERS] alter table..drop constraint pkey, left not null un-dropped - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] alter table..drop constraint pkey, left not null un-dropped
Date
Msg-id 28820.1494506683@sss.pgh.pa.us
Whole thread Raw
In response to [HACKERS] alter table..drop constraint pkey, left not null un-dropped  (Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>)
List pgsql-hackers
Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com> writes:
> I have created a table with primary key, and then dropped primary key from
> table. But table still have not null constraint added by primary key.

> Is there any other statement to delete primary key with not null?
> or this is an expected behaviour of pg?

Yes, it's expected.  You can use "alter table t alter column c drop not
null" if you don't want the not-null constraint anymore.
        regards, tom lane



pgsql-hackers by date:

Previous
From: tushar
Date:
Subject: [HACKERS] If subscription to foreign table valid ?
Next
From: Jeevan Ladhe
Date:
Subject: Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling.