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

« back to all changes in this revision

Viewing changes to contrib/btree_gist/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
-- timestamp check
 
2
 
 
3
CREATE TABLE timestamptmp (a timestamp);
 
4
 
 
5
\copy timestamptmp from 'data/timestamp.data'
 
6
 
 
7
SET enable_seqscan=on;
 
8
 
 
9
SELECT count(*) FROM timestamptmp WHERE a <  '2004-10-26 08:55:08';
 
10
 
 
11
SELECT count(*) FROM timestamptmp WHERE a <= '2004-10-26 08:55:08';
 
12
 
 
13
SELECT count(*) FROM timestamptmp WHERE a  = '2004-10-26 08:55:08';
 
14
 
 
15
SELECT count(*) FROM timestamptmp WHERE a >= '2004-10-26 08:55:08';
 
16
 
 
17
SELECT count(*) FROM timestamptmp WHERE a >  '2004-10-26 08:55:08';
 
18
 
 
19
CREATE INDEX timestampidx ON timestamptmp USING gist ( a );
 
20
 
 
21
SET enable_seqscan=off;
 
22
 
 
23
SELECT count(*) FROM timestamptmp WHERE a <  '2004-10-26 08:55:08'::timestamp;
 
24
 
 
25
SELECT count(*) FROM timestamptmp WHERE a <= '2004-10-26 08:55:08'::timestamp;
 
26
 
 
27
SELECT count(*) FROM timestamptmp WHERE a  = '2004-10-26 08:55:08'::timestamp;
 
28
 
 
29
SELECT count(*) FROM timestamptmp WHERE a >= '2004-10-26 08:55:08'::timestamp;
 
30
 
 
31
SELECT count(*) FROM timestamptmp WHERE a >  '2004-10-26 08:55:08'::timestamp;
 
32