Re: [HACKERS] check contraints incorrectly reject "null"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] check contraints incorrectly reject "null"
Дата
Msg-id 10053.944786176@sss.pgh.pa.us
обсуждение исходный текст
Ответ на check contraints incorrectly reject "null"  (Don Baccus <dhogaza@pacifier.com>)
Список pgsql-hackers
Don Baccus <dhogaza@pacifier.com> writes:
> According to Date, a check contraint should fail if the expression
> evaluates to false.

And SQL92 says:
        A table check constraint is satisfied if and only if the specified        <search condition> is not false for
anyrow of a table.                              ^^^^^^^^^
 

so they agree: a constraint that yields NULL should be considered
to pass.  A tad nonintuitive, but who am I to argue...

I have fixed several bugs recently having to do with incorrect
evaluation of three-state boolean logic.  I'll take care of this one.
        regards, tom lane


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

Предыдущее
От: wieck@debis.com (Jan Wieck)
Дата:
Сообщение: Re: [HACKERS] Weired FK problem
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY andshift/reduce)