From: Teodor Sigaev <teodor@sigaev.ru>
Date: Thu, 7 Apr 2016 16:28:31 +0000 (+0300)
Subject: Make testing of phraseto_tsquery independ from value of
X-Git-Tag: REL9_6_BETA1~257
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a7ace3b6d96c7a1539ed0700865d320258a12f73;p=postgresql

Make testing of phraseto_tsquery independ from value of
default_text_search_config variable.

Per skink buldfarm member
---

diff --git a/src/test/regress/expected/tsearch.out b/src/test/regress/expected/tsearch.out
index 558f00cc4e..a4c61e20cb 100644
--- a/src/test/regress/expected/tsearch.out
+++ b/src/test/regress/expected/tsearch.out
@@ -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.'
diff --git a/src/test/regress/sql/tsearch.sql b/src/test/regress/sql/tsearch.sql
index ccd152591a..34b46fa324 100644
--- a/src/test/regress/sql/tsearch.sql
+++ b/src/test/regress/sql/tsearch.sql
@@ -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;