Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 9 of 9 total
Thread Incorrect boolean truth value
Thu, Mar 22 2007 6:24 AMPermanent Link

"Ole Willy Tuv"
select
 (true and true) true_and_true,
 (true and false) true_and_false,
 (true and cast(null as boolean)) true_and_unknown,
 (false and true) false_and_true,
 (false and false) false_and_false,
 (false and cast(null as boolean)) false_and_unknown,
 (cast(null as boolean) and true) unknown_and_true,
 (cast(null as boolean) and false) unknown_and_false,
 (cast(null as boolean) and cast(null as boolean)) unknown_and_unknown
from dummy

The expression (cast(null as boolean) and false) returns boolean null
(Unknown), which is incorrect. The correct value is False.

Here's the "Truth table for the AND boolean operator":

AND           True            False     Unknown
---------------------------------------------
True             True            False     Unknown
False            False           False     False
Unknown     Unknown     False     Unknown
---------------------------------------------

Ole Willy Tuv

Thu, Mar 22 2007 10:06 AMPermanent Link

"Ole Willy Tuv"
There's a similar issue with the OR operator:

select
 (true or true) true_or_true,
 (true or false) true_or_false,
 (true or cast(null as boolean)) true_or_unknown,
 (false or true) false_or_true,
 (false or false) false_or_false,
 (false or cast(null as boolean)) false_or_unknown,
 (cast(null as boolean) or true) unknown_or_true,
 (cast(null as boolean) or false) unknown_or_false,
 (cast(null as boolean) or cast(null as boolean)) unknown_or_unknown
from dummy

The expression (cast(null as boolean) or true) returns null (Unknown), while
the correct value is True.

Here's the "Truth table for the OR boolean operator":

OR              True     False           Unknown
---------------------------------------------
True             True     True            True
False            True     False           Unknown
Unknown     True     Unknown     Unknown
---------------------------------------------

Ole Willy Tuv

Thu, Mar 22 2007 5:40 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ole,

This was fixed 2 weeks ago, but is still waiting for build 2.

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Mar 22 2007 6:29 PMPermanent Link

"Ole Willy Tuv"
Tim,

<< This was fixed 2 weeks ago, but is still waiting for build 2. >>

Great. I think I need the new build before doing any further testing of EDB
Smile

Ole Willy Tuv

Thu, Mar 22 2007 7:19 PMPermanent Link

"Ole Willy Tuv"
Tim,

<< Great. I think I need the new build before doing any further testing of
EDB Smile>>

Btw, the expression:

cast(null as boolean)

is a workaround for the missing UNKNOWN boolean literal in EDB SQL (TRUE and
FALSE are supported).

This is a minor issue, of course. I just made the comment for users getting
familiar with the three-valued boolean logic.

Ole Willy Tuv

Fri, Mar 23 2007 7:14 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ole,

<< Great. I think I need the new build before doing any further testing of
EDB Smile>>

Well, if someone (not naming names) would stop posting so many bug reports,
then perhaps I could get the new build done. Wink

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Mar 23 2007 7:56 PMPermanent Link

"Ole Willy Tuv"
Tim,

<< Well, if someone (not naming names) would stop posting so many bug
reports, then perhaps I could get the new build done. Wink>>

I think I'll have a break Smiley

Ole Willy Tuv

Sat, Mar 24 2007 3:09 AMPermanent Link

Charalabos Michael
Hello Tim,

> << Great. I think I need the new build before doing any further testing of
> EDB Smile>>
>
> Well, if someone (not naming names) would stop posting so many bug reports,
> then perhaps I could get the new build done. Wink

Mayday! Mayday! Tim is on fire! Mayday! Mayday! <vbg>

--
Charalabos Michael - [Creation Power] - http://www.creationpower.gr
Sat, Mar 24 2007 3:12 AMPermanent Link

Charalabos Michael
Hello Ole,

> I think I'll have a break Smiley

Please!! Do ... even though Tim sent me the fix for the DBISAM
migration issue i'm still waiting for the next build to start
migrating my dbisam project and play with EDB ... Smiley

--
Charalabos Michael - [Creation Power] - http://www.creationpower.gr
Image