blob: 4ad2d0c191c55125c867400cf5b41d677b042fde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
set enable_seqscan=off;
CREATE TABLE test_varbit (
i varbit
);
INSERT INTO test_varbit VALUES ('001'),('010'),('011'),('100'),('101'),('110');
CREATE INDEX idx_varbit ON test_varbit USING gin (i);
SELECT * FROM test_varbit WHERE i<'100'::varbit ORDER BY i;
SELECT * FROM test_varbit WHERE i<='100'::varbit ORDER BY i;
SELECT * FROM test_varbit WHERE i='100'::varbit ORDER BY i;
SELECT * FROM test_varbit WHERE i>='100'::varbit ORDER BY i;
SELECT * FROM test_varbit WHERE i>'100'::varbit ORDER BY i;
|