Skip to content

Commit 1bee3ca

Browse files
committed
Stabilize just-added regression test cases.
The tests added by commits 029dea8 et al turn out to produce different output under -DRANDOMIZE_ALLOCATED_MEMORY. This is not a bug exactly: that flag causes coerce_type() to invoke the input function twice when coercing an unknown-type literal to a specific type. So you get tsqueryin's bleat about an empty tsquery twice. Revise the test query to avoid that. Discussion: https://postgr.es/m/20230406213813.uep7plg6lvcywujo@awork3.anarazel.de
1 parent 34ad3ae commit 1bee3ca

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/test/regress/expected/tsearch.out

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1992,20 +1992,16 @@ to_tsquery('english','Lorem') && phraseto_tsquery('english','ullamcorper urna'),
19921992

19931993
-- Edge cases with empty query
19941994
SELECT ts_headline('english',
1995-
'', ''::tsquery);
1995+
'', to_tsquery('english', ''));
19961996
NOTICE: text-search query doesn't contain lexemes: ""
1997-
LINE 2: '', ''::tsquery);
1998-
^
19991997
ts_headline
20001998
-------------
20011999

20022000
(1 row)
20032001

20042002
SELECT ts_headline('english',
2005-
'foo bar', ''::tsquery);
2003+
'foo bar', to_tsquery('english', ''));
20062004
NOTICE: text-search query doesn't contain lexemes: ""
2007-
LINE 2: 'foo bar', ''::tsquery);
2008-
^
20092005
ts_headline
20102006
-------------
20112007
foo bar

src/test/regress/sql/tsearch.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,9 +551,9 @@ to_tsquery('english','Lorem') && phraseto_tsquery('english','ullamcorper urna'),
551551

552552
-- Edge cases with empty query
553553
SELECT ts_headline('english',
554-
'', ''::tsquery);
554+
'', to_tsquery('english', ''));
555555
SELECT ts_headline('english',
556-
'foo bar', ''::tsquery);
556+
'foo bar', to_tsquery('english', ''));
557557

558558
--Rewrite sub system
559559

0 commit comments

Comments
 (0)