In SQL (specifically Postgres):
The clause where not foo='bar'
in case foo
is null evaluates into some sort of null
, causing the row is not included in the result.
On the other hand, the clause where (foo='bar') is not true
where foo
is null evaluates into true
(the row is included in the result).
So is the use of (foo='bar') is not true
equivalent to foo is null or not foo='bar'
?
It doesn't seem that people are using this pattern for some reason, am I missing something?