| 1 |
set enable_seqscan=off; |
| 2 |
|
| 3 |
CREATE TABLE test_time ( |
| 4 |
i time |
| 5 |
); |
| 6 |
|
| 7 |
INSERT INTO test_time VALUES |
| 8 |
( '03:55:08' ), |
| 9 |
( '04:55:08' ), |
| 10 |
( '05:55:08' ), |
| 11 |
( '08:55:08' ), |
| 12 |
( '09:55:08' ), |
| 13 |
( '10:55:08' ) |
| 14 |
; |
| 15 |
|
| 16 |
CREATE INDEX idx_time ON test_time USING gin (i); |
| 17 |
|
| 18 |
SELECT * FROM test_time WHERE i<'08:55:08'::time ORDER BY i; |
| 19 |
SELECT * FROM test_time WHERE i<='08:55:08'::time ORDER BY i; |
| 20 |
SELECT * FROM test_time WHERE i='08:55:08'::time ORDER BY i; |
| 21 |
SELECT * FROM test_time WHERE i>='08:55:08'::time ORDER BY i; |
| 22 |
SELECT * FROM test_time WHERE i>'08:55:08'::time ORDER BY i; |