1set enable_seqscan=off;
2CREATE TABLE test_int4 (
3	i int4
4);
5INSERT INTO test_int4 VALUES (-2),(-1),(0),(1),(2),(3);
6CREATE INDEX idx_int4 ON test_int4 USING gin (i);
7SELECT * FROM test_int4 WHERE i<1::int4 ORDER BY i;
8 i
9----
10 -2
11 -1
12  0
13(3 rows)
14
15SELECT * FROM test_int4 WHERE i<=1::int4 ORDER BY i;
16 i
17----
18 -2
19 -1
20  0
21  1
22(4 rows)
23
24SELECT * FROM test_int4 WHERE i=1::int4 ORDER BY i;
25 i
26---
27 1
28(1 row)
29
30SELECT * FROM test_int4 WHERE i>=1::int4 ORDER BY i;
31 i
32---
33 1
34 2
35 3
36(3 rows)
37
38SELECT * FROM test_int4 WHERE i>1::int4 ORDER BY i;
39 i
40---
41 2
42 3
43(2 rows)
44
45