mirror of
https://github.com/postgres/postgres.git
synced 2025-08-11 04:22:52 +03:00
config
contrib
adddepend
array
btree_gist
data
expected
bit.out
bytea.out
cash.out
char.out
cidr.out
date.out
float4.out
float8.out
inet.out
init.out
int2.out
int4.out
int8.out
interval.out
macaddr.out
numeric.out
oid.out
text.out
time.out
timestamp.out
timestamptz.out
timetz.out
varbit.out
varchar.out
sql
Makefile
README.btree_gist
btree_bit.c
btree_bytea.c
btree_cash.c
btree_date.c
btree_float4.c
btree_float8.c
btree_gist.c
btree_gist.h
btree_gist.sql.in
btree_inet.c
btree_int2.c
btree_int4.c
btree_int8.c
btree_interval.c
btree_macaddr.c
btree_numeric.c
btree_oid.c
btree_text.c
btree_time.c
btree_ts.c
btree_utils_num.c
btree_utils_num.h
btree_utils_var.c
btree_utils_var.h
chkpass
cube
dbase
dblink
dbmirror
dbsize
earthdistance
findoidjoins
fulltextindex
fuzzystrmatch
intagg
intarray
ipc_check
isbn_issn
lo
ltree
mSQL-interface
mac
miscutil
mysql
noupdate
oid2name
oracle
pg_autovacuum
pg_dumplo
pg_logger
pg_trgm
pg_upgrade
pgbench
pgcrypto
pgstattuple
reindexdb
rserv
rtree_gist
seg
spi
start-scripts
string
tablefunc
tips
tools
tsearch
tsearch2
userlock
vacuumlo
xml
xml2
Makefile
README
contrib-global.mk
doc
src
COPYRIGHT
GNUmakefile.in
Makefile
README
README.CVS
aclocal.m4
configure
configure.in
67 lines
1.2 KiB
Plaintext
67 lines
1.2 KiB
Plaintext
-- 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';
|
|
count
|
|
-------
|
|
270
|
|
(1 row)
|
|
|
|
SELECT count(*) FROM timestamptmp WHERE a <= '2004-10-26 08:55:08';
|
|
count
|
|
-------
|
|
271
|
|
(1 row)
|
|
|
|
SELECT count(*) FROM timestamptmp WHERE a = '2004-10-26 08:55:08';
|
|
count
|
|
-------
|
|
1
|
|
(1 row)
|
|
|
|
SELECT count(*) FROM timestamptmp WHERE a >= '2004-10-26 08:55:08';
|
|
count
|
|
-------
|
|
274
|
|
(1 row)
|
|
|
|
SELECT count(*) FROM timestamptmp WHERE a > '2004-10-26 08:55:08';
|
|
count
|
|
-------
|
|
273
|
|
(1 row)
|
|
|
|
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;
|
|
count
|
|
-------
|
|
270
|
|
(1 row)
|
|
|
|
SELECT count(*) FROM timestamptmp WHERE a <= '2004-10-26 08:55:08'::timestamp;
|
|
count
|
|
-------
|
|
271
|
|
(1 row)
|
|
|
|
SELECT count(*) FROM timestamptmp WHERE a = '2004-10-26 08:55:08'::timestamp;
|
|
count
|
|
-------
|
|
1
|
|
(1 row)
|
|
|
|
SELECT count(*) FROM timestamptmp WHERE a >= '2004-10-26 08:55:08'::timestamp;
|
|
count
|
|
-------
|
|
274
|
|
(1 row)
|
|
|
|
SELECT count(*) FROM timestamptmp WHERE a > '2004-10-26 08:55:08'::timestamp;
|
|
count
|
|
-------
|
|
273
|
|
(1 row)
|
|
|