ERROR: no NOT NULL constraint found to drop - Mailing list pgsql-bugs

From Richard Guo
Subject ERROR: no NOT NULL constraint found to drop
Date
Msg-id CAMbWs48astPDb3K+L89wb8Yju0jM_Czm8svmU=Uzd+WM61Cr6Q@mail.gmail.com
Whole thread Raw
Responses Re: ERROR: no NOT NULL constraint found to drop  (Michael Paquier <michael@paquier.xyz>)
List pgsql-bugs
I run into error $subject with the query below:

# create table t1 (c int primary key null unique);
CREATE TABLE
# create table t2 (like t1);
CREATE TABLE
# alter table t2 alter c drop not null;
ERROR:  no NOT NULL constraint found to drop

This starts since e056c557ae.  I guess this shouldn't happen since the
comment says so.

        /* this shouldn't happen */
        elog(ERROR, "no NOT NULL constraint found to drop");

Thanks
Richard

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Need assistance in performance tuning of a particular query
Next
From: Michael Paquier
Date:
Subject: Re: ERROR: no NOT NULL constraint found to drop