Re: Optimizer & boolean syntax - Mailing list pgsql-hackers

From Daniele Orlandi
Subject Re: Optimizer & boolean syntax
Date
Msg-id 3DE04712.8070304@orlandi.com
Whole thread Raw
In response to Re: Optimizer & boolean syntax  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-hackers
Tom Lane wrote:
> 
> Only two of them are logically equivalent.  Consider NULL.

Ohhh IS NOT TRUE or IS NOT FALSE also match NULL, I never knew this :)

> Even for the first two, assuming equivalence requires hard-wiring an
> assumption about the behavior of the "bool = bool" operator; which is
> a user-redefinable operator.>  I'm not totally comfortable with the idea.

Ok, I see your point and the problems that may arise, but I hope wou 
will agree with me that from the point of view of the user, both clauses 
have the same meaning and the index usage should be consistant with it.

Unfortunatelly I don't know very well PostgreSQL internals, so I may be 
saying a load of bullshits, but wouldn't be possible to consider any 
evaluation of a bool expression in the form of bool=bool with true as 
the second 'bool'[1] ? At least as a TODO item ?


Thanks!
Bye!

[1] Eventually including the "var IS TRUE" and "var IS FALSE" (not var 
IS NOT ...) which already are special syntax cases if I am not wrong.

--  Daniele Orlandi Planet Srl



pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Help with ADD COLUMN
Next
From: Masaru Sugawara
Date:
Subject: Re: quote_ident and schemas (was Re: connectby with schema)