~ubuntu-branches/ubuntu/hardy/postgresql-8.4/hardy-backports

« back to all changes in this revision

Viewing changes to contrib/btree_gin/sql/timestamp.sql

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-03-20 12:00:13 UTC
  • Revision ID: james.westby@ubuntu.com-20090320120013-hogj7egc5mjncc5g
Tags: upstream-8.4~0cvs20090328
ImportĀ upstreamĀ versionĀ 8.4~0cvs20090328

Show diffs side-by-side

added added

removed removed

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