Re: NOT NULL NOT ENFORCED

Поиск
Список
Период
Сортировка
От Álvaro Herrera
Тема Re: NOT NULL NOT ENFORCED
Дата
Msg-id 202509051923.n4xc5vthqyhu@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: NOT NULL NOT ENFORCED  (Álvaro Herrera <alvherre@kurilemu.de>)
Список pgsql-hackers
On 2025-Sep-04, Álvaro Herrera wrote:

> On 2025-Sep-04, jian he wrote:

> > +        else if (notenforced)
> > +        {
> > +            /*
> > +             * We can't use ATExecSetNotNull here because it adds an enforced
> > +             * not-null constraint, but here we only want a non-enforced one.
> > +            */
> 
> Umm, wouldn't it make more sense to modify ATExecSetNotNull() so that it
> does what we want?  This seems hackish.

BTW while you're at that, it might make sense to allow commands like
  ALTER TABLE foo ALTER col1 SET NOT NULL NOT VALID
  ALTER TABLE foo ALTER col1 SET NOT NULL NOT ENFORCED

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"La verdad no siempre es bonita, pero el hambre de ella sí"



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