2009-03-26 07:20:01 +08:00
|
|
|
set enable_seqscan=off;
|
|
|
|
|
|
|
|
CREATE TABLE test_timetz (
|
|
|
|
i timetz
|
|
|
|
);
|
|
|
|
|
2010-11-24 04:27:50 +08:00
|
|
|
INSERT INTO test_timetz VALUES
|
2009-03-26 07:20:01 +08:00
|
|
|
( '03:55:08 GMT+2' ),
|
|
|
|
( '04:55:08 GMT+2' ),
|
|
|
|
( '05:55:08 GMT+2' ),
|
|
|
|
( '08:55:08 GMT+2' ),
|
|
|
|
( '09:55:08 GMT+2' ),
|
|
|
|
( '10:55:08 GMT+2' )
|
|
|
|
;
|
|
|
|
|
|
|
|
CREATE INDEX idx_timetz ON test_timetz USING gin (i);
|
|
|
|
|
|
|
|
SELECT * FROM test_timetz WHERE i<'08:55:08 GMT+2'::timetz ORDER BY i;
|
|
|
|
SELECT * FROM test_timetz WHERE i<='08:55:08 GMT+2'::timetz ORDER BY i;
|
|
|
|
SELECT * FROM test_timetz WHERE i='08:55:08 GMT+2'::timetz ORDER BY i;
|
|
|
|
SELECT * FROM test_timetz WHERE i>='08:55:08 GMT+2'::timetz ORDER BY i;
|
|
|
|
SELECT * FROM test_timetz WHERE i>'08:55:08 GMT+2'::timetz ORDER BY i;
|