"Alex" <alex(at)xdcom(dot)org> writes:
> I wish constraint_exclusion to be smarter with bool conversion so that
> 'select * from foo where (mask&5)::bool' can be faster;
Don't hold your breath. It's tough enough deriving conclusions from
ordinary btree-indexable comparison operators.
regards, tom lane