There is no rocket science here: # create table x (v bool); # create index i on x using bloom ((v::int4)); # set enable_seqscan=off; --because of empty table # explain select * from x where v::int4 = 1; QUERY PLAN ------------------------------------------------------------------ Bitmap Heap Scan on x (cost=25.08..35.67 rows=14 width=1) Recheck Cond: ((v)::integer = 1) -> Bitmap Index Scan on i (cost=0.00..25.07 rows=14 width=0) Index Cond: ((v)::integer = 1)
Or cast it to "char" type (with quoting!)
At that point you should just forget bool exists and define the columns as int4.
I'll give you points for making it work but its not a solution I'd be proud to offer up.