diff options
| author | Teodor Sigaev | 2004-05-28 10:43:32 +0000 |
|---|---|---|
| committer | Teodor Sigaev | 2004-05-28 10:43:32 +0000 |
| commit | 42d069886f38687839388c615af608706508b557 (patch) | |
| tree | 0409615407a17d22e2511ac14745277467853453 /contrib/btree_gist/sql/timestamp.sql | |
| parent | 1a321f26d88e5c64bccba9d36920aede1e201729 (diff) | |
New version. Add support for int2, int8, float4, float8, timestamp with/without time zone, time with/without time zone, date, interval, oid, money and macaddr, char, varchar/text, bytea, numeric, bit, varbit, inet/cidr types for GiST
Diffstat (limited to 'contrib/btree_gist/sql/timestamp.sql')
| -rw-r--r-- | contrib/btree_gist/sql/timestamp.sql | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/contrib/btree_gist/sql/timestamp.sql b/contrib/btree_gist/sql/timestamp.sql new file mode 100644 index 00000000000..5b04e3e2d2b --- /dev/null +++ b/contrib/btree_gist/sql/timestamp.sql @@ -0,0 +1,32 @@ +-- timestamp check + +CREATE TABLE timestamptmp (a timestamp); + +\copy timestamptmp from 'data/timestamp.data' + +SET enable_seqscan=on; + +SELECT count(*) FROM timestamptmp WHERE a < '2004-10-26 08:55:08'; + +SELECT count(*) FROM timestamptmp WHERE a <= '2004-10-26 08:55:08'; + +SELECT count(*) FROM timestamptmp WHERE a = '2004-10-26 08:55:08'; + +SELECT count(*) FROM timestamptmp WHERE a >= '2004-10-26 08:55:08'; + +SELECT count(*) FROM timestamptmp WHERE a > '2004-10-26 08:55:08'; + +CREATE INDEX timestampidx ON timestamptmp USING gist ( a ); + +SET enable_seqscan=off; + +SELECT count(*) FROM timestamptmp WHERE a < '2004-10-26 08:55:08'::timestamp; + +SELECT count(*) FROM timestamptmp WHERE a <= '2004-10-26 08:55:08'::timestamp; + +SELECT count(*) FROM timestamptmp WHERE a = '2004-10-26 08:55:08'::timestamp; + +SELECT count(*) FROM timestamptmp WHERE a >= '2004-10-26 08:55:08'::timestamp; + +SELECT count(*) FROM timestamptmp WHERE a > '2004-10-26 08:55:08'::timestamp; + |
