1 set enable_seqscan=off;
2 CREATE TABLE test_varchar (
5 INSERT INTO test_varchar VALUES ('aaa'),('a'),('abc'),('abb'),('axy'),('xyz');
6 CREATE INDEX idx_varchar ON test_varchar USING gin (i);
7 SELECT * FROM test_varchar WHERE i<'abc'::varchar ORDER BY i;
15 SELECT * FROM test_varchar WHERE i<='abc'::varchar ORDER BY i;
24 SELECT * FROM test_varchar WHERE i='abc'::varchar ORDER BY i;
30 SELECT * FROM test_varchar WHERE i>='abc'::varchar ORDER BY i;
38 SELECT * FROM test_varchar WHERE i>'abc'::varchar ORDER BY i;