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

« back to all changes in this revision

Viewing changes to contrib/btree_gin/expected/date.out

  • 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
CREATE TABLE test_date (
 
3
        i date
 
4
);
 
5
INSERT INTO test_date VALUES 
 
6
        ( '2004-10-23' ),
 
7
        ( '2004-10-24' ),
 
8
        ( '2004-10-25' ),
 
9
        ( '2004-10-26' ),
 
10
        ( '2004-10-27' ),
 
11
        ( '2004-10-28' )
 
12
;
 
13
CREATE INDEX idx_date ON test_date USING gin (i);
 
14
SELECT * FROM test_date WHERE i<'2004-10-26'::date ORDER BY i;
 
15
     i      
 
16
------------
 
17
 10-23-2004
 
18
 10-24-2004
 
19
 10-25-2004
 
20
(3 rows)
 
21
 
 
22
SELECT * FROM test_date WHERE i<='2004-10-26'::date ORDER BY i;
 
23
     i      
 
24
------------
 
25
 10-23-2004
 
26
 10-24-2004
 
27
 10-25-2004
 
28
 10-26-2004
 
29
(4 rows)
 
30
 
 
31
SELECT * FROM test_date WHERE i='2004-10-26'::date ORDER BY i;
 
32
     i      
 
33
------------
 
34
 10-26-2004
 
35
(1 row)
 
36
 
 
37
SELECT * FROM test_date WHERE i>='2004-10-26'::date ORDER BY i;
 
38
     i      
 
39
------------
 
40
 10-26-2004
 
41
 10-27-2004
 
42
 10-28-2004
 
43
(3 rows)
 
44
 
 
45
SELECT * FROM test_date WHERE i>'2004-10-26'::date ORDER BY i;
 
46
     i      
 
47
------------
 
48
 10-27-2004
 
49
 10-28-2004
 
50
(2 rows)
 
51