Re: ERROR: no NOT NULL constraint found to drop

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: ERROR: no NOT NULL constraint found to drop
Дата
Msg-id ZDPA8BJ4YgZymdoY@paquier.xyz
обсуждение исходный текст
Ответ на ERROR: no NOT NULL constraint found to drop  (Richard Guo <guofenglinux@gmail.com>)
Ответы Re: ERROR: no NOT NULL constraint found to drop  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
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

Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Richard Guo
Дата:
Сообщение: ERROR: no NOT NULL constraint found to drop
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ERROR: no NOT NULL constraint found to drop