Documentation clairification?, CHECK constraints

Поиск
Список
Период
Сортировка
От Karl O. Pinc
Тема Documentation clairification?, CHECK constraints
Дата
Msg-id 20040331101908.A1749@mofo.meme.com
обсуждение исходный текст
Ответы Re: Documentation clairification?, CHECK constraints  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Re: http://www.postgresql.org/docs/7.4/static/sql-createtable.html
"The CHECK clause specifies an expression producing a Boolean result
which new or updated rows must satisfy for an insert or update
operation to succeed."

But SQL has 3 valued logic (strictly speaking, not boolean).  It
seems that the CHECK clases fail only when the expression result
is FALSE, and pass when the result is either TRUE or UNKNOWN.

Yes?  Should this be clarified in the documentation?

Somewhere along the line IIRC the rule that UNKNOWN always causes
the code inside the THEN conditional to be skipped, so explicit tests
for NULL are often needed as a 'special case'.  Not that this has much
to do with CHECK clauses, but I don't see the conditionals page
for plpgsql saying anything about UNKNOWN values.

Maybe the section to describe how conditionals treat UNKNOWN is 9.1,
conditional operators?

Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                  -- Robert A. Heinlein

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

Предыдущее
От: Nick Barr
Дата:
Сообщение: Re: select statement sorting
Следующее
От: Julian North
Дата:
Сообщение: Re: select statement sorting