]> granicus.if.org Git - postgresql/commitdiff
Make testing of phraseto_tsquery independ from value of
authorTeodor Sigaev <teodor@sigaev.ru>
Thu, 7 Apr 2016 16:28:31 +0000 (19:28 +0300)
committerTeodor Sigaev <teodor@sigaev.ru>
Thu, 7 Apr 2016 16:33:23 +0000 (19:33 +0300)
default_text_search_config variable.

Per skink buldfarm member

src/test/regress/expected/tsearch.out
src/test/regress/sql/tsearch.sql

index 558f00cc4e459cf2dab4bfce600a4f68ad20f451..a4c61e20cb6ed4987e5d00aa989ac554dc4f7e84 100644 (file)
@@ -759,25 +759,25 @@ SELECT to_tsquery('english', '2 <-> (s <-> (1 <-> a))');
  '2' <-> '1'
 (1 row)
 
-SELECT to_tsquery('foo <-> (a <-> (the <-> bar))');
+SELECT to_tsquery('english', 'foo <-> (a <-> (the <-> bar))');
    to_tsquery    
 -----------------
  'foo' <-> 'bar'
 (1 row)
 
-SELECT to_tsquery('((foo <-> a) <-> the) <-> bar');
+SELECT to_tsquery('english', '((foo <-> a) <-> the) <-> bar');
    to_tsquery    
 -----------------
  'foo' <3> 'bar'
 (1 row)
 
-SELECT to_tsquery('foo <-> a <-> the <-> bar');
+SELECT to_tsquery('english', 'foo <-> a <-> the <-> bar');
    to_tsquery    
 -----------------
  'foo' <3> 'bar'
 (1 row)
 
-SELECT phraseto_tsquery('PostgreSQL can be extended by the user in many ways');
+SELECT phraseto_tsquery('english', 'PostgreSQL can be extended by the user in many ways');
                            phraseto_tsquery                            
 -----------------------------------------------------------------------
  ( ( ( 'postgresql' <3> 'extend' ) <3> 'user' ) <2> 'mani' ) <-> 'way'
@@ -1462,7 +1462,7 @@ create temp table phrase_index_test(fts tsvector);
 insert into phrase_index_test values('A fat cat has just eaten a rat.');
 create index phrase_index_test_idx on phrase_index_test using gin(fts);
 set enable_seqscan = off;
-select * from phrase_index_test where fts @@ phraseto_tsquery('fat cat');
+select * from phrase_index_test where fts @@ phraseto_tsquery('english', 'fat cat');
                        fts                       
 -------------------------------------------------
  'A' 'a' 'cat' 'eaten' 'fat' 'has' 'just' 'rat.'
index ccd152591a8446383d410b344b35fba7fee95713..34b46fa32433bd69c91c70123bcff3bfebfc032c 100644 (file)
@@ -169,10 +169,10 @@ SELECT to_tsquery('english', '2 <-> (s <-> (a <-> 1))');
 SELECT to_tsquery('english', '2 <-> ((1 <-> a) <-> s)');
 SELECT to_tsquery('english', '2 <-> (s <-> (1 <-> a))');
 
-SELECT to_tsquery('foo <-> (a <-> (the <-> bar))');
-SELECT to_tsquery('((foo <-> a) <-> the) <-> bar');
-SELECT to_tsquery('foo <-> a <-> the <-> bar');
-SELECT phraseto_tsquery('PostgreSQL can be extended by the user in many ways');
+SELECT to_tsquery('english', 'foo <-> (a <-> (the <-> bar))');
+SELECT to_tsquery('english', '((foo <-> a) <-> the) <-> bar');
+SELECT to_tsquery('english', 'foo <-> a <-> the <-> bar');
+SELECT phraseto_tsquery('english', 'PostgreSQL can be extended by the user in many ways');
 
 
 SELECT ts_rank_cd(to_tsvector('english', '
@@ -485,5 +485,5 @@ create temp table phrase_index_test(fts tsvector);
 insert into phrase_index_test values('A fat cat has just eaten a rat.');
 create index phrase_index_test_idx on phrase_index_test using gin(fts);
 set enable_seqscan = off;
-select * from phrase_index_test where fts @@ phraseto_tsquery('fat cat');
+select * from phrase_index_test where fts @@ phraseto_tsquery('english', 'fat cat');
 set enable_seqscan = on;