> Investigating your patch I found that all arguments of logical AND/OR and
> CASE are always evaluated. Seems, it should not be for pair of reasons:
>
> [...]
>
> SQL doesn't evaluate unneeded arguments:
Here is a version with some lazy evaluation for and, or & case.
--
Fabien.