pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Richard Guo <guofenglinux@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: ERROR: no NOT NULL constraint found to drop
Date: Mon, 10 Apr 2023 16:55:28 +0900
Message-ID: <ZDPA8BJ4YgZymdoY@paquier.xyz> (raw)
In-Reply-To: <CAMbWs48astPDb3K+L89wb8Yju0jM_Czm8svmU=Uzd+WM61Cr6Q@mail.gmail.com>
References: <CAMbWs48astPDb3K+L89wb8Yju0jM_Czm8svmU=Uzd+WM61Cr6Q@mail.gmail.com>

On Mon, Apr 10, 2023 at 03:16:06PM +0800, Richard Guo wrote:
> 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 for the report.  This is not the only issue that has been
pointed out with this patch, so it is going to be reverted if you look
around here:
https://www.postgresql.org/message-id/3863449.1681071102@sss.pgh.pa.us
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (4+ messages)  latest in thread

Message-ID: <ZDPA8BJ4YgZymdoY@paquier.xyz>
Permalink:  ../ZDPA8BJ4YgZymdoY@paquier.xyz/
Also on:    postgresql.org/message-id/ZDPA8BJ4YgZymdoY@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, guofenglinux@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: ERROR: no NOT NULL constraint found to drop
  In-Reply-To: <ZDPA8BJ4YgZymdoY@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox