1 set enable_seqscan=off;
2 CREATE TABLE test_bit (
5 INSERT INTO test_bit VALUES ('001'),('010'),('011'),('100'),('101'),('110');
6 CREATE INDEX idx_bit ON test_bit USING gin (i);
7 SELECT * FROM test_bit WHERE i<'100'::bit(3) ORDER BY i;
15 SELECT * FROM test_bit WHERE i<='100'::bit(3) ORDER BY i;
24 SELECT * FROM test_bit WHERE i='100'::bit(3) ORDER BY i;
30 SELECT * FROM test_bit WHERE i>='100'::bit(3) ORDER BY i;
38 SELECT * FROM test_bit WHERE i>'100'::bit(3) ORDER BY i;