pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
truth table missing values
3+ messages / 3 participants
[nested] [flat]

* truth table missing values
@ 2003-08-04 11:11  Dennis Björklund <db@zigo.dhs.org>
  0 siblings, 2 replies; 3+ messages in thread

From: Dennis Björklund @ 2003-08-04 11:11 UTC (permalink / raw)
  To: 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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: truth table missing values
@ 2003-08-04 14:00  Peter Eisentraut <peter_e@gmx.net>
  parent: Dennis Björklund <db@zigo.dhs.org>
  1 sibling, 0 replies; 3+ messages in thread

From: Peter Eisentraut @ 2003-08-04 14:00 UTC (permalink / raw)
  To: Dennis Björklund <db@zigo.dhs.org>; +Cc: pgsql-docs

Dennis Björklund writes:

> 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.

I've added a note that they are commutative.

-- 
Peter Eisentraut   peter_e@gmx.net



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: truth table missing values
@ 2003-08-04 16:05  scott.marlowe <scott.marlowe@ihs.com>
  parent: Dennis Björklund <db@zigo.dhs.org>
  1 sibling, 0 replies; 3+ messages in thread

From: scott.marlowe @ 2003-08-04 16:05 UTC (permalink / raw)
  To: Dennis Björklund <db@zigo.dhs.org>; +Cc: pgsql-docs

On Mon, 4 Aug 2003, Dennis Björklund wrote:

> 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."

<sarcasm>
wow, with a development philosophy like that it's amazing mysql isn't 
running in banks everywhere.
</sarcasm>




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2003-08-04 16:05 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-08-04 11:11 truth table missing values Dennis Björklund <db@zigo.dhs.org>
2003-08-04 14:00 ` Peter Eisentraut <peter_e@gmx.net>
2003-08-04 16:05 ` scott.marlowe <scott.marlowe@ihs.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox