postgresql/contrib/btree_gist/expected/oid.out

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
992 B
Plaintext
Raw Permalink Normal View History

2023-05-09 21:11:15 +00:00
-- oid check
SET enable_seqscan=on;
CREATE TEMPORARY TABLE oidtmp (oid oid);
INSERT INTO oidtmp SELECT g.i::oid FROM generate_series(1, 1000) g(i);
SELECT count(*) FROM oidtmp WHERE oid < 17;
count
-------
16
(1 row)
SELECT count(*) FROM oidtmp WHERE oid <= 17;
count
-------
17
(1 row)
SELECT count(*) FROM oidtmp WHERE oid = 17;
count
-------
1
(1 row)
SELECT count(*) FROM oidtmp WHERE oid >= 17;
count
-------
984
(1 row)
SELECT count(*) FROM oidtmp WHERE oid > 17;
count
-------
983
(1 row)
CREATE INDEX oididx ON oidtmp USING gist ( oid );
SET enable_seqscan=off;
SELECT count(*) FROM oidtmp WHERE oid < 17;
count
-------
16
(1 row)
SELECT count(*) FROM oidtmp WHERE oid <= 17;
count
-------
17
(1 row)
SELECT count(*) FROM oidtmp WHERE oid = 17;
count
-------
1
(1 row)
SELECT count(*) FROM oidtmp WHERE oid >= 17;
count
-------
984
(1 row)
SELECT count(*) FROM oidtmp WHERE oid > 17;
count
-------
983
(1 row)