truth table missing values

Поиск
Список
Период
Сортировка
От Dennis Björklund
Тема truth table missing values
Дата
Msg-id Pine.LNX.4.44.0308041258110.26410-100000@zigo.dhs.org
обсуждение исходный текст
Ответы Re: truth table missing values  (Peter Eisentraut <peter_e@gmx.net>)
Re: truth table missing values  ("scott.marlowe" <scott.marlowe@ihs.com>)
Список pgsql-docs
The truth table in

http://www.postgresql.org/docs/7.3/static/functions.html#FUNCTIONS-LOGICAL

is missing some rows. The meaning is clear if you know that AND and OR is
commutative but that is not written there either.

The reason I found this at all is because in mysql AND is not commutative.
In other words, in mysql

  SELECT (NULL AND FALSE);

is not the same as

  SELECT (FALSE AND NULL);

The reason stated in
http://www.mysql.com/documentation/mysql/bychapter/manual_Introduction.html#Differences_from_ANSI

is

"NULL AND FALSE will evaluate to NULL and not to FALSE. This is because we
don't think it's good to have to evaluate a lot of extra conditions in
this case."

I tried to look in the devel doc to see if it was the same there, but the
devel part of the site is gone at the moment it seems like. It might be a
good idea to add all combinations just to make it clear for people comming
from mysql (not me, I just stumbled over it by mistake).

--
/Dennis


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

Предыдущее
От: Ian Barwick
Дата:
Сообщение: Re: Mysql -> Postgresql pitfalls
Следующее
От: Stephen Frost
Дата:
Сообщение: Incorrect REVOKE command in docs