3 CREATE TABLE datetmp (a date);
5 \copy datetmp from 'data/date.data'
9 SELECT count(*) FROM datetmp WHERE a < '2001-02-13';
11 SELECT count(*) FROM datetmp WHERE a <= '2001-02-13';
13 SELECT count(*) FROM datetmp WHERE a = '2001-02-13';
15 SELECT count(*) FROM datetmp WHERE a >= '2001-02-13';
17 SELECT count(*) FROM datetmp WHERE a > '2001-02-13';
19 CREATE INDEX dateidx ON datetmp USING gist ( a );
21 SET enable_seqscan=off;
23 SELECT count(*) FROM datetmp WHERE a < '2001-02-13'::date;
25 SELECT count(*) FROM datetmp WHERE a <= '2001-02-13'::date;
27 SELECT count(*) FROM datetmp WHERE a = '2001-02-13'::date;
29 SELECT count(*) FROM datetmp WHERE a >= '2001-02-13'::date;
31 SELECT count(*) FROM datetmp WHERE a > '2001-02-13'::date;