postgresql/contrib/btree_gist/expected/timestamptz.out
Teodor Sigaev ef770cbb69 Fixes from Janko Richter <jankorichter@yahoo.de>
- Fix wrong index results on text, char, varchar for multibyte strings
- Fix some SIGFPE signals
- Add support for infinite timestamps
- Because of locale settings, btree_gist can not be a prefix index anymore (for text).
  Each node holds now just the lower and upper boundary.
2005-07-01 13:44:56 +00:00

187 lines
3.6 KiB
Plaintext

-- timestamptz check
CREATE TABLE timestamptztmp (a timestamptz);
\copy timestamptztmp from 'data/timestamptz.data'
SET enable_seqscan=on;
SELECT count(*) FROM timestamptztmp WHERE a < '2018-12-18 10:59:54 GMT+3';
count
-------
391
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a <= '2018-12-18 10:59:54 GMT+3';
count
-------
392
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a = '2018-12-18 10:59:54 GMT+3';
count
-------
1
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a >= '2018-12-18 10:59:54 GMT+3';
count
-------
158
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a > '2018-12-18 10:59:54 GMT+3';
count
-------
157
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a < '2018-12-18 10:59:54 GMT+2';
count
-------
391
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a <= '2018-12-18 10:59:54 GMT+2';
count
-------
391
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a = '2018-12-18 10:59:54 GMT+2';
count
-------
0
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a >= '2018-12-18 10:59:54 GMT+2';
count
-------
158
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a > '2018-12-18 10:59:54 GMT+2';
count
-------
158
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a < '2018-12-18 10:59:54 GMT+4';
count
-------
392
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a <= '2018-12-18 10:59:54 GMT+4';
count
-------
392
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a = '2018-12-18 10:59:54 GMT+4';
count
-------
0
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a >= '2018-12-18 10:59:54 GMT+4';
count
-------
157
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a > '2018-12-18 10:59:54 GMT+4';
count
-------
157
(1 row)
CREATE INDEX timestamptzidx ON timestamptztmp USING gist ( a );
SET enable_seqscan=off;
SELECT count(*) FROM timestamptztmp WHERE a < '2018-12-18 10:59:54 GMT+3'::timestamptz;
count
-------
391
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a <= '2018-12-18 10:59:54 GMT+3'::timestamptz;
count
-------
392
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a = '2018-12-18 10:59:54 GMT+3'::timestamptz;
count
-------
1
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a >= '2018-12-18 10:59:54 GMT+3'::timestamptz;
count
-------
158
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a > '2018-12-18 10:59:54 GMT+3'::timestamptz;
count
-------
157
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a < '2018-12-18 10:59:54 GMT+2'::timestamptz;
count
-------
391
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a <= '2018-12-18 10:59:54 GMT+2'::timestamptz;
count
-------
391
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a = '2018-12-18 10:59:54 GMT+2'::timestamptz;
count
-------
0
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a >= '2018-12-18 10:59:54 GMT+2'::timestamptz;
count
-------
158
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a > '2018-12-18 10:59:54 GMT+2'::timestamptz;
count
-------
158
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a < '2018-12-18 10:59:54 GMT+4'::timestamptz;
count
-------
392
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a <= '2018-12-18 10:59:54 GMT+4'::timestamptz;
count
-------
392
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a = '2018-12-18 10:59:54 GMT+4'::timestamptz;
count
-------
0
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a >= '2018-12-18 10:59:54 GMT+4'::timestamptz;
count
-------
157
(1 row)
SELECT count(*) FROM timestamptztmp WHERE a > '2018-12-18 10:59:54 GMT+4'::timestamptz;
count
-------
157
(1 row)