Re: Re: Re: BUG #19351: in pg18.1,when not null exists in the table , and add constraint problem.

Поиск
Список
Период
Сортировка
От Álvaro Herrera
Тема Re: Re: Re: BUG #19351: in pg18.1,when not null exists in the table , and add constraint problem.
Дата
Msg-id 202512130812.375tew7hjksb@alvherre.pgsql
обсуждение исходный текст
Ответ на Re:Re: Re: BUG #19351: in pg18.1,when not null exists in the table , and add constraint problem.  ("yanliang lei" <msdnchina@163.com>)
Ответы Re: Re: Re: BUG #19351: in pg18.1,when not null exists in the table , and add constraint problem.
Список pgsql-bugs
On 2025-Dec-13, yanliang lei wrote:

> Step 2: The execution of 'alter table test_null_20251210 add constraint xyzxyz not null c1' did not return any
errors.
> 
> after the execution of Step 2 , the executing user of the SQL
> statement "alter table test_null_20251210 add constraint xyzxyz not
> null c1" in the Step 2 will assume (because there was no error prompt
> in the  Step 2   ) that the not null constraint has been successfully
> added to column c1, and the name of the constraint is xyzxyz.

>  ----However, in reality, based on the execution results of the SQL
>  database, the Step 2 did not actually succeed.

Yeah, that's fair -- we discussed this kind of behavior during
development and I was unsure about being strict about it, so avoided it.

This is mostly straightforward to fix, as attached (though the error
message needs work), but I hit a snag with multiple inheritance -- if
you apply this patch, you'll see failures in the pg_dump and pg_upgrade
tests.  I don't have any ideas to fix this right now, but I'll keep
thinking about it.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"La experiencia nos dice que el hombre peló millones de veces las patatas,
pero era forzoso admitir la posibilidad de que en un caso entre millones,
las patatas pelarían al hombre" (Ijon Tichy)

Вложения

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