Re: Check constraints do not seem to be working!!!

Поиск
Список
Период
Сортировка
От Nikolay Samokhvalov
Тема Re: Check constraints do not seem to be working!!!
Дата
Msg-id CANNMO+L_8KePx6Svj2kFOd1RHnWZTMy7_-KXq+sJDHLM8gPinw@mail.gmail.com
обсуждение исходный текст
Ответ на Check constraints do not seem to be working!!!  (Jitendra Loyal <jitendra.loyal@gmail.com>)
Ответы Re: Check constraints do not seem to be working!!!  (Jitendra Loyal <jitendra.loyal@gmail.com>)
Список pgsql-general
On Wed, Nov 11, 2020 at 12:26 AM Jitendra Loyal <jitendra.loyal@gmail.com> wrote:
Despite the above two constraints, the following rows get into the table:
     insert into t (b , c) values (null, true), (null, false);  


> It should be noted that a check constraint is satisfied if the check expression evaluates to true or the null value. Since most expressions will evaluate to the null value if any operand is null, they will not prevent null values in the constrained columns. To ensure that a column does not contain null values, the not-null constraint described in the next section can be used.

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Check constraints do not seem to be working!!!
Следующее
От: Jitendra Loyal
Дата:
Сообщение: Re: Check constraints do not seem to be working!!!