postgresql/contrib/btree_gist/expected/interval.out

67 lines
1.2 KiB
Plaintext
Raw Normal View History

-- interval check
CREATE TABLE intervaltmp (a interval);
\copy intervaltmp from 'data/interval.data'
SET enable_seqscan=on;
SELECT count(*) FROM intervaltmp WHERE a < '199 days 21:21:23';
count
-------
329
(1 row)
SELECT count(*) FROM intervaltmp WHERE a <= '199 days 21:21:23';
count
-------
330
(1 row)
SELECT count(*) FROM intervaltmp WHERE a = '199 days 21:21:23';
count
-------
1
(1 row)
SELECT count(*) FROM intervaltmp WHERE a >= '199 days 21:21:23';
count
-------
271
(1 row)
SELECT count(*) FROM intervaltmp WHERE a > '199 days 21:21:23';
count
-------
270
(1 row)
CREATE INDEX intervalidx ON intervaltmp USING gist ( a );
SET enable_seqscan=off;
SELECT count(*) FROM intervaltmp WHERE a < '199 days 21:21:23'::interval;
count
-------
329
(1 row)
SELECT count(*) FROM intervaltmp WHERE a <= '199 days 21:21:23'::interval;
count
-------
330
(1 row)
SELECT count(*) FROM intervaltmp WHERE a = '199 days 21:21:23'::interval;
count
-------
1
(1 row)
SELECT count(*) FROM intervaltmp WHERE a >= '199 days 21:21:23'::interval;
count
-------
271
(1 row)
SELECT count(*) FROM intervaltmp WHERE a > '199 days 21:21:23'::interval;
count
-------
270
(1 row)