Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a7ace3b

Browse files
committed
Make testing of phraseto_tsquery independ from value of
default_text_search_config variable. Per skink buldfarm member
1 parent fcff8a5 commit a7ace3b

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/test/regress/expected/tsearch.out

+5-5
Original file line numberDiff line numberDiff line change
@@ -759,25 +759,25 @@ SELECT to_tsquery('english', '2 <-> (s <-> (1 <-> a))');
759759
'2' <-> '1'
760760
(1 row)
761761

762-
SELECT to_tsquery('foo <-> (a <-> (the <-> bar))');
762+
SELECT to_tsquery('english', 'foo <-> (a <-> (the <-> bar))');
763763
to_tsquery
764764
-----------------
765765
'foo' <-> 'bar'
766766
(1 row)
767767

768-
SELECT to_tsquery('((foo <-> a) <-> the) <-> bar');
768+
SELECT to_tsquery('english', '((foo <-> a) <-> the) <-> bar');
769769
to_tsquery
770770
-----------------
771771
'foo' <3> 'bar'
772772
(1 row)
773773

774-
SELECT to_tsquery('foo <-> a <-> the <-> bar');
774+
SELECT to_tsquery('english', 'foo <-> a <-> the <-> bar');
775775
to_tsquery
776776
-----------------
777777
'foo' <3> 'bar'
778778
(1 row)
779779

780-
SELECT phraseto_tsquery('PostgreSQL can be extended by the user in many ways');
780+
SELECT phraseto_tsquery('english', 'PostgreSQL can be extended by the user in many ways');
781781
phraseto_tsquery
782782
-----------------------------------------------------------------------
783783
( ( ( 'postgresql' <3> 'extend' ) <3> 'user' ) <2> 'mani' ) <-> 'way'
@@ -1462,7 +1462,7 @@ create temp table phrase_index_test(fts tsvector);
14621462
insert into phrase_index_test values('A fat cat has just eaten a rat.');
14631463
create index phrase_index_test_idx on phrase_index_test using gin(fts);
14641464
set enable_seqscan = off;
1465-
select * from phrase_index_test where fts @@ phraseto_tsquery('fat cat');
1465+
select * from phrase_index_test where fts @@ phraseto_tsquery('english', 'fat cat');
14661466
fts
14671467
-------------------------------------------------
14681468
'A' 'a' 'cat' 'eaten' 'fat' 'has' 'just' 'rat.'

src/test/regress/sql/tsearch.sql

+5-5
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ SELECT to_tsquery('english', '2 <-> (s <-> (a <-> 1))');
169169
SELECT to_tsquery('english', '2 <-> ((1 <-> a) <-> s)');
170170
SELECT to_tsquery('english', '2 <-> (s <-> (1 <-> a))');
171171

172-
SELECT to_tsquery('foo <-> (a <-> (the <-> bar))');
173-
SELECT to_tsquery('((foo <-> a) <-> the) <-> bar');
174-
SELECT to_tsquery('foo <-> a <-> the <-> bar');
175-
SELECT phraseto_tsquery('PostgreSQL can be extended by the user in many ways');
172+
SELECT to_tsquery('english', 'foo <-> (a <-> (the <-> bar))');
173+
SELECT to_tsquery('english', '((foo <-> a) <-> the) <-> bar');
174+
SELECT to_tsquery('english', 'foo <-> a <-> the <-> bar');
175+
SELECT phraseto_tsquery('english', 'PostgreSQL can be extended by the user in many ways');
176176

177177

178178
SELECT ts_rank_cd(to_tsvector('english', '
@@ -485,5 +485,5 @@ create temp table phrase_index_test(fts tsvector);
485485
insert into phrase_index_test values('A fat cat has just eaten a rat.');
486486
create index phrase_index_test_idx on phrase_index_test using gin(fts);
487487
set enable_seqscan = off;
488-
select * from phrase_index_test where fts @@ phraseto_tsquery('fat cat');
488+
select * from phrase_index_test where fts @@ phraseto_tsquery('english', 'fat cat');
489489
set enable_seqscan = on;

0 commit comments

Comments
 (0)