Skip to content

Commit c89451e

Browse files
committed
extend tests
1 parent f8625ba commit c89451e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

expected/rum.out

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger('a', 'pg_catalog.english'
66
CREATE INDEX rumidx ON test_rum USING rum (a rum_tsvector_ops);
77
\copy test_rum(t) from 'data/rum.data';
88
SET enable_seqscan=off;
9+
explain (costs off)
10+
SELECT count(*) FROM test_rum WHERE a @@ to_tsquery('pg_catalog.english', 'ever|wrote');
11+
QUERY PLAN
12+
------------------------------------------------------------------
13+
Aggregate
14+
-> Bitmap Heap Scan on test_rum
15+
Recheck Cond: (a @@ '''ever'' | ''wrote'''::tsquery)
16+
-> Bitmap Index Scan on rumidx
17+
Index Cond: (a @@ '''ever'' | ''wrote'''::tsquery)
18+
(5 rows)
19+
920
SELECT count(*) FROM test_rum WHERE a @@ to_tsquery('pg_catalog.english', 'ever|wrote');
1021
count
1122
-------

sql/rum.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ CREATE INDEX rumidx ON test_rum USING rum (a rum_tsvector_ops);
1212

1313
SET enable_seqscan=off;
1414

15+
explain (costs off)
16+
SELECT count(*) FROM test_rum WHERE a @@ to_tsquery('pg_catalog.english', 'ever|wrote');
17+
1518
SELECT count(*) FROM test_rum WHERE a @@ to_tsquery('pg_catalog.english', 'ever|wrote');
1619
SELECT count(*) FROM test_rum WHERE a @@ to_tsquery('pg_catalog.english', 'have&wish');
1720
SELECT count(*) FROM test_rum WHERE a @@ to_tsquery('pg_catalog.english', 'knew&brain');

0 commit comments

Comments
 (0)