summaryrefslogtreecommitdiff
path: root/contrib/btree_gin/expected/float8.out
blob: b2877dfa3c1c26beae830db2dd7ff15c7ba3d160 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
set enable_seqscan=off;
CREATE TABLE test_float8 (
	i float8
);
INSERT INTO test_float8 VALUES (-2),(-1),(0),(1),(2),(3);
CREATE INDEX idx_float8 ON test_float8 USING gin (i);
SELECT * FROM test_float8 WHERE i<1::float8 ORDER BY i;
 i  
----
 -2
 -1
  0
(3 rows)

SELECT * FROM test_float8 WHERE i<=1::float8 ORDER BY i;
 i  
----
 -2
 -1
  0
  1
(4 rows)

SELECT * FROM test_float8 WHERE i=1::float8 ORDER BY i;
 i 
---
 1
(1 row)

SELECT * FROM test_float8 WHERE i>=1::float8 ORDER BY i;
 i 
---
 1
 2
 3
(3 rows)

SELECT * FROM test_float8 WHERE i>1::float8 ORDER BY i;
 i 
---
 2
 3
(2 rows)

explain (costs off)
SELECT * FROM test_float8 WHERE i<1::float4 ORDER BY i;
                 QUERY PLAN                  
---------------------------------------------
 Sort
   Sort Key: i
   ->  Bitmap Heap Scan on test_float8
         Recheck Cond: (i < '1'::real)
         ->  Bitmap Index Scan on idx_float8
               Index Cond: (i < '1'::real)
(6 rows)

SELECT * FROM test_float8 WHERE i<1::float4 ORDER BY i;
 i  
----
 -2
 -1
  0
(3 rows)

SELECT * FROM test_float8 WHERE i<=1::float4 ORDER BY i;
 i  
----
 -2
 -1
  0
  1
(4 rows)

SELECT * FROM test_float8 WHERE i=1::float4 ORDER BY i;
 i 
---
 1
(1 row)

SELECT * FROM test_float8 WHERE i>=1::float4 ORDER BY i;
 i 
---
 1
 2
 3
(3 rows)

SELECT * FROM test_float8 WHERE i>1::float4 ORDER BY i;
 i 
---
 2
 3
(2 rows)